Draft version June 4, 2015
Preprint typeset using LATEX style emulateapj v. 12/16/11

CALCULATING TOTAL POWER FROM VLBI DATA
Lindy Blackburn1 , Michael D. Johnson1 , Andre Young1

EHT Memo 2015-PUL-01
1. TOTAL POWER FROM 2-BIT DATAPower received by the antenna is proportional to σV2 = hV (t)2 i. We record 2-bit quantized data y[n] where,−∞ < V (t) < −V0
1
2−V0 < V (t) < 0y[n] = 3at t = n/fs
0 < V (t) < +V0
4+V0 < V (t) < +∞(1)

Here V0 is a quantization threshold, and for VLBI correlation is often tuned to the rms standard deviation of thesignal σV . fs is the Nyquist sampling rate of the band limited signal. We want to estimate changing signal power that
leads to small variations in σV (t) = σ0 + δσ (t) by using ensemble statistics of the quantized data y[n] at a fixed 2-bitthreshold.
For simplicity, let x(t) measure voltage relative to that measured for the average SEFD of the antenna, withσx (t) = 1 + (t). The total power in the signal relative to baseline is σx2 = 1 + 2 + O(2 ) for small changes about theSEFD. The expected fraction of total values that fall within quantization levels 2 and 3 are,Z x0
Z x0 /(1+)p=G(x, σ = 1 + ) dx =G(x0 , σ = 1) dx0(2)−x0−x0 /(1+)with x0 corresponding to the quantization threshold and G(x, σ) representing a zero-mean Gaussian distribution.
Expanding p about  = 0 gives,dpp() = p0 + = p0 − 2x0 G(x0 , 1) + O(2 )(3)dand total power as a function of expected fractional state counts p,
p0 − pσx2 = 1 + 2 = 1 +(4)x0 G0where G0 = G(x0 , 1). Given sufficient data, we assume that p0 can be measured accurately and solve for x0 ,√x0 = 2 erf −1 (p0 )(5)with erf−1 representing the inverse error function.
For a series of N independent discrete observations x[n] each with probability p of being counted, the probability ofobserving a given number of counts k follows a binomial distribution, N kP (k) =p (1 − p)N −k(6)kThe binomial distribution has mean hki = N p and variance σk2 = N p(1 − p). For a small expected deviation around alarge expected k0 = N p0 , we can assume the inferred variance on estimated fraction p̂ is constant,p0 (1 − p0 )kσp̂2 =+O(7)p̂ =NNNThis translates into an error on estimated power,σ̂x2 = 1 +p0 − p̂x0 G0var(σ̂x2 ) =p0 (1 − p0 )N (x0 G0 )2(8)The minimum var(σ̂x2 ) = 3.07/N occurs at x0 = 1.42. At x0 = 1 typical for VLBI, the variance is 3.70/N .
Equation 8 for total power can be written in terms of constant factors applied to the counts in the inner p and outer1 − p bins,
1 − p0p0
σ̂x2 = 1 −p̂ + 1 +(1 − p̂)(9)x0 G0x0 G0
lblackburn@cfa.harvard.edu, mjohnson@cfa.harvard.edu, ayoung@cfa.harvard.edu
1 Harvard-Smithsonian Center for Astrophysics, 60 Garden Street, Cambridge, MA 02138, USA

2Blackburn, Johnson, & Youngpower estimation for 1 threshold

1.010

1.5
estimated/input power

estimated total power from state counts

2.0

1.0
0.5

linear estimatorusing mean squared values
using mean absolute values

0.0
0.5
0.0

0.5
1.0
1.5
input power relative to baseline

1.005

0.5
1.0
1.4
1.7
2.0
2.5

1.000
0.995
0.990
0.6

2.0

systematic accuracy for 2-bit thresholds

0.7

0.8 0.9 1.0 1.1 1.2 1.3
input power relative to baseline

1.4

Figure 1. Accuracy of estimated power as input power is varied. The estimated power is a linear function of the 2-bit state counts,
with coefficients derived by either linearizing the error function about the threshold value, or by using mean squared values within eachquantization level. The use of mean squared values returns the correct baseline power, but underestimates the relative ampltiude offluctuations, shown by the reduced slope of the green line in the left plot. The choice of quantization threshold affects behavior of thesystematic error in the linear approximation. The higher-order terms are minimized at a threshold around 1.7σ. Statistical errors are notshown in these plots. For 32768 samples (8µs at 4.096 GHz), equation 8 gives about 1% statistical error at 1σ quantization threshold.

For a quantization threshold of x0 = 1 relative to average baseline power, the expected fractional inner counts is
p0 = 0.68, and value of the Gaussian distribution G0 = 0.24. The two factors become −0.31 and 3.82 which aredifferent than the mean squared values of all the samples within each quantization level. They are also different fromthe square of the mean values,
0.29 |x| < 1
0.462 = 0.21 |x| < 1hx2 i =h|x|i2 =(10)2.53 |x| > 1
1.532 = 2.32 |x| > 1
At baseline power where p = 0.68, the mean squared weights give the correct estimate of σx2 = 1 but understimate thepower in small fluctuations about baseline. This is because small fluctuations in power also affect the mean squared
values by changing the shape of the distribution, but this is not tracked by the constant factors. The effect is difficult
to track because it depends on the very signal energy that is being estimated. Coefficients derived from mean values
rather than mean squared values result in a biased estimate of baseline total power. The systematics affecting both
direct energy calcualtions get smaller for high-bit data with many narrow bins.
2. TOTAL POWER IN THE CONTINUOUS LIMIT
Consider a random continuous signal with finite bandwidth ∆ν that has not been quantized. A signal of duration T
is represented by N/2 = T ∆ν independent
coefficients x̃[k] or equivalently N real time samples x[n].
P 2complex Fourier
The total measured signal power E =x [n] follows a χ2 distribution with N degrees of freedom,hEi = N σx2var(E) = 2N σx2

As in the quantized case, we assume the baseline noise power is well measured and corresponds to σx2(11)= 1. Theestimator for total power is,σ̂x2 =EN

For small deviations from baseline with σx2 = 1 + 2, measurement noise is,2+Ovar(σ̂x2 ) =NN(12)(13)

pThe loss in S/N going form the continuous case to the 2-bit quantized case is 2/3.07 = 19.3% for the ideal case, and26.5% for the typical VLBI 1σ quantization threshold case. The continuous limit can be acheived for high-bit data.