RFI Mitigation Project at the Italian Radio Telescopes
Abstract 
Radio astronomy has been plagued by undesired interference since its earliest days. Nowadays, the frequency bands allocated by the International Telecommunication Union (ITU)  to passive science, even if they are still fundamental for radio astronomy, are no more sufficient to perform cutting-edge science. Astronomers require to observe the Universe in more and more parts of the radio spectrum, and increasing effort is being dedicated to methods for RFI detection and excision.
In recent years the impact of RFI has increased enormously at the Italian telescope sites, Medicina, Noto and SRT, not only due to its abundance and increasing appearance at higher frequencies, but also because of the more frequent usage of our antennas for single-dish wide band radio continuum observations. In contrast to interferometric techniques, single-dish observations are in fact more vulnerable to RFI as astronomical and RFI signals are coherently added. Moreover, the higher sensitivity of the SRT makes this antenna even more vulnerable to undesired artificial emission. Various methods for the mitigation of these signals can be utilized at different levels during the acquisition of data. These range from anticipatory methods to change the local RFI environment by means of regulating manners up to the excision or cancellation of RFI signals in the post-detection stage.
In 2013 the Italian National Institute for Astrophysics funded a project of national interest for RFI mitigation at the Italian radio telescope sites. 
In this paper we present the first results of a project aiming at the mitigation of one of the most pressing problems for observational radio astronomy in Italy and the cm-wavelength telescopes world-wide: the ever-deteriorating situation of Radio Frequency Interference (RFI). We illustrate the campaigns conducted at the Noto 32m radio telescope and the Sardinia Radio Telescope (SRT) observing sites to monitor the evolution of RFI at these locations in the frequency range 0.05-40 GHz. A new FPGA-based spectrometer and an offline software tool for RFI detection and excision are presented and their performances are summarized.
 
2. RFI monitoring at the Noto and Sardinia Radio Telescopes
 
The locations of the Italian radio telescopes are different in terms of their RFI environment. The specific topography at the Medicina site leads to a full exposure of the telescope within one of the most densely populated areas in Europe. The monitoring of the radio astronomical frequency bands in the range 0.3-40 GHz has been a continuous activity at Medicina since the telescope construction (see f.i. [2], [3]) by means of a fully steerable receiving system on a 22m-high control tower, plus a mobile laboratory. As sources of interference continue to proliferate, and as the requirements of astronomical observations become increasingly demanding in terms of frequency range and bandwidth, accurate and continuous RFI monitoring is mandatory for new telescopes like the SRT or even for future observations with existing facilities like the Medicina or Noto 32m antennas.
 
Three intensive RFI measurement campaigns were carried on at the Noto radio telescope (December 2014 [4] and May 2016) and at the SRT (November 2016) by using the SRT RFI mobile laboratory [5]. The RFI van is a state-of-the-art laboratory equipped with an antenna set, microwave components and a spectrum analyzer (Agilent E4464A) able to measure frequency spectra from 50 MHz to 40 GHz and in both linear (vertical and horizontal) polarizations.
 
An accurate monitoring of the RFI environment around both the Noto and SRT sites was performed with the same modus operandi. First, a suitable location on the top of a hill close to the telescope, was chosen for a free-space 360°-azimuth measurement. Two frequency spectra for each polarization were taken after a 360°-azimuth scan (one minute long) by setting the spectrum analyzer first in a broad (3 MHz resolution) and then in a narrow (100 KHz resolution) bandwidth configuration and both in max-hold acquisition mode. The broad band configuration allows the acquisition of different kinds of signal (including impulsive and fast transient ones) with a system sensitivity of about -85 dBm. The narrow band configuration is used to improve the system sensitivity (up to -100 dBm) to better measure the bandwidth of each signal. Therefore, four spectra were taken for the bands listed in Table 1 and 2 for the SRT and Noto telescopes respectively. An accurate characterization of the signals has been performed for all the spectra. Transmission type (continuous wave or impulsive), polarization, carrier and bandwidth, peak level direction and periodicity (for impulsive type) are the main signal features used to depict the RFI environment around both telescopes.
 
A second acquisition has been done with the spectrum analyzer in the aforementioned configuration, this time at a distance of 100 m or less from each telescope site. In this way it has been possible to compare homologous spectra of the same RFI environment acquired at two different locations and to find out the actual signals received by the radio telescopes, including the site self-generated RFI from power lines, electronic apparatus, radio frequency sensors, etc. In such a way we could also compare the RFI environment at the two telescopes in terms of both frequency occupancy percentage (with respect to the whole bandwidth of each receiver) and type of service sharing the frequency band with the radio astronomical receivers (see third and fourth columns in Tables 1 and 2 for SRT and Noto respectively).
In general the SRT receiver bands turn out to be more polluted than the Noto telescope ones, with the SRT coaxial P-L receiver being the most affected one. With some differences between the two telescopes, the P- and L bands are affected mainly by aeronautic digital links, self-generated RFI, Digital Terrestrial Television (DTT), cellular phone network, radar and satellite signal. Sporadic wide-band radio emissions from power lines can be received in these bands, however they have not been taken into account in the frequency occupancy calculation in Table 1 and 2. The other frequency bands are essentially clean except for some RFI due to HiperLAN and digital links (SRT C-band and Noto S- and Low C-band), some cellular phone network digital links in the SRT K- and X-band respectively and also surveillance radar services. Finally, it is worth noting that, thanks to these RFI monitoring campaigns, unauthorized HyperLAN stations were found out at a village close to Noto. After reporting them to the local administration, they were switched off and hence not included in Table 2.
3. On-line mitigation: the FPGA-based WBLGB spectrometer
 
In the last years there has been a great rise of different real-time digital backends, generally enabled by the adoption of field programmable gate array (FPGA) technology as the main computing engine. These architectures are suitable for a simple pipelined elaboration of a stream of digital data and adapt very well to the case of radio astronomy. In this evolving digital domain, the Medicina radio telescope staff has developed great experience in the usage of FPGA-based systems as developed by the CASPER consortium [6]. The adoption of these instruments has enabled the research of new solutions in the fields of beamforming and digital FX correlation [7] and can easily be applied to single-dish data elaboration for our purposes. 
A complete hardware system for our RFI processing chain must be composed of three elements: analog to digital conversion; real-time elaboration in the digital domain; transmission of resulting data to the telescope control system for further elaboration and storage. All of this can be accomplished by means of a single ROACH board (Reconfigurable Open Architecture Computing Hardware, [8]), equipped with two iADC converter boards, providing us with a cost- and power-effective solution, easily scalable and upgradable to the next hardware generations with really little effort.
 
In Medicina, a new spectrometer named WBLGB has been developed as a firmware operating on a ROACH board in order to identify RFI signals. A lot of effort has been dedicated to make this implementation well suited for RFI investigation. First, the spectrometer adopts Polyphase Filter Banks which help to isolate the interfering signal in terms of frequency without artificially polluting the adjacent regions of the spectrum. In addition, the spectrometer implements logics which help to control any eventual digital overflow caused by extremely powerful signals being processed: digital gains can be applied along the elaboration chain making it robust in front of strong RFIs. Lastly, the time domain is carefully taken into account: data are timestamped in real-time by FPGA logics directly connected with the laboratory’s standard frequency clock and Pulse Per Second reference. The spectrometer can thus operate with a time resolution up to one millisecond per spectrum (see Figure 1 for an example). With this instrument we carried on different campaigns at the Medicina and SRT radio telescopes observing well known RFI sources and trying to characterize those directly using the radio telescope.
4. Off-line mitigation: the Dish Washer software tool
 
Dish Washer (DW) is a Python-based software tool aimed at the offline detection and flagging of RFI in data collected from single-dish radio telescopes. DW is composed by 3 Python sub-packages in charge of different functionalities and responsibilities, and a C-programming library for the implementation of efficient RFI detection algorithms. The dw.gui sub-package implements the Graphical User Interface (GUI) allowing visualization, inspection and manual flagging of data. The dw.core sub-package implements the core functionalities of the package, like the definition of data structure and I/O, manual and automatic flagging, etc. The dw.flag sub-package provides a framework for the implementation of RFI detection algorithms in Python or, for the sake of computational efficiency, in C language. This last possibility is offered via the libdw library which provides initialization functions and some basic flagging algorithms.
 
Particular attention has been devoted to the development of a user-friendly GUI to allow for data inspection by means of cross sections, contrast adjustment, etc. The GUI handles and summarizes observational metadata useful for the flagging process, like observing date and time and the antenna pointing coordinates. The flagged regions may be manipulated by means of GUI tools for their creation/deletion, visualization, merging.
Modern software tools must cope with the complexity and large amounts of data delivered in each observation by state-of-the-art radio astronomical instrumentation. Therefore DW has been designed to make the flagging process as efficient as possible by including dedicated functionalities for the propagation of the flagging matrices among different selected datasets, both for multi-feed data 
and multiple spectral sections. Finally, in order to exploit modern multi-core/multi-thread processors and efficiently run extremely expensive RFI detection algorithms on large amounts of data, the DW code supports parallelization through the use of OpenMP [9] directives.
DW has been designed to be as flexible, re-usable and expandable as possible in terms of support to different input data formats and implementation of new RFI excision methods.
 
Currently DW handles the standard FITS data format common to the three single-dish Italian radio telescopes and offers manual interactive flagging plus basic automatic RFI detection through dedicated algorithms. Support to other data formats can be easily provided by adding appropriate software modules to DW. In principle, I/O classes can be implemented for any kind of storage format, including text files, sql DBMS, HDF5 etc. Easy integration of new RFI detection algorithms, developed both in Python and C programming languages is possible as well. The first public release of Dish Washer is foreseen as free software under the GNU General Public License version 3 (or later).