Remote Data Acquisition and Archival of Magnetic Data Acquisition System ( MAGDAS )

The University of Kyushu, Japan, has established partnerships with 30 international organizations to form the CircumPan Pacific Magnetometer Network (CPMN). The CPMN establishes a network of magnetometers placed around Earth’s equator for space weather research and applications. Due to its proximity to Earth’s equator, the Magnetic Data Acquisition System (MAGDAS) was installed in the Langkawi National Observatory (LNO) on 4th of September 2006. Due to several issues with manual collection of data for archival purposes, this paper presents a MAGDAS Remote Data Acquisition and Archiving System (MRDAS) developed for the purpose of MAGDAS data acquisition and backup. Design and implementation of the MRDAS development were done using MATLAB r2015a. The data was acquired using File Transfer Protocol (FTP) access, in which the setup is described in this paper. Several important functions of the MRDAS system were implemented in the Graphical User Interface (GUI). Data is stored in the Google Drive cloud storage to ensure ease of access among researchers working in various Malaysian National Space Agency (ANGKASA) offices. The MRDAS system was successfully implemented and was able to acquire real-time data directly from the MAGDAS device. Application for remote data acquisition is for the space weather research. Keywords— remote data acquisition; magnetic data acquisition system (MAGDAS); file transfer protocol (FTP)


I. INTRODUCTION
The CPMN is a partnership between several international organizations led by the University of Kyushu to establish a magnetometer network placed around Earth's equator for the purpose of space weather research and applications [1]. This collaboration is part of the Solar Terrestrial Energy Program (STEP) from 1990 to 1997.
The Earth's magnetic field is affected by various solar phenomena such as coronal holes, mass ejections, and solar flares [2]- [4]. They cause sudden magnetic impulses that cause variations in the Earth's magnetosphere and magnetic field [5], as well as other recorded effects on the Earth's atmosphere [6], [7]. By studying these magnetic field variations, the sun's cyclical phenomena can be studied and analysed [8].
In order to analyse the Earth's magnetic field, the CPMN consists of many magnetometers, called the Magnetic Data Acquisition System (MAGDAS) being placed in participating countries [1]. Due to its proximity to Earth's equator (0° magnetic equator line), MAGDAS was installed in the Langkawi National Observatory (LNO) on 4th of September 2006 under the management of the Malaysian National Space Agency (ANGKASA) [9], [10]. The system was upgraded to MAGDAS-9 in October 2010 [9].
As with other MAGDAS installations worldwide, magnetic data is continuously acquired from the LNO MAGDAS system and streamed to Kyushu Sangyo University of Fukuoka, Japan for its research. Additionally, the data is also stored in a removable solid-state media with limited capacity on the MAGDAS device itself. Due to several factors: (i) capacity limitations of the solid state media, (ii) difficulty in accessing the physical location of the MAGDAS device, and (iii) removal of the storage media would cause interruption to MAGDAS acquisition, ANGKASA requires a remote online data backup and archival system in order to collect and store past data collected by MAGDAS.
This paper presents a MAGDAS Remote Data Acquisition and Archiving System (MRDAS) developed using MATLAB for the purpose of MAGDAS data backup. The MRDAS system is designed to be installed on a standalone computer. Connection with the MAGDAS device is established using the File Transfer Protocol (FTP), and it is designed to download the data collected from MAGDAS onto the computer. The data is then shared across ANGKASA offices using the Google Drive cloud storage system. This paper is organized as follows: Section II describes the MAGDAS device in detail, together with the methodology used, while Section III discusses the results. Finally, concluding remarks are presented in Section IV.

A. Description of MAGDAS
The MAGDAS device is a real-time magnetometer by the Kyushu Sangyo University of Fukuoka, Japan throughout the CPMN to study magnetic storms, Ultra Low Frequency (ULF) waves as well as transient and impulsive magnetic phenomena [11]. The magnetometers measure the magnetic field direction on earth in relation to space [12]. The CPMN deploys a grid of magnetometers around the world to constantly monitor the effects of the solar wind among others on the Earth's magnetic field.
As shown in Fig. 1(a) and Fig. 1(b), the MAGDAS device consists of a magnetometer which functions as the magnetic field sensor. The magnetometer is attached to the Amplifier and Analog to Digital (A/D) Converter unit, which performs data filtering and signal amplification. The data is then stored in the data logger unit. The Global Positioning System (GPS) unit is responsible for storing the precise location of where data is collected from.  [11] To ensure a consistent power supply, a built-in Uninterruptable Power Supply (UPS) is installed. In the event of power failure, the UPS will provide temporary backup power until the primary electrical supply is restored. The state of the MAGDAS system is displayed on a Liquid Crystal Display (LCD) screen, while inputs can be entered by several buttons in front of the unit. Additionally, the device can be controlled via a serial port located at the back. Data is stored in a replaceable solid state media located in front of the unit.
The current configuration of the MAGDAS system at LNO streams data directly to the servers in Japan through the Internet, which is accessible through the ANGKASA LNO station intranet network. A copy of the data being streamed is stored in the solid state media for backup. Before MRDAS was developed, ANGKASA staff members were responsible to periodically visit the MAGDAS physical site and copy data from the solid state media for archival and backup, as well as to clear out the media to ensure sufficient storage for new data. However, due to the remote and limited accessibility of the MAGDAS physical site (the device is located on a steep hill near a rainforest) (Fig. 2), this proves to be a difficult task. Additionally, because the backup process involves the removal of the storage media, the acquisition would have to be stopped temporarily prior to collection. These issues are the main motivation for the development of MRDAS.

B. MRDAS Implementation
The MAGDAS device's operating system is a modified variant of the Armadillo Linux. In addition to streaming to the internet, a built-in FTP protocol can be used to directly access the storage media over the intranet network. This protocol is used to connect MRDAS to the MAGDAS device.
The FTP protocol is based on a client/server model [13], [14]. In this model, a connection between a client and a server needs to be made prior to transfer. Once the connection has been established, the client can request for a file to be sent or retrieved from the server. The FTP protocol utilizes the Transmission Control Protocol (TCP) at the transport layer to ensure reliable data transfer [15]. Access control is implemented by an optional authentication mechanism [14].
Several items are required prior to accessing the MAGDAS Linux operating system: • Serial cable connection (RS-232) • Hyperterminal software (such as TeraTerm) The connection between MAGDAS and the intranet network needs to be checked prior to accessing it using hyperterminal. This is performed by examining the LCD and ensuring that the status RSSEND OK is displayed (Fig. 3).
To access the Armadillo Linux operating system, the serial cable is attached to the top serial port on MAGDAS (Fig. 4), and the TeraTerm software is started on the client computer (Fig. 5). The serial interface speed for MAGDAS is 115,200 bits per second (Fig. 6) [16]. After setting this option, the login console will appear requiring authentication to access (Fig.  7). The Internet Protocol (IP) address is discoverable using the command /sbin/ifconfig (Fig. 8). This internal IP address was used to establish a connection with the software. Two options are available for configuring the IP address: Dynamic Host Configuration Protocol (DHCP) and static IP. For the purpose of this research, static IP was chosen as the network is unreliable due to its remote location and frequent disconnections may cause IP changes that may cause possible issues when acquiring data.
The software was developed using MATLAB r2015a. The MATLAB development platform was chosen due to its rich function list to manage the FTP connection, file management as well as libraries to design standalone applications. The implementation results are shown in Fig. 9. The user is required to enter the MAGDAS device's IP address, username and password for access. The three buttons for the MRDAS system are: The Connect and Import Data button first initiates an FTP connection with the MAGDAS device, then downloads data from its remote/CF1 directory (Fig. 9). There are many subdirectories located inside the/CF1 folder, which stores magnetic data under different dates and times. These subdirectories are automatically created by the MAGDAS system inside the removable storage media. To reflect a similar directory structure, new directories are automatically created in the local computer based on the directory structure [17], [18] in MAGDAS. Therefore, the local directory and subdirectories would reflect the original copies of folders on the remote system. The button is disabled during the acquisition to avoid data corruption in the event of multiple simultaneous downloads.
Considering the limited and unreliable network connection between the LNO station and MAGDAS site, the MRDAS system was programmed to automatically skip identical files and only download the files currently unavailable in the local subdirectories. This measure helps to conserve bandwidth and allows for faster download times. Additionally, the frequency of acquisition is adjustable (Fig.  10). The acquisition frequency can be adjusted to longer time periods to reduce network congestion due to frequent downloads. A sample of completed acquisition is shown in Fig. 11.
The data is shared with ANGKASA main office using the Google Drive cloud storage system (Fig. 12). The cloud storage system synchronizes the data inside the local computer with the cloud. The contents of the cloud are them accessible to other researchers with authentication access to the account.
The acquisition can be stopped at any time by pressing the Stop button (Fig. 13) to give flexibility to users to cancel before the acquisition cycle is complete. The acquisition may be resumed by clicking on the Connect and Import Data button again.  This paper has described the successful implementation of the MRDAS system, which is responsible for acquiring data from the MAGDAS magnetometer for space research. Implementation was done using the MATLAB r2015a. Details of the implementation and results have been described.