• No results found

2.3 Modeling the system

2.3.5 Phase blind calibration

The calibration procedure builds up theN rows of the frequency-domain matrix using

ΦFFT(:, k) =S(ei2πkt/T) =S(cos 2πkt/T) +iS(sin 2πkt/T)

where the last equation follows from linearity of S and Euler’s formula. The signals sin and cos are said to be “in quadrature” because they have 90◦ phase difference. This is convenient but not

necessary: the measurement S(ei2πkt/T) can be determined by measuring any two pure tones of

frequency kt/T as long as they have distinct phases modulo 180◦, since then the two input tones are linearly independent. The calibration is more robust if the phases are close to quadrature.

For the moment, we will consider the problem of just measuring a single-tone cos(2πkt/T +θ). For calibration using hardware, an arbitrary waveform generator (AWG) can very accurately produce a sinusoid at the frequencykt/T; see Figure 2.13 for a diagram of the experimental setup. The issue with this procedure is that the phaseθof the incoming signal is unknown. The AWG cannot control phase, nor is it possible to accurately estimate the phase delay during travel from the AWG to the chip.

system, Φcrude. This can be created from any of the methods described above, such as a Bernoulli

model, or a Simulink calibrated model. The better this estimate is, the more accurate the phase estimation will be. Letb=S(cos 2πkt/T +θ) be the measurements. Then we solve

ˆ

θ=]argmin

A∈C

kb−ΦcrudeAei2πkt/Tk2 (2.3.6)

wheret is a Nyquist time grid. This estimation is a 2-dimensional least squares problem which can be efficiently solved, similar to the method mentioned in§2.4.2.

It is likely that the crude estimate Φcrude has different alignment than the true hardware, so the

estimate ˆθ will be off. The biggest source of error is a shift in the bit sequence. Thus the above procedure can be repeated for a shifted version of Φcrude. For every shift, we generate a new estimate

of the phase; using this phase estimate, we compute the sample error, and pick the shift that has the least error; see Figure 2.17. If Φcrude is a Bernoulli matrix, then shifting it is trivial. For a Simulink

calibrated matrix of sizeNmin, exactlyNmin/Nchipof the possibleNintshifts can be easily generated

by shifting the matrix. IfNchipandNint are relatively prime, this is all of the shifts. In our system, Nchip= 128 and Nint= 100, so only 32 of the possible 128 shifts are generated by shifting the rows

and columns of Φcrude. To generate the other shifts, we need to build up the impulse response of 3

other Φcrude matrices, each with a shift from a different co-set.

The estimation problem is parametric, with θbeing determined by 2 parameters (or 1 complex parameter), and the shifts being determined byNint parameters. IfT is short, thenbonly has a few

entries, so this problem is ill-posed. However, hardware measurements can easily generate long T

samples. Furthermore, the shift of the chipping sequence is fixed regardless of the signal measured, so all the data can be combined to estimate the best shift of the chipping sequence. Hence the problem is estimating about 256 parameters from a dataset of size on the order of 104 to 106, and

hence should be extremely accurate. The shift of the PRBS is estimated separately for each channel since each channel may see slightly different delays, but the shifts are expected to be similar, so this helps the estimation.

The crude model Φcrudemay not account for some complicated properties of the system, such as

the phase response of the various filters, and this will lead to systematic errors in the phase estimation which are frequency dependent. However, preliminary tests (using Simulink as the “real” device, and a Bernoulli Φcrude) suggest that the error is a smooth function of phase and also concentrated

at low frequency. Thus it may be possible to correct for this; even if it is not corrected, the effect on reconstruction may be small; see Figure 2.16.

We now return to the issue of finding the response of the system to two signals of the same frequency but of different phase. Let θ1 and θ2 be the phases of the two input tones, each of grid

0 2 4 6 8 10 12 14 16 18 124 124.2 124.4 124.6 124.8 125 125.2 125.4 125.6 125.8 126 P h a se es ti m a te (d eg re es ) data chunk 0 20 40 60 80 100 120 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 r e la t iv e e r r o r PRBS offset ch1 ch2 ch3 ch4 ch5 ch6 ch7 ch8

Figure 2.17: Phase blind calibration. Showing preliminary results from late March, 2011, using a single frequency input. This is real hardware data, using a Bernoulli Φcrude. Left: the estimated phase for different data sets (single

channel shown). Right: since there is no absolute time reference, the PRBS sequence needs to be aligned. The estimated shift of the sequence is the location of the minimum. Each channel shows a similar minimum, which indicates the method works. This is calculated from a single data set; by including more data sets, the data will improve.

the manner just described. A more accurate method is to record 2Nmin measurements of a single

input tone; letTmin =Nmin∆T. Recall that T =N∆T. If the input is x(t) = cos(2πkt/T +θ1),

then we consider x1 =x(t) as the first signal, and x2 =x(t+Tmin) as the second signal. This is

equivalent tox2 =x(2πkt/T +θ2) whereθ2 =θ1+ 2πkTmin/T. Thus x2 is linearly dependent on x1 wheneverkTmin/(2T) = 2kNmin/(N)∈Z. If N > Nmin, then there are some frequenciesk for

which this is not an integer, and hence we simply use the second set of measurements to complete the characterization of this frequency (andθ1 and θ2are now jointly estimated). If the quantity is

not an integer but lies close to an integer, then we can improve robustness by skipping ahead by a few more blocks ofNmin.

For frequencies k where this is an integer (if N = Nmin, this is all frequencies) then θ2 = θ1 mod 180 so the samples are linearly dependent. In this situation, we generate several sets of

measurements from the AWG, and most likely each waveform will have a different phase. These phases are estimated separately and then combined. Note that if N is prime, then this situation will never occur, though it may not be robust. A large prime value ofN, withN Nmin, will be a

more robust choice, though it will require more measurements.

When N > Nmin, then the Φ and ΦFFT matrices have unnecessary columns. If necessary, the

time-domain version Φ can just remove the extra columnsafter being created by an inverse DFT of the larger ΦFFT. This will induce a few errors (since the time vectors should really be thought of as

the inverse DFT of the frequency vectors, not as a inherently meaningful themselves), but should not be significant.

This calibration system is in the process of being implemented on the RMPI chip. A com- puter controls the entire process, but it is far from trivial since several thousand sets of precise measurements must be taken. Preliminary results are shown in Figure 2.17 which indicate the

method consistently estimates phase and shift parameters. These results show the the phase and shift estimates of a 1 GHz signal collected from hardware measurements, and using Φcrude for the

estimation.

We note that changing the ADC ratefADC, and henceTint, is one of the easiest system parameters

to modify. ChangingTint from 100 to 96 makes a big change, since now Nmin= LCM(Nchip, Nint)

is 384 instead of 3200, so it would be possible to build a calibration model using a smaller N since the only requirement is thatN ≥384.

An alternative to the phase blind calibration is to use the accurate SPICE model for calibration, since then the input signal is known exactly. However, since the Cadence software is run on a single computer, it would take about a month of computational time to record N = 1024 signals, so we favor the hardware-based approach.