In this work we focus on data from the two LIGO observatories; LIGO Hanford and LIGO Livingston.

The GW strain sensitivity for the Hanford and Livingston observatories is shown in Fig.~\ref{fig:strainSensitivity} in red and blue respectively for a snapshot of Observing Run 2.

The inset enlarges the region around the $60\,{\rm Hz}$ feature

The inset enlarges the region around the $60\,{\rm Hz}$ feature.

\begin{figure}

\begin{center}

...

...

@@ -14,26 +14,53 @@ The inset enlarges the region around the $60\,{\rm Hz}$ feature

\end{center}

\caption{\label{fig:strainSensitivity}

Sensitivity plot for LIGO-Hanford (red) and LIGO-Livingston (blue) for a snapshot of O2 (see Ref.~\cite{GWOSC:2019, GWOSC:online}.

The inset shows an enlargement of the region around the $60\,{\rm Hz}$ noise line in each detector. }

The inset shows an enlargement of the region around the $60\,{\rm Hz}$ noise line in each detector.

At each detector there are nine PEM for the power grid monitoring all three phases of power at the corner and two end stations.

At each detector there are nine PEM for the power grid monitoring all three phases of power at the corner and two end stations at a sample rate of $1024\,{\rm Hz}$.

The effect of the power grid on GW detectors is not static.

Changes over time may be due to the effect of changing load on the U.S. power grid at any one time.

This is illustrated by the cascade plot shown in Fig.~\ref{fig:powerCascade}.

\han{Think about what is best to plot here, time for each line, how many times?}

This is illustrated by the cascade plot shown in Fig.~\ref{fig:powerCascade}, which shows approximately $17$ hours of data from the~\CSOneName~(which records phase $1$ of the power at the corner station of the Hanford observatory).

Each trace shows the amplitude spectral density (ASD) for approximately $5$ minutes of data.

Cascade plot showing the ASD of the Handford PEM monitor \texttt{H1:PEM-CS\_MAINSMON\_EBAY\_1\_DQ} (corner station, phase 1) over time.

Each line corresponds to $128\,{\rm s}$of data, with $60$ lines plotted.

Cascade plot showing the amplitude spectral density of the Handford PEM monitor \CSOneName~ (corner station, phase 1) over time.

Each trace corresponds to $320\,{\rm s}$($\approx5\,{\rm min}$) of data ($210$ lines plotted).

}

\end{figure}

Fig.~\ref{fig:peakOverTime} shows the peak frequency of the nine reference channels for each detector.

The peak is found by computing the ASD and finding the maximum frequency bin within the width of the $60\,{\rm Hz}$ power line ($59.93$--$60.06\,{\rm Hz}$~\cite{GWOSC:online}).

To the resolution of the binning, the peak frequencies of the nine reference channels are indistinguishable from each other over the two day period plotted.

In this work we use a single reference channel.

Fig.~\ref{fig:peakOverTime} indicates that this is a reasonable simplification given the similarity of the reference channels.

Also shown in Fig.~\ref{fig:peakOverTime} are the peak frequencies of the ASD for each of the Hanford (orange, top panel) and Livingston (blue, bottom panel).

The Hanford peaks generally match well with the peak of the references, however for Livingston the peaks do not match for about half of the data plotted (\han{check data quality, and plot different times}).

The peak frequency over time for Hanford (top) and Livingston (bottom) for an ASD in the range $59.93$--$60.06\,{\rm Hz}$.

The black lines show data from the nine PEM at each detector (which are indistinguishable in the figure).

The cross markers show the peak frequency for the GW channels for ASDs in the same range where orange (top panel) and blue (bottom panel) are for Hanford and Livingston respectively.

Showing.....

\han{to do - look at other times and check whether there were any data quality issues at Livingston at this time}

Gravitational wave (GW) observatories such as Advanced LIGO~\cite{AasiEtAlAdLIGO:2015} and Advanced Virgo~\cite{AcerneseEtAlAdVirgo:2015} require high sensitivity to make GW detections.

To achieved this precision, GW observatories employ a variety of techniques to isolated them from environmental noise.

However they cannot be fully isolated and detector data contains short (glitches~\cite{}) and long (narrow spectral~\cite{CovasEtAl:2018}) duration noise artifacts.

To meet these sensitivity needs, GW observatories employ a variety of techniques to isolate them from environmental noise.

However they cannot be fully isolated and detector data contains short (glitches~\cite{DavisEtAl:2020}) and long (narrow spectral~\cite{CovasEtAl:2018}) duration noise artifacts.

Mitigation and removal of nosie spectral lines is an area of active study.

GW detectors have a wealth of physical environmental monitors (PEM) which record environmental effects on the instrument and are used to assess the quality of the data at any one time~\cite{DetCharGW150914:2016,MarinShoemakerWeissPEM:1997}.

Much effort has been made to identify the source of lines and, wherever possible, to remove the source of the noise.

For example, in Ref.~\cite{CovasEtAl:2018}, a comb artifact (with $1\,{\rm Hz}$ spacing and $0.5\,{\rm Hz}$ offset) is identified in Oberving Run 1 data to originate from blinking LEDs in the timing system for the observatory.

For example, in Ref.~\cite{CovasEtAl:2018}, a comb artifact (with $1\,{\rm Hz}$ spacing and $0.5\,{\rm Hz}$ offset) is identified in Observing Run 1 data to originate from blinking LEDs in the timing system for the observatory.

The effect whas reduced by preventing the LEDs from flashing.

Preventing the process causing noise lines is not alway posible and in many cases the cause remains unidentified.

It can, however, be possible to remove the effect of a noise line after data aquisition.

Information from PEMs provides a useful resouce for removing noise from the GW data if there is a correlation between the PEM channel and the noise in the GW channel.

Recent work has used PEM channels to remove noise spectral lines with machine learning techniques~\cite{} Nonsens, Deep Clean

Preventing the process causing noise lines is not always possible and in many cases the cause remains unidentified.

It can, however, be possible to remove the effect of a noise line after data acquisition.

Information from PEMs provides a useful resource for removing noise from the GW data if there is a correlation between the PEM channel and the noise in the GW channel.

Recent work has used PEM channels to remove noise spectral lines with machine learning techniques~\cite{VajenteEtAl:2020,OrmistonEtAl:2020}.

Noise lines pose a particular difficulty to seraches for continuous gravitaitonal waves (CWs); persistent, periodic gravitational wave signals which are expected to be emitted by rotating neutron stars.

Searches target millisecond pulsars[], low mass x-ray binaries [], supernova remnants, and post-merger remants[].

Noise lines pose a particular difficulty to searches for continuous gravitational waves (CWs); persistent, periodic gravitational wave signals which are expected to be emitted by rotating neutron stars.

Searches may cover the entire sky~\cite{} or target specific objects such as millisecond pulsars~\cite{O3PulsarSearch:2020,KnownPulsarsTwoHarminics:2019,KnownPulsarSearchO1:017}, low mass x-ray binaries~\cite{ScoX1ViterbiO2,SearchCrossCorrO1:2017,MeadorsEtAlS6LMXBSearch:2017,ScoX1ViterbiO1:2017,RadiometerO1O2:2019,SearchRadiometerO1:2017,MiddO2LMXBs:2020}, and supernova remnants~\cite{MillhouseEtAl:2020,LindblomOwenSNR:2020,SNRSearch:2019}.%, and post-merger remants[].

The noise lines are often loud and can obscure a CW signal in the affected frequency bins.

CW candidates in proximity to noise line are typically vetoed ~\cite{} (Hmm papers)

Efforts have been made to ensure CW searches are robust against instrumental artifacts (Keital paper)

CW candidates in proximity to noise line are typically vetoed (e.g. Ref.~\cite{ScoX1ViterbiO2}).

Efforts have been made to reduce the vunerability of CW searches to noise lines~\cite{BayleyEtAl:2020,KeitelEtAl:2014}.

In this study we investigate the prospects of adaptive noise cancellation~\cite{WidrowEtal:1975} (ANC) for line removal in GW data.

We focus on the removal of the $60\,{\rm Hz}$ noise line, which is due to interference from the United States power grid.

ANC can be applied to situations where a reference signal provides an independent measurement of the noise interference, similar to the methods applied in Refs.~\cite{}.

The PEM data recorded at each observatory provides an excellent opportunity to test this method in GW data.

We focus on the removal of the $60\,{\rm Hz}$ noise line due to interference from the United States power grid.

ANC can be applied to situations where a reference signal provides an independent measurement of the noise interference, similar to the methods applied in Refs.~\cite{VajenteEtAl:2020,OrmistonEtAl:2020}.

The PEM data recorded at each observatory provides an excellent opportunity to test the effectiveness of ANC for GW data.

In Sec.~\ref{sec:method} we describe the method of ANC used in this work and in Sec.~\ref{sec:60Hz} we discuss the behavoir of the power line in the GW data and the avalaible environmental monitors.

In Sec.~\ref{sec:results} we test the algorithm using GW data and describe our conclusions in Sec.~\ref{sec:conclusion}.

In Sec.~\ref{sec:method} we describe the method of ANC used in this work and in Sec.~\ref{sec:60Hz} we discuss the behaviour of the power line in the GW data and the available environmental monitors.

In Sec.~\ref{sec:results} we test the algorithm using GW data and discuss our conclusions in Sec.~\ref{sec:conclusion}.

Adaptive noise cancellation provides an eatimate of a signal which has been corrupted by some interference or noise.

Adaptive noise cancellation provides an estimate of a signal which has been corrupted by some interference or noise.

The method can be applied in the situation where there is a dataset of interest, the \emph{primary} signal and a witness to the interference; the \emph{reference} signal.

The primary signal contains the information of interest, plus some additional unwanted interference.

The reference signal contains a measurement of the interference which is correlated in some unknown way to the noise in the primary signal.

For our purposes, the primary signal is the gravitational-wave channel and the reference is a PEM recording data from the power grid (see Sec.~\ref{sec:60Hz}).

The ANC computes an estimate of the noise as it appears in the primary and subtracts it.

In this section, we describe the implementation of ANC used in this work.

The primary timeseries $d_i$ (evenly sampled at time steps $i =0,\dots,N$) is known to contain an unwanted interference, which we label the `clutter' $c_i$.

The primary may also contain a signal of interest$h_i$, as well as additional noise$n_i$, so that

The primary also contains other noise$n_i$, and may contain a signal of interest$h_i$ (the GW), so that

\begin{equation}

d_i = h_i + c_i + n_i\,.

\end{equation}

The objective is to remove $c_i$ with the aid of a reference measurement $r_i$, leaving $h_i$ intact.

It is likely that the relationship between $r_i$ and $c_i$ is unknown; the coupling of the mains interference into the interferometer maybe extremely complex.

The objective is to remove $c_i$ with the aid of a reference measurement $r_i$ whilst leaving $h_i$ intact.

It is likely that the relationship between $r_i$ and $c_i$ is unknown; the coupling of the mains interference into the detector maybe extremely complex.

We use $r_i$ to construct an estimate $y_i$ of $c_i$ and remove it in the time domain.

The filtered timeseries is

\begin{eqnarray}

e_i &~=~& d_i - y_i \,, \\

&~\approx~& h_i + n_i \,.\\

\end{eqnarray}

The value of $y_i$ is the scalor product of the tap-input vector $\mathbf{u}$ and the tap-weight vector $\mathbf{w}$ defined as

\begin{eqnarray}

The value of $y_i$ is the scalar product of the tap-input vector $\mathbf{u}$ and the tap-weight vector $\mathbf{w}$.

The tap-input $\mathbf{u}$ is taken directly from the reference signal and is defined as

\begin{equation}

u_k = [r_k, r_{k-1}, \dots, r_{k-M+1}]\,,

w_? = [\dots]\,,

\end{eqnarray}

where $M$ is the order of the filter.

The vector $\mathbf{u}$ comes directly from the reference signal.

We now wish to compute $\mathbf{w}$ at each timestep.

\end{equation}

where $M$ is the order of the adaptive filter.

There are different methods to compute $\mathbf{w}$.

We use the adaptive recursive least squares method described below.

\subsection{Adaptive Recursive Least Squares Method}

\label{sec:arlsrecipee}

In this work we use the adaptive recursive least squares (ARLS) method to compute the estimated signal.

The method is described in Chapter 9 of Ref.~\cite{HaykinAdaptiveFT:2002}.

\han{block diagram of method?}

ARLS requires two input parameters, the order $M$ and $\lambda$, the meaning of which is discussed below.

Here we describe the algorithm as pseudocode.

We described the algorithm as pseudocode and it is also illustrated by the block diagram in Fig.~\ref{fig:arlsBlock}.

\begin{enumerate}

\item Initialise zero value $M$-by-$1$ vectors $\mathbf{u(n=0)}$ and $\mathbf{w(n=0)}$ for the tap-input and tap-weights respectively for timestep $n=0$. .

\item Initialise empty $M$-by-$M$ matrix $P$, which is referred to as the inverse correlation matrix.

\item Read in the values of $d$ and $r$ at the current time $n$.

\item Initialise empty $M$-by-$M$ matrix $\mathbf{P}$, which is referred to as the inverse correlation matrix.

\item Read in the values of $d_n$ and $r_n$ at the current time $n$.

\begin{enumerate}

\item The tap inputs are updated as

\begin{equation}

u_{k=0} = r(n) \,,

\end{equation}

\item and the estimated signal subtracted,

\begin{equation}

e_n = d_n - \mathbf{w}\mathbf{u}.

\end{equation}

\item An $M$-by-$1$ vector $\mathbf{K}$ (the gain vector) is computed

\item and the estimated signal subtracted

\begin{eqnarray}

e_n &=& d_n - y_n\,, \\

&=& d_n - \mathbf{w}\mathbf{u}.

\end{eqnarray}

\item Compute the gain vector $\mathbf{K}$ (an $M$-by-$1$ vector)

\begin{equation}

K = {\mathbf{P}\mathbf{u}}{\lambda + (\mathbf{u}\mathbf{P})\mathbf{u}}

We apply the ANC described in Sec.~\ref{sec:method} to a small selection of O2 data as a testing ground.

We test the algorithm on XX days of data (\han{currently about one hour}), using a single witness channel (\CSOneName).

The method is first applied to the Hanford observatory data and then to the same data with the addition of a continuous gravitational wave injection.

Our implementation of the ARLS is written in python and takes \han{[to do:] approximately XX seconds per XX seconds of data on a XXX computer}.

\subsection{GW data}

Figure~\ref{fig:resultM5} shows the ASD of the primary and filtered data in black and orange respectively using $M=5$.

We find that if $M$ is too small, the subtraction is not effective and if $M$ is too large, the ANC adds noise around the $60\,{\rm Hz}$ line (see Appendix~\ref{app:failedMs}).

\han{think about a figure of merit for the amount of subtraction}

Amplitude spectral density of the primary data (black) and the filtered result (orange) for the region around $60\,{\rm Hz}$.

}

\end{figure*}

The method as implemented here does not successfully remove harmonics of the $60\,{\rm Hz}$ line, although they are present in both the GW and PEM data.

This may be because the coupling of higher harmonics in the interferometer has a different delay to the line at $60\,{\rm Hz}$.

A further problem is observed as ANC introduces some noise above and below harmonics as shown by the wider spectrum and residual displayed in Fig.~\ref{fig:ASDWide}.

If the frequency range of interest is focused around the $60\,{\rm Hz}$ line (e.g. for a narrow band search), this should not impose a problem for CW searches.

However the addition of noise from any method is clearly not ideal and this is an area for future improvement.

Left: Wide frequency view of the ASD of the for the primary (top), reference (middle), and filtered (bottom) data.

Right: the absolute residual between the primary and the reference signal.

The grey lines indicate the harmonics of the $60\,{\rm Hz}$ line.

The largest residual is at $60\,{\rm Hz}$ as expected, however there are also peaks in the residuals above and below the frequency of the higher harmonics.

\han{May be clearer to zoom in around one or two harmonics rather than the full spectrum.}

}

\end{figure*}

\subsection{GW data + injection}

\han{to do....}

%\vspace{2em}

%\han{

%\noindent Some to dos:

%\begin{itemize}

%\item subtraction figure of merit

%\item add a paragraph on how long it takes to run

%\item Also run with an injection into real data

%\item Run for longer periods of data, maybe a couple of days?

%%%%%%%%%%%%%%%%%%% TITLE PAGE %%%%%%%%%%%%%%%%%%%

...

...

@@ -43,10 +43,31 @@

\begin{document}

\preprint{}

\title[test short title]{TBC: Getting rid of the power line..}% Force line breaks with \\

\title[test short title]{Adaptive noise cancellation for gravitational-wave data}% Force line breaks with \\

%\thanks{this would be a footnoted on the first page}%

\author{add author 1}

\author{Hannah Middleton}

\affiliation{%

School of Physics, University of Melbourne, Parkville, Vic 3010, Australia

}%

\affiliation{

OzGrav-Melbourne, Australian Research Council Centre of Excellence for Gravitational Wave Discovery, Parkville, Australia

}

\author{Sofia Suvorova}

\affiliation{%

School of Physics, University of Melbourne, Parkville, Vic 3010, Australia

}%

\affiliation{%

Engineering (check affiliation)

}%

\affiliation{

OzGrav-Melbourne, Australian Research Council Centre of Excellence for Gravitational Wave Discovery, Parkville, Australia

}

\author{Andrew Melatos}

\affiliation{%

School of Physics, University of Melbourne, Parkville, Vic 3010, Australia

}%

...

...

@@ -55,25 +76,39 @@

}

\author{add author 2}

\author{Robin Evans}

\affiliation{%

School of Physics, University of Melbourne, Parkville, Vic 3010, Australia

Engineering (check affiliation)

}%

\affiliation{

....

OzGrav-Melbourne, Australian Research Council Centre of Excellence for Gravitational Wave Discovery, Parkville, Australia

}

\author{William Moran}

\affiliation{%

Engineering (check affiliation)

}%

\affiliation{

OzGrav-Melbourne, Australian Research Council Centre of Excellence for Gravitational Wave Discovery, Parkville, Australia

}

\author{add other authors.....}

\affiliation{%

affiliation

}%

\date{\today}% It is always \today, today,

% but any date may be explicitly specified

\begin{abstract}

The abstract will go here

Spectral noise lines in gravitational-wave data collected by interferometeric observatories can pose a challenge to searches for long duration graviational waves.

Adaptive noise cancallation provides a method to remove noise interference where there is a reference signal available monitoring the noise.

We focus on the $60\,{\rm Hz}$ interference caused by the United States power grid in LIGO (Laser Interferometer Gravitational-wave Observatory) data.