RUSSIAN JOURNAL OF EARTH SCIENCES, VOL. 16, ES5004, doi:10.2205/2016ES000582, 2016
I. M. Aleshin1,2, S. S. Burguchev1, K. I. Kholodkov1, F. V. Perederin1, A. A. Soloviev2
1Schmidt Institute of Physics of the Earth RAS, Moscow, Russia
2Geophysical Center RAS, Moscow, Russia
Here we describe an integrated software and hardware solution for stationary geomagnetic observations. The solution provides a feature-rich way to perform geomagnetic data acquisition for wide range of use cases, including poor data transfer conditions and power limited environments. Data transfer is implemented with widespread Seedlink protocol, which features small data overhead and automatic recovery of missed fragments. Geophysical application of data acquisition stations often implies installation at sites that are hard-to-reach or are only accessible on non-regular basis. Therefore, our solution includes full-fledged remote control and diagnostics of station equipment via web APIs in addition to standard remote management tools like secure shell. The modular nature of this software also provides flexibility for connecting various hardware. By this moment, we have implemented full support for POS-1 magnetometer; more support for other models is planned. The software is platform independent and has small CPU and memory footprints hence it runs on both low power x86 systems and ARM-based System-on-Chips, which provide great opportunities for further reduction of power consumption.
For a long time data acquisition rate of 1 sample per minute prevailed on most geomagnetic observatories. The term "real time data acquisition" for those observatories denoted latencies of tens of minutes. General purpose transfer protocols such as FTP, HTTP or even SMTP fitted well for this setup. But today we can note an increasing number of geomagnetic observatories worldwide and particularly in Russia [Soloviev et al., 2016]. Moreover – the sample rate also rises. The significant fraction of INTERMAGNET (International Real-time Magnetic Observatory Network) geomagnetic stations perform at 1 Hz. This leads to new challenges in handling the data: considering specialized and notably more compact data formats and transfer protocols to support increasing needs for storage and bandwidth. Polar observatories appear to be of special interest for scientists but those often lack persistent power and have connectivity issues, not to mention hard to reach setup locations. Operation of such observatories would benefit greatly if provided with low-power universal data acquisition devices capable of local storage, real time transfer, system health monitoring and remote management – all the features to cope the aforementioned difficulties. The rest of this paper describes the modular structure of developed low-power universal data acquisition system for POS-1 [Sapunov et al., 2001] magnetometer. System consists of magnetometer connected to universal data acquisition device. Data coming from the magnetometer is processed with adapter program that presents hardware interoperability. Processed data is then published via the server software to the datacenter (Figure 1).
The environment may pose several challenges on real time acquisition one of them being unstable data connection. To maintain realtime-ness the system must not lose data within reasonable offline window. In case of low bandwidth connections the objective will not be reachable with general purpose transfer protocols such as HTTP, FTP or its derived versions. And here's why: these protocols often have a notable overhead (for headers, data encoding and so on) while client software is usually not tailored to meet the requirements of real time transfer of geophysical data. Hence we implemented a specialized protocol – Seedlink – the protocol designed to transfer time series data reliably in real time which is widespread [Havskov and Alguacil, 2016] in seismic monitoring. The protocol is based upon SEED (Standard for the Exchange of Earthquake Data) [Buland et al., 2009] format, in particular it's subset miniSEED. The format contains basic info about the data and compressed binary encoded data. The compression is lossless. Compact and easy to split due to its block nature, the miniSEED serves a solid ground for efficient real time data transfer. Seedlink provides reliability with two mechanisms, one being the utilization of TCP in favor of UDP. TCP provides end-to-end data session control i.e. the peers always know if their packets reach their destinations. Another mechanism is retransmission ring buffer – the Seedlink server holds an amount of data in its buffers for disconnected client to catch up. Being a widespread protocol, Seedlink also boasts numerous software solutions that support it and its base format miniSEED. In our system we utilized Seedlink from Seiscomp3 (Seismological Communication Processor) package. We have developed an adapter software that converts magnetometers own format into miniSEED. This adapter was designed around libmseed library. The data transfer module handles its task in two steps. First the data is acquired through an RS-232 serial communication data port from magnetometer with an adapter program where the data is converted into miniSEED format. Then the resulting miniSEED volumes are sent through FIFO (First-In-First-Out) buffer (or pipe, depending on used OS) into Seedlink servers ring buffer. On the datacenter side a seedlink client connects to seedlink server on the acquisition station and receives the data. That is contrary to usual scheme: the station has the server role. Client computer (or datacenter) can also be a server, effectively becoming a relay. This feature could be useful for deploying data acquisition networks where stations aren't directly connected to the DC but through interim stations or local datacenters. The latter facilitates network deployment greatly because the station needs an IP address to accept connections with and global IPv4 address exhaustion makes assigning an IPv4 address to each station nearly impossible. However this stratagem is not always viable and in case IPv4 address depletion makes trouble there is another solution – utilizing virtual private networks as shown in [Aleshin et al., 2015].
Just like the data transfer problem, the problem of remote access and telemetry can be partially solved with widespread general purpose software solutions like TeamViewer or VNC (Virtual Network Computing – graphical remote control software family) but those do not provide all the necessary functionality and bring additional overhead into resource budget. Hence we had to develop a dedicated solution to cope with these problems. The component provides remote control (e.g. starting and stopping acquisition, failure recovery) and changing settings of sensor, ADC (analogue to digital converter) and other parts of the system. The relevant component also provides monitoring of acquisition process and able to take simple actions in an emergency. A notable part in management of the systems is performed by web-based API (Application Programming Interface) which receives commands and responds with results over HTTP utilizing REST REpresentational State Transfer Application Programming Interface.
We should make some clarifications with HTTP/REST API. First, this is an API, not the user interface. The user interface is implemented in separate component and uses REST to communicate with other modules. Second, the HTTP/REST is not mandatory but extremely convenient because of it's popularity and number of software libraries that enables use of it.
The user interface (Figure 2) is a web application that enables a convenient way for sending control commands and displaying system's status. Built with NodeJS the application's backend could be run on most popular platforms. The frontend is a single page application build with MarionetteJS framework. The described solution is implemented for POS-1 magnetometer. The user can control every setting of the magnetometer e.g. sampling rate and capture range. The interface also features acquisition start and stop controls, online data analysis, command history, indication of current status.
The system is built with extensibility in mind: modular design and simple interfaces would facilitate adding new devices and porting the system across hardware platforms as far as all utilized software is crossplatform. The portability is particularly important when it comes to energy-efficient computers with ARM (Advanced RISC Machine, an Intel's x86 competitor) systems-on-chip. During the test we have deployed our system on BeagleBone Black – an ARM-computer with $\sim 2$W power consumption. To accomplish this we had to optimized our software to run smoothly on systems with limited resources. The entire solution also fits INTERMAGNET network and can be deployed in it along with other solutions the network utilizes.
Aleshin, I., A. Vasiliev, K. Kholodkov, F. Perederin (2015), Virtual private network technologies in real-time geophysical data collection systems, Seismic Instruments, 51, no. 1, p. 44–47, doi:10.3103/S074792391501003X.
Buland, R., T. Ahern, R. Styles, K. Skjellerup, R. Casey, D. Barnes, R. Benson, T. Knight, C. Trabant (2009), SEED Reference Manual, 220 pp., Incorporated Research Institutions for Seismology (IRIS), Seattle, WA (https://www.fdsn. org/seed$_$manual/SEEDManual$_$V2.4.pdf).
Havskov, J., G. Alguacil (2016), Instrumentation in Earthquake Seismology, Springer International Publishing, Switzerland, doi:10.1007/978-3-319-21314-9.
Sapunov, V., A. Denisov, O. Denisova, D. Saveliev (2001), Proton and Overhauser magnetometers metrology, Contributions to Geophysics & Geodesy, 31, no. 1, p. 119–124 (https://www.researchgate.net/profile/Vladimir$_$Sapunov/publication/258217057 ...).
Soloviev, A., R. Sidorov, A. Krasnoperov, A. Grudnev, A. Khokhlov (2001), Klimovskaya: A new geomagnetic observatory, Geomagnetism and Aeronomy, 51, no. 1, p. 44–47, doi:10.1134/S0016793216030154.
Received 14 November 2016; accepted 16 November 2016; published 21 November 2016.
Citation: Aleshin I. M., S. S. Burguchev, K. I. Kholodkov, F. V. Perederin, A. A. Soloviev (2016), Software for realtime acquisition of geomagnetic data and station management, Russ. J. Earth Sci., 16, ES5004, doi:10.2205/2016ES000582.
Copyright 2016 by the Geophysical Center RAS.