next up previous contents
Next: Function: calibrate() Up: GRASP Routines: Reading/using Caltech Previous: Example: animate program   Contents

Function: read_sweptsine()

0 void read_sweptsine(FILE *fpss,int *n,float **freq,float **real,float **imag)
This is a low-level routine which reads in a 3-column ASCII file of swept sine calibration data used to calibrate the IFO.

The arguments are:

fpss: Input. Pointer to a file in which the swept sine data can be found. The format of this data is described below.
n: Output. One greater than the number of entries (lines) in the swept sine calibration file. This is because the read_sweptsine returns, in addition to this data, one additional entry at frequency $f=0$.
freq: Output. The array *freq[1..*n-1] contains the frequency values from the swept sine calibration file. The routine adds an additional entry at DC, *freq[0]=0. Note: the routine allocates memory for the array.
real: Output. The array *real[1..*n-1] contains the real part of the response function of the IFO. The routine adds *real[0]=0. Note: the routine allocates memory for the array.
imag: Output. The array *imag[1..*n-1] contains the imaginary part of the response function of the IFO. The routine adds *imag[0]=0. Note: the routine allocates memory for the array.

The swept sine calibration files are 3-column ASCII files, of the form:

$f_1$ $\qquad$ $r_1$ $\qquad$ $i_1$
$f_2$ $\qquad$ $r_2$ $\qquad$ $i_2$
$\cdots$
$f_m$ $\qquad$ $r_m$ $\qquad$ $i_m$
where the $f_j$ are frequencies, in Hz, and $r_j$ and $i_j$ are dimensionless ratios of voltages. There are typically $m=801$ lines in these files. Each line gives the ratio of the IFO output voltage to a calibration coil driving voltage, at a different frequency. The $r_j$ are the ``real part" of the response, i.e. the ratio of the IFO output in phase with the coil driving voltage, to the coil driving voltage. The $i_j$ are the ``imaginary part" of the response, $90$ degrees out of phase with the coil driving voltage. The sign of the phase (or equivalently, the sign of the imaginary part of the response) is determined by the following convention. Suppose that the driving voltage (in volts) is
\begin{displaymath}
V_{\rm coil} = 10 \cos( \omega t) = 10 \Re {\rm e}^{i \omega t}
\end{displaymath} (3.9.1)

where $\omega= 2 \pi \times 60 \> {\rm radians/sec}$ is the angular frequency of a 60 Hz signal. Suppose the response of the interferometer output to this is (again, in volts)
$\displaystyle V_{\rm IFO}$ $\textstyle =$ $\displaystyle 6.93 \; \cos(\omega t) + 4\; \sin(\omega t)\cr$ (3.9.2)

This is shown in Figure [*]. An electrical engineer would describe this situation by saying that the phase of the response $V_{\rm IFO}$ is lagging the phase of the driving signal $V_{\rm coil}$ by $30^\circ$. The corresponding line in the swept sine calibration file would read:
$\cdots$
$60.000$ $\qquad$ $0.6930$ $\qquad$ $-0.40000$
$\cdots$
Hence, in this example, the real part is positive and the imaginary part is negative. We will denote this entry in the swept sine calibration file by $S(60) = 0.8 \; {\rm e}^{ -i\pi/6} = 0.693 - 0.400
i$. Because the interferometer output is real, there is also a value implied at negative frequencies which is the complex conjugate of the positive frequency value: $S(-60) = S^*(60) = 0.8 \; {\rm e}^{
i\pi/6} = 0.693 + 0.400 i$.

Because the interferometer has no DC response, it is convenient for us to add one additional point at frequency $f=0$ into the output data arrays, with both the real and imaginary parts of the response set to zero. Hence the output arrays contain one element more than the number of lines in the input files. Note that both of these arrays are arranged in order of increasing frequency; after adding our one additional point they typically contain 802 points at frequencies from 0 Hz to 5001 Hz.

For the data runs of interest in this section (from November 1994) typically a swept sine calibration curve was taken immediately before each data tape was generated.

Figure: This shows a driving voltage $V_{\rm coil}$ (solid curve) and the response voltage $V_{\rm IFO}$ (dotted curve) as functions of time (in sec). Both are 60 Hz sinusoids; the relative amplitude and phase of the in-phase and out-of-phase components of $V_{\rm IFO}$ are contained in the swept-sine calibration files.
\begin{figure}\begin{center}
\epsfig{file=Figures/figure8.ps,height=5cm,bbllx=60pt,bblly=250pt,
bburx=550pt,bbury=530pt}\end{center}\end{figure}

We will shortly address the following question. How does one use the dimensionless data in the channel.0 files to reconstruct the differential motion $\Delta l(t)$ (in meters) of the interferometer arms? Here we address the closely related question: given $V_{\rm IFO}$, how do we reconstruct $V_{\rm coil}$? We choose the sign convention for the Fourier transform which agrees with that of Numerical Recipes: equation (12.1.6) of [1]. The Fourier transform of a function of time $V(t)$ is

\begin{displaymath}
{\tilde V}(f) = \int {\rm e}^{2 \pi i f t} V(t) dt.
\end{displaymath} (3.9.3)

The inverse Fourier transform is
\begin{displaymath}
V(t)= \int {\rm e}^{-2 \pi i f t} {\tilde V}(f) df.
\end{displaymath} (3.9.4)

With these conventions, the signals ([*]) and ([*]) shown in in Figure [*] have Fourier components:
$\displaystyle {\tilde V}_{\rm coil}(60) = 5 \quad$ $\textstyle {\rm and}$ $\displaystyle \quad {\tilde V}_{\rm coil}(-60) = 5,$ (3.9.5)
$\displaystyle {\tilde V}_{\rm IFO}(60) = 4{\rm e}^{i \pi/6} \quad$ $\textstyle {\rm and}$ $\displaystyle \quad {\tilde V}_{\rm IFO}(-60) = 4 {\rm e}^{-i \pi/6}.$ (3.9.6)

At frequency $f_0=60$ Hz the swept sine file contains
\begin{displaymath}
S(60) = 0.8 \; {\rm e}^{-i \pi/6} \Rightarrow S(-60) = S^*(60) =
0.8 \; {\rm e}^{i \pi/6}.
\end{displaymath} (3.9.7)

since $S(-f) = S^*(f)$.

With these choices for our conventions, one can see immediately from our example (and generalize to all frequencies) that

\begin{displaymath}
{\tilde V}_{\rm coil}(f) = {{\tilde V}_{\rm IFO} \over S^*(f)}.
\end{displaymath} (3.9.8)

In other words, with the Numerical Recipes [1] conventions for forward and reverse Fourier Transforms, the (FFT of the) calibration-coil voltage is the (FFT of the) IFO-output voltage divided by the complex conjugate of the swept sine response.
Author: Bruce Allen, ballen@dirac.phys.uwm.edu
Comments: The swept-sine calibration curves are usually quite smooth but sometimes they contain a ``glitch" in the vicinity of 1 kHz; this may be due to drift of the unity-gain servo point.


next up previous contents
Next: Function: calibrate() Up: GRASP Routines: Reading/using Caltech Previous: Example: animate program   Contents
Bruce Allen 2000-11-19