-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphaseMons.tex
1057 lines (802 loc) · 116 KB
/
phaseMons.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
\newchapter{phaseMons}{Phase Monitor Characterisation and Performance}
In order to successfully correct the phase with the PFF system it is clearly necessary to be able to accurately measure the phase, whilst meeting the low latency and high bandwidth requirements of the correction. Purpose-built phase monitors for the PFF system have been designed and constructed by INFN, Italy \cite{phMonEuCard}. Three of these monitors are currently installed at CTF3 --- two in the CT line at the end of the linac and one after the TL2 chicane in the TBL line. The approximate positions of the monitors are shown on the layout of the PFF system in Figure~\ref{f:ctfpffLayout}. The two ``upstream'' phase monitors in the CT line will be referred to as Mon~1 and Mon~2 (Mon~1 being upstream of Mon~2 in the beam line) in this chapter. The ``downstream'' phase monitor in TBL will be referred to as Mon~3. Mon~1 is normally used as the PFF correction input, with the neighbouring Mon~2 used for performance cross-checks. Mon~3 is then used to measure the effect of the PFF correction. In the rest of the thesis the phase measurements are generally simply referred to as being from either one of the upstream phase monitors, or the downstream monitor.
The chapter begins with an overview of the design and installation of the phase monitors themselves as well as the associated electronics.
For the purposes of the PFF prototype the design of the electronics is fixed, with no possibility to make major modifications after the initial construction. This chapter describes the process of maximising the performance of these electronics, focusing on operational procedures, performance measurements and necessary setup and hardware changes.
A resolution, or sensitivity to phase, of below \(0.14^\circ\) was achieved (Section~\ref{s:resolutionMeas}), as derived to be necessary to be able to measure \(0.2^\circ\) corrected phase jitter with the PFF system in Section~\ref{s:resolutionEqs}. Several effects have also been identified that can still degrade the accuracy of the phase measurement, such as the position dependence seen in Section~\ref{s:monPosition}, and suggestions for further investigations are given, should an improvement in phase monitor performance be needed in the future.
\newsection{phaseMonDesign}{Phase Monitor Design}
The phase monitors are cylindrical cavities with an external device length of approximately 19~cm and an internal diameter of 23~mm, as shown in Figure~\ref{f:phMonTechDraw}. When a charged beam traverses a cavity the interaction of the beam with the cavity walls creates electromagnetic fields inside the cavity. The amplitude of the induced fields depends both on the bunch charge and the bunch length \cite{alexPFFWP}. Small ridges (called notch filters) in the cavity, see Figure~\ref{f:notchFilters}, create a volume resonating at 12~GHz (the CLIC drive beam frequency) that contains the beam induced fields and reflects any stray 12~GHz fields, preventing them from disturbing the signal. Four rectangular slots, arranged in horizontal and vertical pairs, around the mid-point of the cavity are then used to extract the beam induced resonant fields. The fields leaving the cavity are transported in short rectangular waveguides before a transition to a 50~\(\mathrm{\Omega}\) coaxial cable via an RF feedthrough \cite{phMonIPAC10}. The output of the phase monitor cavities is therefore four 12~GHz signals whose time structure depends on the arrival time, or phase, of the drive beam bunches.
\begin{figure}
\centering
\includegraphics[width=0.8\textwidth]{Figures/phaseMons/phMonTechDraw}
\caption{Technical drawing of the phase monitor cavity design \cite{phMonTechDraw}. The length and internal diameter of the monitor are shown. Around the centre of the monitor are the four evenly spaced RF feedthroughs.}
\label{f:phMonTechDraw}
\end{figure}
\begin{figure}
\centering
\includegraphics[width=0.8\textwidth]{Figures/phaseMons/notchFilters}
\caption{Schematic of phase monitor design \cite{phMonEuCard}.}
\label{f:notchFilters}
\end{figure}
The solutions to Maxwell's equations in cavities such as this give a discrete set of transverse electric (TE) and transverse magnetic (TM) modes dependent on the geometry of the cavity \cite{collinsWvGd}. TE modes are characterised by having only transverse electric field components, and no longitudinal electric field component, whereas TM modes have only transverse magnetic field components and no longitudinal magnetic field component. Each TM and TE mode has an associated cutoff frequency dependent on the number of half-period variations, \(n\) and \(m\), in the field horizontally and vertically across the cavity respectively. The amplitude of the 12~GHz signals output from the cavity will contain components of each TM and TE mode with a cutoff frequency below 12~GHz. For cylindrical cavities the cutoff frequency of the TM modes are defined as \cite{collinsWvGd}:
\begin{equation}
f_{nm} = \frac{c}{2\pi}\frac{p_{nm}}{a}
\end{equation}
And for the TE modes as:
\begin{equation}
f_{nm} = \frac{c}{2\pi}\frac{p'_{nm}}{a}
\end{equation}
where \(a\) is the radius of the cavity, \(p_{nm}\) is the \(m^\mathrm{th}\) zero of the Bessel function \(J_n(x)\), and \(p'_{nm}\) is the \(m^\mathrm{th}\) zero of the derivative of the Bessel function \(J'_n(x)\) \cite{kreyszig}. The beam pipe around the location of the phase monitors at CTF3 is usually 4~cm in diameter, and a cavity of this size would support six separate TM or TE modes with a cutoff frequency below 12~GHz \cite{phMonIPAC10}. It is for this reason that the phase monitor diameter was reduced to 23~mm, where only two modes are present: TM01 at 4.98~GHz (\(n=0,~m=1,~p_{01}=2.4\)) and TE11 at 3.74~GHz (\(n=1,~m=1,~p'_{11}=1.8\)).
TM01 is referred to as the monopole mode and TE11 as the dipole mode. The induced field distribution resulting from a bunch entering the cavity for both modes is shown in Figure~\ref{f:transModes}. The precise expressions for each field distribution can be found in \cite{lipka}. When the beam has been correctly setup it should enter the phase monitor cavity close to its centre.
For small (horizontal or vertical) offsets between the beam position and the cavity centre there is no dependence of the monopole mode amplitude on the incoming beam position. However, the amplitude of the dipole mode does depend on the beam position, even for small offsets from the cavity centre.
This means the amplitude of any of the four individual RF outputs from the monitor will have a position dependence. This property is used in cavity beam position monitors (BPMs) \cite{lipka}, but is undesirable for a phase monitor where the measurement should be position independent. For a 1~mm beam position offset the dipole mode is expected to have around 10\% the amplitude of the monopole mode \cite{alexCWS13}.
\begin{figure}
\centering
\includegraphics[width=0.8\textwidth]{Figures/phaseMons/monopole}
\includegraphics[width=0.86\textwidth]{Figures/phaseMons/dipole}
\caption{Field distribution of Monopole (TM01) and dipole (TE11) modes in the phase monitor cavities. The dipole mode has both horizontal and vertical components - only the horizontal component is shown.}
\label{f:transModes}
\end{figure}
To remove the unwanted dipole mode the horizontal and vertical pairs of outputs from the cavities are combined, as the mode is symmetric and has equal magnitude but opposite sign on each side of the cavity. The CTF3 beam is generally more stable in the vertical plane (the majority of bends in the beam line are horizontal, so energy related orbit jitter resulting from dispersion is larger in the horizontal plane), thus the vertical pair of RF feedthroughs from the monitors are normally used. The two outputs are summed using 180 degree hybrids \cite{alexCWS13} installed next to the phase monitor cavities in the machine hall. The horizontal pair is also instrumented in the same way but the outputs are typically not used. For an ideal (perfectly symmetric) cavity and hybrid this would create an output with only the position independent monopole mode present. In reality small misalignments, for example in the waveguides and RF feedthroughs, cause slight asymmetries in the cavity and signal combination which leaves a small residual dipole component. The signal combination in the hybrids is expected to reduce the dipole amplitude by a further 20~dB at a 1~mm offset, giving a final amplitude around \(1\%\) of the monopole mode \cite{alexCWS13}. The remaining position dependence of the phase measurement is discussed in Section~\ref{s:monPosition}.
\afterpage{\begin{landscape}
\begin{figure}
\centering
\includegraphics[width=0.8\hsize]{Figures/phaseMons/phMonCTPic}
\caption{Annotated picture of the two upstream phase monitors installed in the machine.}
\label{f:phMonCTPic}
\end{figure}
\end{landscape}}
Figure~\ref{f:phMonCTPic} shows the installation of the upstream phase monitors in the CT line. The installation allows up to three phase monitors to be installed neighbouring each other, with the current two monitors installed in the first and third slots leaving approximately a 20~cm gap between the two. The connections between the four RF feedthroughs on the monitors and the hybrids fixed underneath the monitors can be seen in the figure, with the hybrids combining the horizontal pairs visible and two further hybrids placed on the other side of the beam line for the vertical pairs. The outputs from the hybrids are routed up to the klystron gallery on the floor above the accelerator hall, where they are processed and used for the PFF inputs. The complete phase monitor setup including the cables and electronics adds around 50~ns to the overall PFF latency \cite{alexPriv}. For reference the power level of the three phase monitor signals as measured once they reach the klystron gallery are quoted in Table~\ref{t:monPowers}. These are useful to interpret the results of Section~\ref{s:monSigResponse}, for example. %Mon~3 has a slightly lower power level due to a longer cable being required to transport the signal from the TBL line to the phase monitor electronics placed directly above the CT line.
\begin{table}
\begin{center}
\begin{tabular}{|c c|}
\hline
Monitor & Power \\ \hline
Mon~1 & 27.6~dBm \\
Mon~2 & 29.8~dBm \\
Mon~3 & 24.5~dBm \\ \hline
\end{tabular}
\caption{Power of the phase monitor signals (hybrid sum outputs) measured in the klystron gallery prior to being processed by the phase monitor electronics.}
\label{t:monPowers}
\end{center}
\end{table}
%Bunch length sensitivity: more sensitive to variation in bunch length for longer variations. 5mm bunch length - 50\% amplitude output compared to 0mm. With 1mm bunches 16\% variation in bunch length needed to cause 1\% change in output voltage.
%what is the effect of using 3GHz beam not 12GHz beam?
\newsection{monElectronics}{Phase Monitor Electronics}
The output of the phase monitor cavities (or more precisely the combined output from the hybrids) is a sinusoidal signal with a frequency of \(\omega_{RF} = 11.994\)~GHz (the precise CLIC combined drive beam bunch frequency is 11.994~GHz rather than 12~GHz). This can be expressed as follows:
\begin{equation}
RF(t) = A_{RF}(t)\cos[\omega_{RF} t + \phi(t)]
\end{equation}
where \(A_{RF}(t)\) is the time dependent amplitude (voltage) of the phase monitor signal and \(\phi(t)\) is the time dependent beam phase of interest for the PFF system. The beam based signals from the phase monitors are referred to as the RF signals.
This high frequency signal cannot be digitised directly, so it is multiplied by a similar reference signal to create a lower frequency output that can be digitised, whilst preserving the beam phase information. Mixers are the devices that perform this multiplication. The reference signal is referred to as the local oscillator or LO, and it is usually a continuous sinusoidal signal with constant amplitude \(A_{LO}\) and frequency \(\omega_{LO}\):
\begin{equation}
LO(t) = A_{LO}\cos[\omega_{LO} t]
\end{equation}
The multiplication of the RF and LO signals on the mixer creates an output with the following dependence on each input:
\begin{align}
\mathrm{Mixer}(t) &= RF(t) \times LO(t) \\
\mathrm{Mixer}(t) &= A_{RF}(t)A_{LO}\cos[\omega_{RF} t + \phi(t)]\cos[\omega_{LO} t]
\end{align}
Using trigonometric identities this can be expressed in terms of a high frequency component, with a frequency of \((\omega_{LO} + \omega_{RF})\), and a low frequency component, with a frequency of \((\omega_{LO} - \omega_{RF})\):
\begin{equation}
\mathrm{Mixer}(t) = \frac{A_{RF}(t)A_{LO}}{2}\left\lbrace\cos[(\omega_{LO} + \omega_{RF})t + \phi(t)] + \cos[(\omega_{LO} - \omega_{RF})t + \phi(t)]\right\rbrace
\end{equation}
The high frequency component can then easily be removed using a low pass filter, so that the mixer output becomes:
\begin{equation}
\mathrm{Mixer}(t) = \frac{A_{RF}(t)A_{LO}}{2}\cos[(\omega_{LO} - \omega_{RF})t + \phi(t)]
\label{e:mixOutAnyFreq}
\end{equation}
Finally, by using a reference LO signal with the same frequency as the RF signal, which is the case for the phase monitor electronics presented here, this simplifies to:
\begin{equation}
\mathrm{Mixer}(t) = \frac{A_{RF}(t)A_{LO}}{2}\cos[\phi(t)]
\label{e:mixOutSameFreq}
\end{equation}
The resulting mixer output is therefore a low frequency signal that depends only on the amplitude of the RF signal and the phase (as well as the constant LO amplitude).
\begin{figure}
\centering
\includegraphics[width=0.7\textwidth]{Figures/phaseMons/mixerFrontPanel}
\caption{Front panel of the phase monitor electronics boxes containing the mixers and diodes. The connectors labelled LO and RF take the signals from the LO source and the phase monitors respectively. The connectors labelled \(A^2\) and \(A\sin(\mathrm{phi})\) are the diode and mixer outputs respectively.}
\label{f:mixerFrontPanel}
\end{figure}
To use the mixer output to calculate the phase, the voltage of the RF signal, \(A_{RF}\), must be known. This can be determined by splitting the RF signal between the mixer and a diode detector, whose output is dependent on the power of the signal (the square of the voltage):
\begin{equation}
\mathrm{Diode}(t) = A_{RF}(t)^2
\label{e:idealDiode}
\end{equation}
The phase can then be reconstructed from the mixer and diode outputs as follows:
\begin{align}
&\frac{\mathrm{Mixer}(t)}{\sqrt{\mathrm{Diode}(t)}} = A\cos[\phi(t)] \label{e:mixOverSqrtDio} \\
&\phi(t) = \arccos\left[\frac{\mathrm{Mixer(t)}}{A\sqrt{\mathrm{Diode(t)}}}\right]
\label{e:phaseRecIdeal}
\end{align}
where \(A\) is a calibration constant dependent on the amplitude of the LO. The electronics for the three PFF phase monitors use mixers and diodes as described above to produce signals that are dependent on the phase and amplitude of the output from the phase monitor cavities. Figure~\ref{f:mixerFrontPanel} shows the front panel of one of the sets of the electronics, showing the RF and LO inputs and mixer and diode outputs. The mixer and diode outputs are digitised, with the phase calculation above performed after the digitisation rather than by the phase monitor electronics themselves.
\afterpage{\begin{landscape}
\begin{figure}
\centering
\includegraphics[width=\hsize]{Figures/phaseMons/phaseMonDiagram}
\caption{Simplified schematic of the phase monitor electronics setup. The components involved in the generation of the LO are shown in blue, the phase monitor beam signal in green and the outputs in red. For the purposes of the diagram only two individual mixers and diodes are shown. In the actual design the input signals are split between eight mixers and diodes, and then combined in the same way to create the two outputs. The outputs are digitised on either the FONT5a board or the SiS digitisers.}
\label{f:phaseMonDiagram}
\end{figure}
\end{landscape}}
In order to avoid non-linearities and achieve the target resolution (Section~\ref{s:resolutionEqs}), multiple mixers and diodes are used within each set of electronics. Non-linearities in the response of mixers and diodes are typically worse at higher input powers \cite{alex09}, but higher input powers are desirable to improve the signal to noise ratio of the output. With a single mixer and diode a compromise must therefore be made between the accuracy (linearity) and resolution (noise) of the electronics. To be able to operate the mixers at low power whilst maintaining a good signal to noise ratio eight separate mixers and diodes are used in each set of electronics \cite{alex09}. The RF and LO inputs are split between the eight mixers and diodes, and then the eight outputs of each type are added together to create the final mixer and diode outputs from the electronics. Figure~\ref{f:phaseMonDiagram} shows a simplified example of this with two mixers and diodes.
Figure~\ref{f:phaseMonDiagram} also shows all the elements present in the generation of the LO reference signal for the electronics. The LO signal for all three sets of electronics is generated from a common 3~GHz source that is locked to the timing of the CTF3 drive beam (which has a 3~GHz acceleration frequency). The 3~GHz signal is split into three to provide the LO input for each set of electronics. After the split each LO chain includes a phase shifter, bandpass filter, frequency multiplier and an amplifier. The phase shifters are required for the calibration process as discussed in Section~\ref{s:monCalibrations}. Initially these were 3~GHz digital phase shifters of type \cite{reyShifters}, but these were later replaced with passive mechanical phase shifters to reduce noise on the LO (Section~\ref{s:shifters}). The mechanical shifters are of type \cite{mechPhShift}, and can be changed in units of 0.02 degrees at 4~GHz. After the shifters, a bandpass filter \cite{klFilter} removes any unwanted out of frequency noise in the LO signal, the frequency multiplier \cite{freqMulti} increases the frequency of the LO to 11.994~GHz and finally the amplifier \cite{amp12GHz} is used to boost the power of the LO signals to the level seen in Table~\ref{t:loPowers}. The LO is designed to have a stability of 5~fs, or 0.02 degrees at 12~GHz \cite{alex09}.
\begin{table}
\begin{center}
\begin{tabular}{|c c|}
\hline
LO & Power \\ \hline
LO~1 & 22.6~dBm \\
LO~2 & 23.6~dBm \\
LO~3 & 25.5~dBm \\ \hline
\end{tabular}
\caption{Power of the LO inputs to the phase monitor electronics.}
\label{t:loPowers}
\end{center}
\end{table}
Figure~\ref{f:phaseMonRack} shows the complete phase monitor electronics installation in the racks in the klystron gallery.
\pagebreak
\begin{figure}
\centering
\includegraphics[width=\textwidth]{Figures/phaseMons/phaseMonRack}
\caption{Annotated picture of the phase monitor electronics rack in the klystron gallery.}
\label{f:phaseMonRack}
\end{figure}
\FloatBarrier
\newsection{resolutionEqs}{Resolution Definition and Requirements}
The performance of the PFF system clearly depends on the resolution with which the phase can be measured. Many of the measurements in this chapter are therefore focused on the phase monitor resolution, or more precisely on the resolution of the combined phase monitor and electronics setup. The resolution is defined as the noise between the measured phase and the true beam phase, and is a measure of the uncertainty of the instrument. It can be calculated by comparing the difference between the measured phase of two monitors. This is why two phase monitors, Mon~1 and Mon~2, are installed neighbouring each other in the upstream system in the CT line. The beam phase should be identical in these two monitors thus their measurements can always be compared to derive the resolution.
The precise derivation of the resolution dependent on the measurement of two monitors is as follows. First, the measured phase, \(\phi_x(t)\) and \(\phi_y(t)\), in two monitors at time \(t\) can be defined as:
\begin{align}
\phi_x(t) &= \phi_b(t) + n_x(t) \label{e:resEq1} \\
\phi_y(t) &= \phi_b(t) + n_y(t) \label{e:resEq2}
\end{align}
where \(\phi_b(t)\) is the true beam phase and \(n_x(t)\) and \(n_y(t)\) is the noise on the measurement at that time. The time dependence will not be written explicitly from this point. These equations assume the beam phase is identical in each monitor, as should be the case for Mon~1 and Mon~2. The variance of each phase monitor measurement can then be derived from the equations above by adding the variance of the beam phase and the noise in quadrature:
\begin{align}
\sigma_x^2 &= \sigma_b^2 + \sigma_{nx}^2 \label{e:measJitWithRes} \\
\sigma_y^2 &= \sigma_b^2 + \sigma_{ny}^2
\end{align}
where \(\sigma_x\) and \(\sigma_y\) are the phase jitters measured by each phase monitor, \(\sigma_b\) is the true beam phase jitter and \(\sigma_{nx}\) and \(\sigma_{ny}\) are the phase monitor resolutions. The covariance terms are not considered as it is assumed the beam phase and the noise are uncorrelated. Assuming the magnitude (standard deviation) of the noise, \(\sigma_n\), is the same for each phase monitor, this can be simplified to \(\sigma_x^2~=~\sigma_y^2~=~\sigma_b^2~+~\sigma_n^2\).
The quantity of interest for calculating the phase monitor resolution is the jitter in the difference between the two measured phases, \(\sigma_{x-y}\). The variance of the difference between two correlated variables is defined as:
\begin{align}
\sigma_{x-y}^2 &= \sigma_x^2 + \sigma_y^2 - 2\sigma_x\sigma_y\rho_{xy} \\
\end{align}
where \(\rho_{xy}\) is the correlation between the phase measurement of \(x\) and \(y\). Substituting in the previously derived expressions for \(\sigma_x\) and \(\sigma_y\) this becomes:
\begin{align}
\sigma_{x-y}^2 &= 2(\sigma_b^2 + \sigma_n^2)(1-\rho_{xy})
\end{align}
The correlation coefficient \(\rho_{xy}\) depends on the covariance between \(x\) and \(y\), \(\mathrm{cov}[x,y]\), as follows:
\begin{align}
\rho_{xy} &= \frac{\mathrm{cov}[x,y]}{\sigma_x\sigma_y} = \frac{\mathrm{cov}[x,y]}{\sigma_b^2+\sigma_n^2} \\
\end{align}
where the covariance is defined as:
\begin{align}
\mathrm{cov}[x,y] = \frac{1}{N}\sum_{i=1}^{N}\phi_{xi}\phi_{yi} \\
\end{align}
Substituting in the expressions for \(\phi_{x}\) and \(\phi_{y}\) above and separating the terms in the sum then gives the following expression for the covariance of \(x\) and \(y\):
\begin{equation}
\begin{gathered}
\mathrm{cov}[x,y] = \frac{1}{N}\sum_{i=1}^{N}(\phi_{bi}+n_{xi})(\phi_{bi}+n_{yi}) \\
\mathrm{cov}[x,y] = \frac{1}{N}\sum_{i=1}^{N}\phi_{bi}^2 + \frac{1}{N}\sum_{i=1}^{N}\phi_{bi}n_{xi} + \frac{1}{N}\sum_{i=1}^{N}\phi_{bi}n_{yi} + \frac{1}{N}\sum_{i=1}^{N}n_{xi}n_{yi}
\end{gathered}
\end{equation}
The first term is the definition of the variance of the beam phase, \(\sigma_b^2\). The remaining terms are the covariance between the beam phase and the monitor noises, and the covariance between the two monitor noises. Assuming the noise is uncorrelated all these terms are zero. The remaining equation for the covariance between \(x\) and \(y\) is therefore simply: \(\mathrm{cov}[x,y] = \sigma_b^2\). Finally, the correlation between the phase measurement of \(x\) and \(y\) becomes:
\begin{align}
\rho_{xy} &= \frac{\sigma_b^2}{\sigma_b^2 + \sigma_n^2}
\label{e:corrVsResolution}
\end{align}
Substituting this expression for the correlation in to the derived equation for the variance between the two phase measurements gives the following simple dependence on the phase monitor resolution:
\begin{equation}
\begin{gathered}
\sigma_{x-y}^2 = 2(\sigma_b^2 + \sigma_n^2)\left(1-\frac{\sigma_b^2}{\sigma_b^2 + \sigma_n^2}\right) \\
\sigma_{x-y}^2 = 2\sigma_n^2 \label{e:pffVsResolution}
\end{gathered}
\end{equation}
Finally, the resolution is defined as:
\begin{align}
\sigma_n = \frac{\sigma_{x-y}}{\sqrt{2}}
\label{e:resolutionEq}
\end{align}
In terms of a resolution calculation these equations only apply to the two upstream phase monitors, for which the assumption that the beam phase is identical in each monitor (made in Equations~\ref{e:resEq1}~and~\ref{e:resEq2}) is valid. All the resolution values quoted in this chapter use this equation and the difference between the measurement of Mon~1 and Mon~2.
However, as the PFF system can also be thought of as subtracting two phases (removing the upstream phase from the downstream phase) the same equations can be directly applied to determine the limitations that the phase monitor resolution places on the PFF performance. Equation~\ref{e:pffVsResolution} shows that the lowest possible measured corrected downstream phase jitter is a factor \(\sqrt{2}\) times larger than the phase monitor resolution. In order to reduce the measured downstream phase jitter to the CLIC target of \(0.2^\circ\) the phase monitor resolution must therefore be better than \(0.14^\circ\). Equation~\ref{e:corrVsResolution} shows that with this \(0.14^\circ\) resolution and a typical beam phase jitter of \(0.8^\circ\) (Section~\ref{s:origJitter}) the measured correlation between two phase monitor measurements would be \(97\%\).
It is important to make the distinction here between the measured downstream phase jitter, and the actual beam phase jitter. The theoretical limit on the corrected beam phase jitter is in fact the resolution of the upstream phase monitor (the PFF input). Adding the downstream monitor resolution to this beam jitter in quadrature gives the theoretical limit of \(\sqrt{2}\) times the resolution in the measured corrected phase jitter (assuming both monitors have the same resolution). Therefore, a resolution of \(0.2^\circ\) is theoretically sufficient to be able to achieve CLIC level phase stability. Nevertheless, in practice the theoretical limit will always be difficult to achieve in a real world system. Ideally it should be possible to measure \(0.2^\circ\) corrected downstream jitter, with noise from the phase monitor only making a small contribution to this value. For this reason a phase monitor resolution of closer to \(0.1^\circ\) would be preferable for the CLIC PFF system.
\newsection{monDigitisers}{Digitisation of Phase Monitor Signals}
The mixer and diode outputs from the phase monitor electronics are digitised for the signals to be processed and used for the PFF correction and offline data analysis. Two different types of analogue to digital converters (ADCs) have been used to digitise the phase monitor signals --- the Texas Instruments ADS5474 ADCs \cite{fontADCs} on the purpose-built FONT5a board used as the PFF controller, and a commercially available SiS 3320 digitiser \cite{sisDigi}. The design and use of the FONT5a board is discussed in more detail in Section~\ref{s:fontSetup}. Table~\ref{t:adcSpecs} summarises the specifications of each type of ADC.
The SiS digitisers are used in addition to the FONT5a board as the PFF correction (running on the FONT5a board) is operated as a standalone system independent from other acquisition systems at CTF3. The PFF algorithm requires only the signals from one of the upstream phase monitors to be connected to the FONT5a board, with the convention being to use Mon~1. Mon~2 and Mon~3 are then normally connected to the SiS digitisers instead. The SiS digitisers are setup with the same trigger and sampling frequency (192~MHz) used for other signals at CTF3, and data from them can be acquired together with other devices using the standard systems in place at CTF3. This allows the Mon~2 and Mon~3 signals to be easily compared to other measurements, such as beam position signals, which has been indispensable for optimising the setup of the PFF system and in particular the phase propagation (Chapter~\ref{c:phasePropagation}). The FONT5a board is usually used with an independently sourced 357~MHz clock.
\begin{table}
\begin{center}
\begin{tabular}{|c c c c c|}
\hline
Digitiser & No. ADCs & Resolution & Input Range & Sampling Rate \\ \hline
SiS 3320 & 8 & 12-bit & \(\pm2.5\)~V & up to 250~MHz \\
FONT5a & 9 & 14-bit (13-bit used) & \(\pm0.5\)~V & up to 400~MHz \\ \hline
\end{tabular}
\caption{Specifications of the ADCs on the FONT5a board and SiS digitisers.}
\label{t:adcSpecs}
\end{center}
\end{table}
Digitising the phase monitor signals contributes additional noise to the overall phase monitor electronics setup. The purpose of this section is to show that the digitiser noise makes only a negligible contribution to the resolution on the phase measurement. The main parameters of interest needed to determine this are the input range and resolution of the ADCs, with the SiS ADCs being 12-bit with a range of \(\pm2.5\)~V and the FONT5a ADCs being 13-bit with an input range of \(\pm0.5\)~V. The full 5~V peak-to-peak input range of the SiS ADCs is therefore split across \(2^{12}=4096\) values, or ADC `counts', with each count corresponding to roughly 1.2~mV. The equivalent 1~V peak-to-peak range and \(2^{13}=8192\) counts of the FONT5a board corresponds to a factor 10 lower interval of 0.12~mV per ADC count. This already indicates that the FONT5a board should give a much smaller contribution to the phase resolution than the SiS digitisers.
Figure~\ref{f:digitiserNosie} shows the ADC noise, converted from counts in to an equivalent voltage, for both the SiS and FONT5a ADCs. As expected the noise on the FONT5a board is much lower than on the SiS digitisers. The actual ADC jitter values are \(1.47\pm0.04\)~counts or \(0.179\pm0.005\)~mV on the FONT5a board, and \(1.11\pm0.03\)~counts or \(1.36\pm0.03\)~mV on the SiS digitisers. These values can be converted in to an equivalent phase jitter using the phase reconstruction method described later in Section~\ref{ss:sigGenConsq} and the monitor calibration constants determined in Section~\ref{s:monCalibrations}. For reference the peak output of the three phase monitor mixers varies between approximately 400~mV and 500~mV, which is well matched to the input range of the FONT5a ADCs. Taking the worst case scenario of Mon~3, which gives the lowest output voltage, the ADC jitter corresponds to \(0.025\pm0.001^\circ\) on the FONT5a board but \(0.198\pm0.005^\circ\) on the SiS digitisers. These values are summarised in Table~\ref{t:adcNoise}.
\begin{figure}
\centering
\includegraphics[width=0.9\textwidth]{Figures/phaseMons/digitiserNosie}
\caption{Comparison of noise on the output of the SiS (blue) and FONT5a (red) ADCs.}
\label{f:digitiserNosie}
\end{figure}
As derived in the Section~\ref{s:resolutionEqs} the phase resolution must be better than \(0.14^\circ\), or ideally close to \(0.10^\circ\), in order to achieve a measured corrected downstream phase jitter of \(0.20^\circ\) with the PFF system. The \(0.03^\circ\) contribution of ADC noise on the FONT5a board is therefore insignificant compared to the resolution requirements. However, although it does not directly impact the PFF performance the \(0.20^\circ\) ADC jitter on the SiS digitisers would greatly degrade the resolution of the measurements of Mon~2 and Mon~3 usually connected to the SiS~digitisers and used for offline data analysis of the PFF results.
The high phase jitter contribution from the SiS digitisers originates from the roughly 500~mV maximum mixer output being much lower than the SiS ADC range of \(\pm2.5\)~V. In order to rectify this the mixer outputs are boosted by roughly a factor 2.5 in voltage using an amplifier prior to the SiS digitisers. The specifications of the amplifier used are documented in \cite{ampSiS}. With the amplifier in place the peak signal level sent to the SiS digitisers is around 1~V, and the equivalent phase jitter is reduced to \(0.078\pm0.002^\circ\). This no longer prevents \(0.14^\circ\) resolution from being achieved on measurements using the SiS digitisers, as proven later in Section~\ref{s:resolutionMeas}. A small further improvement in measured resolution could be achieved using a different amplifier and boosting the peak output voltage closer to 2~V.
\begin{table}
\begin{center}
\begin{tabular}{|c c c c|}
\hline
Digitiser & Jitter [counts] & Jitter [mV] & Phase Jitter [degrees] \\ \hline
FONT5a & \(1.47\pm0.04\) & \(0.179\pm0.005\) & \(0.0245\pm0.0007\)\\
SiS 3320 & \(1.11\pm0.03\) & \(1.36\pm0.03\) & \(0.198\pm0.005\)\\
SiS 3320 Amplified & \(1.11\pm0.03\) & \(1.36\pm0.03\) & \(0.078\pm0.002\)\\ \hline
\end{tabular}
\caption{ADC jitter on the FONT5a board, SiS digitisers and with the mixer outputs amplified prior to the SiS digitisers expressed in terms of ADC counts, volts and and equivalent phase jitter. Measured in-situ at CTF3 but in the absence of a beam signal.}
\label{t:adcNoise}
\end{center}
\end{table}
\newsection{sinFitAlgorithm}{Fitting Method}
Due to the dependence of the mixer output on \(\cos(\phi)\) as seen in Section~\ref{s:monElectronics}, many of the measurements in this chapter require a sinusoidal fit of the form:
\begin{equation}
y = A\sin(bx + c) + d
\label{e:generalSinEq}
\end{equation}
The use of sine rather than cosine makes no difference to the fitted amplitude, \(A\), and offset, \(d\) which are usually the only parameters of interest in this chapter. It is also convenient to consider a mixer output of zero to correspond to zero phase (rather than \(90^\circ\) as in Equation~\ref{e:mixOverSqrtDio}). All the fits of this type have been performed using a weighted nonlinear least squares fit implemented in MatLab fitting libraries \cite{MatLabFit}. Each data point is weighted by the inverse of its standard error squared.
Care must be taken to select suitable initial values for the four parameters in the fit in order to avoid local minima and ensure a reasonable fit. This is particularly important for a sinusoidal fit as there are many solutions with different frequencies and phase offsets that can match the data. The frequency, \(b\), is the most critical parameter but usually this is already known, being defined by the properties of the phase monitors and electronics, for example. Initial values for the three remaining parameters are estimated as follows:
\begin{align}
A &= \frac{\mathrm{max}(y)-\mathrm{min}(y)}{2} \\
d &= \frac{\mathrm{max}(y)+\mathrm{min}(y)}{2} \\
c &= \arcsin\left(\frac{y-d}{A}\right) - bx
\end{align}
The amplitude, \(A\), and offset, \(d\), of the sine curve are simply estimated by comparing the minimum and maximum output. These initial values are therefore highly biased by any large outliers around the minimum and maximum output, but this is rarely the case for the application here and these simple estimators are sufficient.
Rearranging Equation~\ref{e:generalSinEq} gives the expression for \(c\) above. Due to its use of arcsin the equation is only valid in the first and fourth quadrants, between \(-\pi/2\) and \(+\pi/2\) where the gradient of the sine curve is positive. The \(y\) value at each data point is compared to its neighbours to determine whether it is on the rising slope, in order to meet this criterion. The initial value of \(c\) is the mean value calculated across all the data points that meet this criterion.
\begin{figure}
\centering
\includegraphics[width=0.7\textwidth]{Figures/phaseMons/sinFitEx}
\caption{Example sine fit (red) to generated data with added random noise (blue markers). The dashed green line shows the initial conditions used for the fit with estimated values for the four fit parameters. \(x\) and \(y\) are defined as in Equation~\ref{e:generalSinEq}}
\label{f:sinFitEx}
\end{figure}
Figure~\ref{f:sinFitEx} and Table~\ref{t:sinFitEx} show the results of an example fit using this approach. An initial distribution of points with \(y=\sin(x+1)+1\) is used (\(A = b = c = d = 1\)), with random noise added. An approximate value for \(b\) is assumed to be known (from the phase monitor electronics specifications, as described), thus \(b=1\) is directly used as its initial estimated value. The initial estimates for \(A\) and \(d\) are within a few percent of their true value. The initial estimate for \(c\) is within \(20\%\) of the correct value. After fitting all four parameters are in agreement with the expected values.
\begin{table}
\begin{center}
\begin{tabular}{|c c c c|}
\hline
Parameter & Value & Initial & Fit \\ \hline
\(A\) & 1 & 1.03 & \(0.99\pm0.02\)\\
\(b\) & 1 & 1 & \(1.00\pm0.02\) \\
\(c\) & 1 & 0.81 & \(1.00\pm0.06\) \\
\(d\) & 1 & 0.99 & \(0.99\pm0.02\) \\ \hline
\end{tabular}
\caption{Initial estimates and final fitted values for the four sinusoidal fit parameters for a distribution generated with \(A = b = c = d = 1\) (plus random noise).}
\label{t:sinFitEx}
\end{center}
\end{table}
\newsection{monSigResponse}{Characterisation of Phase Monitor Electronics}
Measurements have been made using a 12~GHz signal generator to determine the performance of the three sets of phase monitor electronics independently from the phase monitors themselves. In particular, these tests were focused on identifying the saturation and cross-talk characteristics of the output mixer and diode signals in order to determine a suitable input power range to use during normal operation.
\subsection{Experimental Setup}
\label{ss:sigGenSetup}
Two changes were made to the setup shown in Figure~\ref{f:phaseMonDiagram} for these tests.
%Firstly, the beam induced signal from the phase monitors usually connected to the RF port of the mixers is replaced by a 12~GHz sine wave from an RF signal generator.
Firstly, a 12~GHz sinusoidal output from an RF signal generator is used as the RF input for the mixers, replacing the beam induced phase monitor signals.
The signal generator output is amplified, allowing the input power to the mixers to be varied in a wide range between 0 and 33dBm, or between 0.2 and 10.0~V in terms of voltage. This range encompasses the input power usually provided by the phase monitor signals (Table~\ref{t:monPowers}). The precise power output to the mixer is verified between each measurement using a power meter.
Secondly, the diode outputs were amplified during these tests (using the same amplifier introduced in Section~\ref{s:monDigitisers}) by a factor 10 in voltage to reduce digitiser noise in the measurement. The non-amplified peak diode output corresponds to 170~mV, rather than the 1.7~V seen in the plots in this section. The \(\pm500\)~mV mixer outputs have not been amplified. Usually the mixer output is amplified and the diode not amplified, as in Figure~\ref{f:phaseMonDiagram}.
There are some differences between the properties of the generated signal and the beam signal that would be used in normal operation. Firstly, unlike the pulsed beam signal the generated signal is continuous. It has been verified that the response of the mixers is equivalent for both the continuous and pulsed signals, at least in terms of output power and saturation levels \cite{jackFONTOct15}. The cross-talk properties are difficult to characterise with beam based measurements alone, but assumed to be similar.
\begin{figure}
\centering
\includegraphics[width=0.9\textwidth]{Figures/phaseMons/Mixer1_AllPowerLevels}
\caption{Response of Mixer 1 to signal generator input. Sampled at 192~MHz (5.2~ns per sample).}
\label{f:sigGenAllMix1}
\includegraphics[width=0.9\textwidth]{Figures/phaseMons/Diode1_AllPowerLevels}
\caption{Response of Diode 1 to signal generator input. Sampled at 192~MHz (5.2~ns per sample).}
\label{f:sigGenAllDio1}
\end{figure}
\begin{figure}
\centering
\includegraphics[width=0.9\textwidth]{Figures/phaseMons/Mixer2_AllPowerLevels}
\caption{Response of Mixer 2 to signal generator input. Sampled at 192~MHz (5.2~ns per sample).}
\label{f:sigGenAllMix2}
\includegraphics[width=0.9\textwidth]{Figures/phaseMons/Diode2_AllPowerLevels}
\caption{Response of Diode 2 to signal generator input. Sampled at 192~MHz (5.2~ns per sample).}
\label{f:sigGenAllDio2}
\end{figure}
\begin{figure}
\centering
\includegraphics[width=0.9\textwidth]{Figures/phaseMons/Mixer3_AllPowerLevels}
\caption{Response of Mixer 3 to signal generator input. Sampled at 192~MHz (5.2~ns per sample).}
\label{f:sigGenAllMix3}
\includegraphics[width=0.9\textwidth]{Figures/phaseMons/Diode3_AllPowerLevels}
\caption{Response of Diode 3 to signal generator input. Sampled at 192~MHz (5.2~ns per sample).}
\label{f:sigGenAllDio3}
\end{figure}
Secondly, the phase of the generated signal does not vary with time, compared to the beam signal which has a large phase sag of around \(40^\circ\) along the pulse and much larger phase jitter. If the signal generator was used at the same frequency as the beam and LO signals, 11.994~GHz, the mixer output would therefore be constant as it depends only on the static phase of the signal generator as per Equation~\ref{e:mixOutSameFreq}. Instead, a generated signal with a slightly lower frequency of 11.991~GHz has been used. From Equation~\ref{e:mixOutAnyFreq} it can be seen that in this case the mixer output voltage is sinusoidal, with a frequency equal to the frequency difference between the LO and RF inputs, or \(11.994-11.991\)~GHz = 3~MHz, with the setup used here. This has the benefit of being able to see the response of the electronics to all input phases in one measurement, rather than having to take multiple measurements varying the LO phase shifter between each one.
\subsection{Results}
\label{ss:sigGenResults}
Figures~\ref{f:sigGenAllMix1}--\ref{f:sigGenAllDio3} show the mixer and diode outputs for all three sets of electronics at each of the input power levels from the signal generator.
%These will be referred back to and discussed in more detail in Sections~\ref{ss:sigGenMixer}~and~\ref{ss:sigGenDiode}. Some initial observations that are immediately clear from these figures are as follows.
All mixer outputs show a sinusoidal oscillation with a frequency of 3~MHz, or around 60 samples at the sampling frequency of 192~MHz, as expected. An oscillation with the same frequency is also visible on the diode outputs, with the largest amplitude for the 2nd set of electronics. This is the first hint of the non-ideal characteristics of the electronics. Finally, the output of the mixer and diode increases with the input power, as expected. At high input powers the outputs begin to saturate.
%This is apparent by observing the diode signals, on which the output is much flatter at the highest power levels, with a much reduced amplitude of oscillation, compared to lower input powers.
The characteristics of the mixers are discussed in Section~\ref{ss:sigGenMixer} and the diodes in Section~\ref{ss:sigGenDiode}.
\subsection{Mixer Performance}
\label{ss:sigGenMixer}
\subsubsection{Sinusoidal Characteristics}
Figure~\ref{f:mixersFit27dBm} shows fits to the response of all mixer outputs at an input power of 27~dBm, close to the typical input power from the beam signals. The phase offset (displacement in peaks) between the output of each mixer holds no significance for the electronics performance. This is set only by the relative phase between the signal generator and the LO at the time the measurement was started. For normal operation with beam the LO phase shifters are changed to match the phasing of each set of electronics (Section~\ref{s:monCalibrations}).
\begin{figure}
\centering
\includegraphics[width=0.8\textwidth]{Figures/phaseMons/mixersFit27dBm}
\caption{Sinusoidal fit to mixer responses at 27~dBm input power. Blue: Mixer~1, Red: Mixer~2 and Green: Mixer~3. Markers show the data points and the lines are sinusoidal fits to the data. Sampled at 192~MHz (5.2~ns per sample). }
\label{f:mixersFit27dBm}
\includegraphics[width=0.8\textwidth]{Figures/phaseMons/mixersFitResid27dBm}
\caption{Residuals to sinusoidal fit at 27dBm. Blue: Mixer~1, Red: Mixer~2 and Green: Mixer~3.}
\label{f:mixersFitResid27dBm}
\end{figure}
The reconstruction of the phase from the mixer output depends on the mixer output being sinusoidal. In particular the maximum mixer output is critical due to the dependence on the amplitude in Equation~\ref{e:phaseRecIdeal}. Each set of electronics has a different output amplitude due to slight differences in the LO power for each set of electronics and between the individual components used. At an input power of 27~dBm Mixer 1 has a higher peak output of 510~mV, compared to 410~mV and 380~mV for Mixer 2 and Mixer 3 respectively.
Overall, the agreement between the actual mixer output and the sinusoidal fits at this input power is good. However, there is some distortion away from the ideal sine curve that is most visible around the maximum and minimum mixer output. Figure~\ref{f:mixersFitResid27dBm} shows the residuals between the mixer outputs and the sine fits for the full mixer output range (from minimum to maximum, or equivalently phase offsets between \(\pm90^\circ\)). In the figure, the plotted residual is the difference between the fit and the data expressed in terms of an equivalent phase offset, \(\Delta \phi\), using:
\begin{equation}
\Delta \phi(t) = \arcsin\left(\frac{V_{MIXER}(t)-V_{FIT}(t)}{A}\right)
\end{equation}
where \(V_{MIXER}(t)\) and \(V_{FIT}(t)\) are the mixer voltage and fitted voltage at sample \(t\) respectively, and \(A\) is the fitted mixer amplitude. On the falling slope between the peaks there is only a slight deviation about the ideal sinusoidal behaviour. The deviation from ideal is at the level of \(0.25\pm0.03^\circ\) and \(0.30\pm0.04^\circ\) for the first and third mixers, with a slightly larger effect of \(0.45\pm0.04^\circ\) for the second mixer. This applies within \(\pm80^\circ\) of the zero crossing in the mixer output. Outside this range, close to the maximum or minimum mixer output, the deviation from the sine fit rapidly increases, reaching several degrees for each mixer. For operation with the beam this means that the accuracy of the phase measurement cannot be guaranteed when the LO phase is set so that the mixer is giving close to its maximum or minimum output. This is also true for other reasons, as seen in Section~\ref{s:resolutionMeas}. The PFF system can only correct small offsets at the level of around \(\pm5^\circ\) (Section~\ref{ss:corrRange}), so the non-ideal response close to peak output is not an issue for the PFF performance.
However, for input powers in the range from 15--21~dBm the non-ideal characteristics of the mixers are larger. One example of this is shown in Figure~\ref{f:mixersFit18dBm}, at an input power of 18~dBm. If input powers in this range are used calibrations of the mixer response should normally be restricted to around the zero crossing so that the fitted amplitude gives the best approximation to the true behaviour for small phase offsets.
\begin{figure}
\centering
\includegraphics[width=0.8\textwidth]{Figures/phaseMons/mixersFit18dBm}
\caption{Sinusoidal fit to mixer responses at 18~dBm input power. Blue: Mixer~1, Red: Mixer~2 and Green: Mixer~3. Sampled at 192~MHz (5.2~ns per sample).}
\label{f:mixersFit18dBm}
\includegraphics[width=0.8\textwidth]{Figures/phaseMons/LinFitMixerVsVolts}
\caption{Linear fit (dashed lines) to the mixer output voltage vs. the input voltage (solid lines with markers). Blue: Mixer~1, Red: Mixer~2 and Green: Mixer~3. The linear fit is restricted to the region marked by vertical black lines. Error bars (not shown) are smaller than the markers.}
\label{f:LinFitMixerVsVolts}
\end{figure}
\subsubsection{Dependence on Input Power}
The mixer output is expected to depend linearly on the input voltage, and the diode on the square of the input voltage. Both these dependences must hold in order to use Equation~\ref{e:phaseRecIdeal} and obtain a phase measurement that does not depend on the input voltage to the electronics (therefore making the calculated phase insensitive to any possible variations in power along the pulse from the beam signal, for example). For these measurements the input voltage can be calculated using the known input power and 50~\(\Omega\) impedance of the electronics.
Figure~\ref{f:LinFitMixerVsVolts} shows the dependence of the mixer output amplitudes on the input voltage. As seen previously the first mixer gives a larger output than the other two mixers. The 2nd and 3rd mixers give a similar response up to an input voltage of 3.5~V (24~dBm).
Linear fits to the mixer outputs restricted to the range between 0.45~V and 1.75~V (6~dBm to 18~dBm) are also shown in the figure.
All three mixers give a linear response up to an input voltage of around 3~V (23~dBm), after which the effects of saturation begin to appear. At an input voltage of 5~V (27~dBm) the first and third mixers are almost fully saturated with almost no remaining power dependence in the output. The second mixer begins to enter saturation at the same voltage as the other two mixers but retains a strong power dependence up to a higher input voltage of 7~V (30~dBm).
\begin{figure}
\centering
\includegraphics[width=0.85\textwidth]{Figures/phaseMons/MixerVsVolts}
\caption{Mixer maximum output voltage (dashed lines with upward triangle markers) and minimum output voltage (dashed lines with downward triangle markers) vs. the input voltage. Solid lines with circular markers show the average of the minimum and maximum. Blue: Mixer~1, Red: Mixer~2 and Green: Mixer~3.}
\label{f:MixerVsVolts}
\includegraphics[width=0.85\textwidth]{Figures/phaseMons/MixerAsymmetryVsVolts}
\caption{Relative amplitude of cross-talk on the mixer from the diode vs. the input voltage. Blue: Mixer~1, Red: Mixer~2 and Green: Mixer~3. Lines with circular markers are the measured data, and dashed lines quadratic fits to the data. Error bars (not shown) are smaller than the markers.}
\label{f:MixerAsymmetryVsVolts}
\end{figure}
\subsubsection{Asymmetry in Output}
One final interesting property of the mixers is that the output is not symmetric about zero, in other words the maximum output voltage is different to the absolute value of the minimum output voltage. This is perhaps most visible looking back to the Mixer~1 output at all power levels in Figure~\ref{f:sigGenAllMix1}, where the maximum output is around \(+0.45~V\) but the minimum output is around \(-0.55~V\).
Figure~\ref{f:MixerVsVolts} shows how the mixer amplitude at maximum and minimum output varies with the input voltage. The asymmetry is largest for Mixer~1 and smallest for Mixer~3. The effect appears to increase in magnitude with the input voltage, with approximately a \(100\)~mV asymmetry on Mixer~1 at an input of 10~V, but only several mV at low input powers. For each mixer the amplitude at maximum output is larger for input voltages up to 2.5~V (21~dBm). Above 2.5~V input voltage this flips, with the minimum mixer amplitude being larger than the maximum amplitude.
For input voltages between 0.45~V and 1.25~V (6~dBm to 15~dBm) the mixer asymmetry has an approximate quadratic dependence on the input voltage, as shown in Figure~\ref{f:MixerAsymmetryVsVolts}. Outside this range there is no simple relationship that can explain the dependence of the asymmetry on the input voltage. One explanation for the asymmetry in the mixer outputs is cross-talk coming from the diode signals. Above 15~dBm the diodes enter saturation, as discussed in Section~\ref{ss:sigGenDiode}, which may explain why the quadratic fit to the mixer asymmetry is only valid at power levels up to this value.
Taking the power dependent asymmetry in to account the actual mixer response can be modified from Equation~\ref{e:mixOutSameFreq} to become:
\begin{equation}
\mathrm{Mixer}(t) = m_1A(t)\sin[\phi(t)] + m_2A(t)^2 + m_3A(t) + m_4
\label{e:actualMixerResponse}
\end{equation}
where \(A(t)\) is the input voltage at time \(t\), and \(m_1\), \(m_2\), \(m_3\), and \(m_4\) are calibration constants needed to describe the power dependence.
\subsection{Diode Performance}\label{ss:sigGenDiode}
\subsubsection{Dependence on Input Power}
\begin{figure}
\centering
\includegraphics[width=0.9\textwidth]{Figures/phaseMons/SqrtDiodeVsVolts}
\caption{Square root of the diode output vs. the input voltage. Blue: Diode~1, Red: Diode~2 and Green: Diode~3.}
\label{f:SqrtDiodeVsVolts}
\centering
\includegraphics[width=0.9\textwidth]{Figures/phaseMons/LinFitSqrtDiodeVsVolts}
\caption{Linear fits (dashed lines) to the square root of the diode output (solid lines with circular markers) vs. the input voltage. The fits are restricted to the region marked by vertical black lines. Blue: Diode~1, Red: Diode~2 and Green: Diode~3. Error bars (not shown) are smaller than the markers.}
\label{f:LinFitSqrtDiodeVsVolts}
\end{figure}
The dependence of the three diode outputs on the input power is shown in Figure~\ref{f:SqrtDiodeVsVolts}. The square root of the diode output is plotted, as the output voltage is expected to vary linearly with input power. It is immediately apparent that the diode signals saturate at much lower input voltages than the mixer signals. All three diodes are almost fully saturated at an input of 2~V (20~dBm), with the effects of saturation already beginning to appear above 1.25~V (15~dBm). Figure~\ref{f:LinFitSqrtDiodeVsVolts} shows a linear fit to the square root of the diode, using the range of input voltages between 0.45~V and 1.25~V (6--15~dBm). Even below saturation the response of sqrt(Diode) is not well approximated by a linear dependence as desired. However, in the range from 0.30~V to 1.25~V (3~dBm to 15~dBm) a quadratic fit to the diode output directly (not sqrt(Diode)) does give a good approximation to the true dependence of the diodes on the input voltage. This is shown in Figure~\ref{f:QuadFitDiodeVsVolts}.
\begin{figure}
\includegraphics[width=0.9\textwidth]{Figures/phaseMons/QuadFitDiodeVsVolts}
\caption{Quadratic fits (dashed lines) to the diode output (solid lines with markers) vs. the input voltage. The fits are restricted to the region marked by vertical black lines. Blue: Diode~1, Red: Diode~2 and Green: Diode~3. Error bars are smaller than the markers.}
\label{f:QuadFitDiodeVsVolts}
\end{figure}
\subsubsection{Cross-Talk}
As seen previously in Figures~\ref{f:sigGenAllDio1},~\ref{f:sigGenAllDio2}~and~\ref{f:sigGenAllDio3} the diode outputs show a sinusoidal oscillation. In the same way that there is cross-talk from the diode on the mixer outputs, there will also be cross-talk from the mixers on the diode outputs. Figure~\ref{f:Diode1_Power6} shows a sinusoidal fit to the cross-talk on Diode~1 at an input power of 6~dBm. It has the same characteristics as the mixer output, including the slight distortion away from ideal sinusoidal behaviour around the peaks. However, as the diodes enter saturation the oscillation is initially distorted, and then has a much smaller amplitude when the diode output is fully saturated. One example of this is shown for the Diode~1 output at 18~dBm in Figure~\ref{f:Diode1_Power18}. The peaks around the maximum output are clearly non-sinusoidal in this case.
\begin{figure}
\centering
\includegraphics[width=0.8\textwidth]{Figures/phaseMons/Diode1_Power6}
\caption{Sinusoidal fit (black line) to cross-talk on Diode~1 at 6~dBm input power (blue markers). Sampled at 192~MHz (5.2~ns per sample).}
\label{f:Diode1_Power6}
\includegraphics[width=0.8\textwidth]{Figures/phaseMons/Diode1_Power18}
\caption{Sinusoidal fit (black line) to cross-talk on Diode~1 at 18~dBm input power (blue markers). Sampled at 192~MHz (5.2~ns per sample).}
\label{f:Diode1_Power18}
\end{figure}
Figure~\ref{f:RelativeDiodeXTalkVsPower} shows the dependence of the relative amplitude of the cross-talk on the input power. The relative amplitude of the cross-talk is the fitted amplitude of the sinusoidal oscillation on the diode divided by the mean diode output. Up until the diode outputs are fully saturated the relative amplitude of the cross-talk is around a factor two larger for the second diode. For example, at an input power of 12~dBm the relative cross-talk is at around the level of 30\% for the second diode, or 15\% for the first and third diode outputs. Up to input powers of 15~dBm the relative cross-talk is always above 10\%.
\begin{figure}
\centering
\includegraphics[width=0.8\textwidth]{Figures/phaseMons/RelativeDiodeXTalkVsPower}
\caption{Dependence of the relative amplitude of cross-talk on the diode versus the input power. Blue: Diode~1, Red: Diode~2 and Green: Diode~3.}
\label{f:RelativeDiodeXTalkVsPower}
\includegraphics[width=0.8\textwidth]{Figures/phaseMons/PhaseDiodeVsMixer}
\caption{Comparison of the oscillation on Mixer~1 (red) and Diode~1 (blue), showing a relative phase offset between the two. Sampled at 192~MHz (5.2~ns per sample).}
\label{f:PhaseDiodeVsMixer}
\end{figure}
Finally, Figure~\ref{f:PhaseDiodeVsMixer} compares the oscillation on the diode to the oscillation on the mixer. It can be seen that there is a phase shift between the two, which adds a further complication to the necessary phase reconstruction method. Taking in to account the actual characteristics of the diodes, including the cross-talk and quadratic dependence on the input power, the expected expression for the diode output from Equation~\ref{e:idealDiode} can be modified to:
\begin{equation}
\mathrm{Diode(t)} = d_1A(t)^2 + d_2A(t) + d_3 + d_4A(t)\sin[\phi(t)+\delta]
\label{e:actualDiodeResponse}
\end{equation}
where \(d_1\), \(d_2\), \(d_3\) are calibration constants describing the actual power dependence of the diode output, and \(d_4\) and \(\delta\) are calibration constants describing the cross-talk from the mixer.
\subsection{Consequences for Routine Operation}
\label{ss:sigGenConsq}
The results of the signal generator tests have several consequences for the setup of the electronics and phase reconstruction during normal operation with the beam induced signals from the phase monitors. Firstly, in order to maximise the signal to noise ratio and yield the best possible resolution on the phase measurement the highest possible input power below saturation should normally be used. The degradation of the phase resolution with the input power is seen for beam based measurements in Section~\ref{ss:resVsShifter}. However, the diodes begin to enter saturation much earlier than the mixers, at around 15~dBm rather than 23~dBm. This means that in order to be able to use the diode measurement as part of the phase reconstruction the input power would have to be limited to below 15~dBm, 8~dBm lower than would be ideal for the mixer performance. There is no way to use different input powers for the mixers and diodes without a complete redesign of the electronics.
Secondly, the ideal phase reconstruction method using \(\mathrm{Mixer}/\sqrt{\mathrm{Diode}}\) (Equation~\ref{e:phaseRecIdeal}) does not take in to account cross-talk on the mixer and diode outputs. To include the effects of cross-talk the more complex Equations~\ref{e:actualMixerResponse}~and~\ref{e:actualDiodeResponse} would have to be used.
However, the dependence of the diode output on \(\sin(\phi+\delta)\), for example, means there is no simple expression that can be derived to create an input power independent phase measurement from these equations. An iterative process would have to be used to estimate the phase instead, converging towards the true diode output without cross-talk after each iteration using the estimated phase value. This may be possible in offline data analysis but would be difficult to implement in the PFF algorithm whilst still meeting latency requirements.
Due to these reasons, and with no possibility to make modifications to the electronics, the decision was eventually taken to not include the diode measurement in the phase reconstruction process. For operation with the beam this means making the assumption that the output power from the phase monitors is constant along the pulse, and that the jitter in the output power is small. This is a good approximation, as seen later in Section~\ref{ss:calMultiSamp}. To reduce the sensitivity to any slow drifts in the output power due to changes in the beam conditions calibrations are taken at regular intervals between measurements, as discussed in Section~\ref{s:monCalibrations}.
With this treatment of the electronics, the phase is reconstructed as follows:
\begin{align}
&\mathrm{Mixer}(t) = A\sin[\phi(t)] + d \\
&\phi(t) = \arcsin\left(\frac{\mathrm{Mixer}(t)-d}{A}\right)
\label{e:phaseRecUsed}
\end{align}
Two calibration constants are needed -- \(A\) and \(d\). \(A\) is the fitted amplitude of the sinusoidal mixer output, and \(d\) is the asymmetry or offset between the maximum and minimum mixer output. This is a simplified form of Equation~\ref{e:actualMixerResponse} given the assumption that the power is constant. In reality both \(A\) and \(d\) have a power dependence.
%As any variations in input power are not removed by this method there is a benefit to operating the mixer in a region where the power dependence of the output is reduced. The best phase resolution achieved to date has been achieved with input powers to the electronics in the range between 24.5~dBm and 27~dBm. Operating in this range also has the benefit of reducing the deviation from ideal sinusoidal behaviour at lower input powers as seen in Section~\ref{ss:sigGenMixer}.
The remainder of this chapter presents the performance of the complete phase monitor and electronics system for normal operation with the beam. All the beam based measurements in the remainder of this chapter and the rest of the thesis use the phase reconstruction approach described here. Although the diodes are no longer directly used as part of the phase measurement they are still useful for the purposes of the time alignment of signals and for monitoring whether there have been any large changes in input power. The PFF firmware on the FONT5a feedforward controller has also been changed to add the option to not include the diode in the correction calculation (Section~\ref{ss:pffFirmware}). %The nominal PFF setup, as used for the results presented in Chapter~\ref{c:feedforward}, now does not use diode normalisation.
\newsection{monCalibrations}{Calibrations}
The first step in using the phase monitor measurements is to calibrate the mixer outputs. Calibrations of the phase monitor signals are typically taken on a daily basis during data taking periods, as well as additional calibrations when there have been any changes in beam conditions or to the setup of the electronics. These are needed to determine the calibration constants, amplitude and offset, required to calculate the phase from the mixer output (Equation~\ref{e:phaseRecUsed}). This section presents typical calibration results for all three phase monitors and discusses aspects such as the stability of the calibration along the pulse and determining the optimal set point for the LO phase shifters.
Calibrations are performed by varying the LO phase shifter, so that the phase between the LO and the beam signal is changed. During a calibration the phase shifters are moved through \(360^\circ\) at 12~GHz so that the response of the mixer to all phase offsets between the beam and LO can be determined. Normally calibrations are taken at 12 shifter settings across the full \(360^\circ\) range, with 10 pulses acquired at each setting and the whole scan taking approximately 10~minutes. These choices are a compromise between having enough points for a good quality fit whilst reducing the possibility of large drifts in beam phase during the scan which would degrade the fit results. All the calibrations presented use the electronics setup with the mechanical LO phase shifters in place (see Section~\ref{s:shifters}). The settings on these phase shifters approximately correspond to degrees at 4~GHz, thus a phase shifter change of 120 units corresponds to \(360^\circ\) at 12~GHz.
A calibration using both the SiS digitiser and FONT5a setup will be shown. During operation of the PFF system Mon~1 is usually connected to the FONT5a board as the correction input, whilst Mon~2 and Mon~3 are connected to the SiS digitisers where they can be acquired together with other signals at CTF3. The difference in measured output voltage between the two systems results from the use of an amplifier before the SiS digitisers to reduce noise in that setup (Section~\ref{s:monDigitisers}). Also, when using the FONT5a board the mixer outputs are attenuated by 1~dB to avoid saturating the FONT ADCs. The calibration constants from Mon~1 on the FONT5a board are needed for the PFF gain calculation in Section~\ref{ss:pffFirmware}. Measurements of the upstream and downstream phase following this chapter use Mon~2 and Mon~3 on the SiS digitisers and their respective calibration constants, unless indicated otherwise.
\subsection{Calibration on SiS Digitisers}
\label{ss:SiSCal}
\begin{figure}
\centering
\includegraphics[width=0.8\textwidth]{Figures/phaseMons/mon1AllPoints}
\caption{Mon~1 mixer output along the pulse for each LO phase shifter setting during the calibration. Sampled at 192~MHz (5.2~ns per sample).}
\label{f:mon1AllPoints}
\includegraphics[width=0.8\textwidth]{Figures/phaseMons/mon2AllPoints}
\caption{Mon~2 mixer output along the pulse for each LO phase shifter setting during the calibration. Sampled at 192~MHz (5.2~ns per sample).}
\label{f:mon2AllPoints}
\end{figure}
\begin{figure}
\centering
\includegraphics[width=0.8\textwidth]{Figures/phaseMons/mon3AllPoints}
\caption{Mon~3 mixer output along the pulse for each LO phase shifter setting during the calibration. Sampled at 192~MHz (5.2~ns per sample).}
\label{f:mon3AllPoints}
\end{figure}
Figures~\ref{f:mon1AllPoints}--\ref{f:mon3AllPoints} show the mixer output as a function of time for all phase shifter settings in an LO scan, for each phase monitor respectively. Away from the minimum and maximum output each mixer shows the expected phase sag along the beam pulse resulting from the RF pulse compression used at CTF3 \cite{rfCompress}. The shape of the phase sag as seen on the mixer changes sign depending on whether the LO phase places the mixer on the rising or falling slope of its sinusoidal output. Usually the mixers are operated on the falling slope where the measured phase sag is `u'-shaped, rather than `n'-shaped, as this is also the convention for other phase dependent signals at CTF3 \cite{piotrPriv}.
\begin{figure}
\centering
\includegraphics[width=0.8\textwidth]{Figures/phaseMons/calSiS}
\caption{Fits (solid lines) to the mixer output for each phase monitor (markers) vs. the LO phase shifter setting. The data shown is for sample 605 on the SiS digitisers. Blue: Mon~1, Red: Mon~2 and Green: Mon~3.}
\label{f:calSiS}
\end{figure}
\begin{table}
\begin{center}
\begin{tabular}{|c c c|}
\hline
Monitor & \(A\) (amplitude) & \(d\) (offset) \\ \hline
Mon~1 & \(1167\pm10\)~mV & \(86\pm9\)~mV \\
Mon~2 & \(1064\pm6\)~mV & \(69\pm7\)~mV\\
Mon~3 & \(990\pm12\)~mV & \(150\pm10\)~mV\\ \hline
\end{tabular}
\caption{Fit parameters from the calibration at sample 605 on the SiS digitisers for each monitor.}
\label{t:calSiSConsts}
\end{center}
\end{table}
Near the minimum or maximum mixer amplitude the beam phase sag causes a much smaller variation in the mixer output voltage along the pulse. The phase resolution close to the peaks in the mixer output is therefore greatly reduced, as seen in Section~\ref{ss:resVsShifter}. LO phase scans are used to not only calculate the calibration constants but also to determine the phase shifter settings that zero the mixer output, where the resolution and linearity are maximal. This process is documented in Section~\ref{ss:calZeroCross}.
The noisier appearance of the output on Mon~3 is not an effect of the phase monitors or phase monitor electronics but is rather caused by real differences between the beam phase upstream (Mon~1, Mon~2) and downstream (Mon~3) during the scan. Reducing the differences between the upstream and downstream phase is the focus of Chapter~\ref{c:phasePropagation}.
Figure~\ref{f:calSiS} shows the result of fitting the mixer output versus the phase shifter setting at sample 605 (see Figures~\ref{f:mon1AllPoints}--\ref{f:mon3AllPoints}). The mixer response is sinusoidal as expected and as seen previously in the signal generator tests. In the signal generator tests there was some visible distortion away from the sinusoidal fit around the peaks at some input power levels (Section~\ref{ss:sigGenMixer}). There is no visible effect for the input power of the phase monitor signals (Table~\ref{t:monPowers}). Differences in the peak output of each monitor are expected due to differences in the input power from each phase monitor as well as differences between the sets of electronics. Small offsets between the data and the fit at some shifter settings are caused by drifts in the beam phase during the scan (particularly for Mon~3 where the beam is less stable), as well as human error in setting the shifter values.
The fitted values of the mixer amplitude, \(A\), and offset, \(d\), are found in Table~\ref{t:calSiSConsts}. These values are used to calculate the beam phase as per Equation~\ref{e:phaseRecUsed}.
\subsection{Calibration on FONT5a Board}
\label{ss:FONTCal}
\begin{figure}
\centering
\includegraphics[width=0.8\textwidth]{Figures/phaseMons/calFONT}
\caption{Results of a calibration performed on the FONT5a board. Solid lines are sinusoidal fits to the data (markers). Blue: Mon~1, Red: Mon~2 and Green: Mon~3.}
\label{f:calFONT}
\end{figure}
Figure~\ref{f:calFONT} and Table~\ref{t:calFONTConsts} show the results of a calibration performed in exactly the same way but on the FONT5a board. The FONT5a board ADCs flip the sign of the input \cite{glennPriv}, so a positive ADC output in counts corresponds to a negative input voltage and vice-versa. This explains the inverted polarity of the resulting sine curves on the FONT5a board in Figure~\ref{f:calFONT}, compared to the SiS digitisers in Figure~\ref{f:calSiS}. For operation of the PFF system this difference must be taken in to account either by operating the mixer on the rising slope as seen on the FONT5a board (which in reality is the falling slope, as desired), or alternatively by using negative gain values for the correction output. The fitted values for \(d\) in Table~\ref{t:calFONTConsts} are also negative rather than positive as a result of this sign flip. Apart from these differences the overall shape of the mixer output follows the sinusoidal dependence as expected.
The FONT5a ADC outputs are 13-bit, or \(\pm4096\)~counts, with an input range of \(\pm500\)~mV (Section~\ref{s:fontSetup}). The fitted Mon~1 output, with 1~dB attenuation added after the mixer, of between -3712~counts and +3156~counts therefore corresponds to an input voltage range of between +453~mV and -385~mV. Without the attenuator, which reduces the voltage by roughly 10\%, the Mon~1 mixer would saturate the ADC at its peak output. As the contribution of digitiser noise is small on the FONT5a board (Section~\ref{s:monDigitisers}) a 1~dB attenuator is also added to the Mon~2 and Mon~3 outputs so that the overall setup for each monitor is the same in this measurement. However, during normal operation of the PFF system Mon~2 and Mon~3 are connected to the SiS digitisers, with their mixer outputs then being amplified rather than attenuated.
\begin{table}
\begin{center}
\begin{tabular}{|c c c|}
\hline
Monitor & \(A\) (amplitude) & \(d\) (offset) \\ \hline
Mon~1 & \(3434\pm41\)~counts & \(-278\pm34\)~counts \\
Mon~2 & \(3144\pm16\)~counts & \(-138\pm17\)~counts\\
Mon~3 & \(2870\pm43\)~counts & \(-44\pm44\)~counts\\ \hline
\end{tabular}
\caption{Fit parameters from the calibration for each monitor on the FONT5a board.}
\label{t:calFONTConsts}
\end{center}
\end{table}
\subsection{Variations in Calibration Constants Along the Pulse}
\label{ss:calMultiSamp}
The calibration results on both the SiS digitisers and FONT5a board have been presented at one sample number around the middle of the pulse close to where the phase sag along the pulse is flattest. In this section the variation in the fitted calibration constants along the pulse is discussed. This is particularly important after taking the decision to not use the diodes, as the intended purpose of using the diodes was to normalise the mixer response to give an output independent of the input power. Without using the diodes any variations in input power along the pulse will also create differences in the calibration constants along the pulse.
\begin{figure}
\centering
\includegraphics[width=0.8\textwidth]{Figures/phaseMons/calAmpVsSample}
\caption{Variation in fitted amplitude along the pulse for each phase monitor. Blue: Mon~1, Red: Mon~2 and Green: Mon~3. Bands around the central lines show the standard error in the fitted parameter values. Sampled at 192~MHz (5.2~ns per sample).}
\label{f:calAmpVsSample}
\centering
\includegraphics[width=0.8\textwidth]{Figures/phaseMons/calOffVsSample}
\caption{Variation in fitted offset along the pulse for each phase monitor. Blue: Mon~1, Red: Mon~2 and Green: Mon~3. Bands around the central lines show the standard error in the fitted parameter values. Sampled at 192~MHz (5.2~ns per sample).}
\label{f:calOffVsSample}
\end{figure}
The current implementation of the PFF algorithm on the FONT5a board uses the mixer multiplied by a single gain value that is constant along the full pulse length to create the correction output (Section~\ref{ss:pffFirmware}). It therefore cannot take in to account any variations in calibration constants along the pulse. Offline data analysis is usually performed in the same way so that the quoted resolutions are representative of the values that apply to the implementation of the PFF correction. The effect of taking in to account the variations in calibration parameters along the pulse seen here is shown in Section~\ref{s:effectsMultiSampCal}.
Figures~\ref{f:calAmpVsSample}~and~\ref{f:calOffVsSample} show the variation in the fitted calibration amplitude and offset across the full pulse length, using the same calibration on the SiS digitisers presented in Section~\ref{ss:SiSCal}. Differences in both the amplitude and offset along the pulse are visible. These are summarised in Table~\ref{t:calConstsStdAlong} in terms of the standard deviation of the fitted parameter values along the pulse.
The stability of the fitted amplitude along the pulse is similar for the upstream monitors (Mon~1 and Mon~2), with a variation of around 8~mV in both cases. As the downstream beam is less stable than the upstream beam the variations in fitted amplitude along the pulse are larger for Mon~3, at the 15~mV level. In terms of a relative difference these values correspond to roughly a 0.7\% variation in fitted amplitude for Mon~1 and Mon~2, or 1.5\% for Mon~3. With further optimisation of the downstream beam, as documented in Chapter~\ref{c:phasePropagation}, it should be possible to achieve similar Mon~3 amplitude stability to that seen for Mon~1 and Mon~2.
Absolute stability in the fitted offset along the pulse is similar to that of the amplitude but therefore much larger as a relative difference at the level of several percent. The variation in fitted offset along the pulse is smallest for Mon~2 at around 3~mV. For both Mon~1 and Mon~3 the variation is around a factor two larger, at 6~mV.
\begin{table}
\begin{center}
\begin{tabular}{|c c c|}
\hline
Monitor & \(A\) (amplitude) & \(d\) (offset) \\ \hline
Mon~1 & \(8.3\pm0.4\)~mV & \(6.7\pm0.3\)~mV \\
Mon~2 & \(7.7\pm0.4\)~mV & \(3.0\pm0.3\)~mV\\
Mon~3 & \(14.7\pm0.7\)~mV & \(6.1\pm0.3\)~mV\\ \hline
\end{tabular}
\caption{Standard deviation in calibration fit parameters along the pulse.}
\label{t:calConstsStdAlong}
\end{center}
\end{table}
\subsection{Zero Crossing}
\label{ss:calZeroCross}
The full fit to the calibration result that is performed is:
\begin{equation}
\mathrm{Mixer} = A\sin(bx + c) + d
\end{equation}
where \(x\) is the phase shifter setting. \(A\) and \(d\) are the calibration constants used to reconstruct the phase, with their values already quoted in Table~\ref{t:calSiSConsts}. The remaining fit parameters \(b\) and \(c\) convert the phase shifter setting in to the phase offset between the LO and the beam. As the shifter readings are approximately in 4~GHz degrees, the expected value for \(b\) that converts the shifter value in to 12~GHz radians is \((12/4)*(\pi/180) \simeq 50\)~mrad/unit.
To obtain the best resolution for the measurement the mixers should be operated where the dependence of the output voltage on the phase is maximal. This means maximising the partial derivative of the mixer output with respect to the phase shifter setting:
\begin{equation}
\frac{\partial \mathrm{Mixer}}{\partial x} = Ab\cos(bx+c)
\label{e:partDerivMixer}
\end{equation}
This is maximised when \(bx + c = n\pi\), where \(n\) is any positive or negative integer. The optimal phase shifter settings therefore meet this criterion:
\begin{equation}
x = \frac{n\pi-c}{b}
\end{equation}
And with this phase shifter set point the mixer output is \(\mathrm{Mixer} = A\sin(n\pi)+d = d\). In the case where there is no offset between the minimum and maximum mixer output (\(d=0\)) the optimal point to operate the mixers is at zero output. Because of this the optimal shifter setting will be referred to as the zero crossing. In reality the small asymmetry in the mixer output means the optimal shifter setting is where mixer output is \(d\). The effect of operating the mixers away from the zero crossing on the resolution is shown in Section~\ref{ss:resVsShifter}.
In addition, as previously mentioned the convention is to operate the mixers on the falling slope where the partial derivative in Equation~\ref{e:partDerivMixer} is negative. The phase shifter settings are obtained using the smallest positive integer \(n\) that leads to this criterion being met. Table~\ref{t:calZeroCross} shows an example of values for the fit parameters \(b\) and \(c\) and the calculated phase shifter settings to be on the zero crossing for each monitor. These values are taken from the same calibration and sample number presented in Section~\ref{ss:SiSCal} (on the SiS digitisers). In Figure~\ref{f:calSiS} it can be seen that the calculated phase shifter settings for the zero crossing are close to zero mixer output for each phase monitor.
\begin{table}
\begin{center}
\begin{tabular}{|c c c c|}
\hline
Monitor & \(b\) & \(c\) & Zero Crossing \\ \hline
Mon~1 & \(50.8\pm0.5\)~mrad/unit & \(2.29\pm0.04\)~rad & \(16.7\pm0.9\)~units \\
Mon~2 & \(47.4\pm0.5\)~mrad/unit & \(1.36\pm0.04\)~rad & \(37.5\pm0.8\)~units \\
Mon~3 & \(51.3\pm0.6\)~mrad/unit & \(4.02\pm0.04\)~rad & \(105.5\pm1.5\)~units \\ \hline
\end{tabular}
\caption{Phase shifter setting to obtain the zero crossing for each mixer output and the fit parameters needed to calculate them.}
\label{t:calZeroCross}
\end{center}
\end{table}
Due to the large phase sag along the beam pulse it is clearly not possible to be at the zero crossing of the mixer for the full pulse length. For the PFF system the region of interest is the central portion of the pulse where the phase sag is flattest. The shifters are therefore set to zero the mixer output in this region, giving best resolution in the central part of the pulse but slightly degraded resolution near the start and end of the pulse. In addition to this, slow drifts in the beam phase, particularly downstream, mean that the shifter set points must routinely be changed to stay at the zero crossing. With the current setup using mechanical phase shifters this must be done by hand, with no possibility to implement an automatic feedback on the shifter settings, for example. For any future application at CLIC, mechanical phase shifters with remotely controllable stepping motors could be used to resolve this issue.
\newsection{shifters}{Phase Shifter Noise}
In the first tests with all three phase monitors in their final positions at CTF3 the phase resolution was far in excess of the \(0.14^\circ\) derived to be necessary to achieve \(0.2^\circ\) measured corrected downstream phase jitter in Section~\ref{s:resolutionEqs}.
%Figure~\ref{f:resolutionDigShift} shows a typical example of the measured resolution along the pulse at that time with an achieved resolution of around \(0.4^\circ\), three times larger than required.
Typically the measured resolution was initially \(0.4^\circ\), three times larger than required.
The lowest downstream phase jitter that could be achieved with the PFF system in these conditions is above \(0.55^\circ\), only about 30\% smaller than the initial upstream phase jitter at CTF3 (Chapter~\ref{c:phasePropagation}). To be able to achieve a large reduction in downstream phase jitter with the PFF prototype the source of the poor phase monitor resolution had to be identified and removed.
%\begin{figure}
% \centering
% \includegraphics[width=0.8\textwidth]{Figures/phaseMons/resolutionDigShift}
% \caption{Phase monitor resolution for the initial setup using digital phase shifters in the phase monitor electronics.}
% \label{f:resolutionDigShift}
%\end{figure}
The first hint towards identifying the cause of the degraded resolution came by comparing the measured phase jitter from Mon~1 and Mon~2, with one example shown in Figure~\ref{f:Mix1Mon1_Mix2Mon2}. Note that for all the results in this section it is not the absolute value of the phase jitter (which depends mostly on the beam conditions in that dataset) that is important but rather the difference between the measured phase jitter in each monitor. The measured phase jitter along the pulse in Mon~2 with a mean of \(1.38\pm0.01^\circ\) is 1.7 times larger than the \(0.83\pm0.01^\circ\) phase jitter in Mon~1. Jitter values from this and all the other datasets presented in this section are shown in Table~\ref{t:elecSwapResults}. As Mon~1 and Mon~2 are neighbouring each other in the beam line the actual phase jitter in the two should be close to identical.
\begin{figure}
\centering
\includegraphics[width=0.8\textwidth]{Figures/phaseMons/Mix1Mon1_Mix2Mon2}
\caption{Phase jitter along the pulse with the nominal electronics setup -- Mon~1 connected to the first mixer, and Mon~2 connected to the second mixer. Blue: Mon~1, Mixer~1 and LO~1. Red: Mon~2, Mixer~2 and LO~2. Bands around the central lines show the standard error on the jitter values.}
\label{f:Mix1Mon1_Mix2Mon2}
\includegraphics[width=0.8\textwidth]{Figures/phaseMons/Mix1Mon2_Mix2Mon1}
\caption{Phase jitter along the pulse with Mon~2 connected to the first mixer, and Mon~1 connected to the second mixer. Blue: Mon~2, Mixer~1 and LO~1. Red: Mon~1, Mixer~2 and LO~2. Bands around the central lines show the standard error on the jitter values.}
\label{f:Mix1Mon2_Mix2Mon1}
\end{figure}
The overall phase monitor and electronics setup can be roughly split into three parts -- the RF signal from the beam (dependent on the phase monitors themselves and the hybrids), the LO reference signal and the mixers. An issue with any one of these parts could explain the larger phase jitter measured from Mon~2 (usually connected to Mixer~2 and LO~2) compared to the phase jitter from Mon~1 (usually connected to Mixer~1 and LO~1). To determine whether the issue was with the RF signal of one of the monitors measurements were taken with Mon~1 and Mon~2 swapped between the three mixers.
Figure~\ref{f:Mix1Mon2_Mix2Mon1} shows the measured phase jitter along the pulse when Mon~2 is moved on to Mixer~1 (and LO~1) and with Mon~1 moved on to Mixer~2 (and LO~2). The colours in all the plots in this section correspond to the mixer used in the measurement -- blue for Mixer~1, red for Mixer~2 and green for Mixer~3. With the phase monitors swapped the higher measured phase jitter stays with Mixer~2 with the same ratio of 1.7, in this case \(1.48\pm0.01^\circ\) on Mixer~2 (connected to Mon~1) and \(0.89\pm0.01^\circ\) on Mixer~1 (connected to Mon~2). This rules out that the difference in phase jitter is coming from the phase monitors themselves, and suggests the problem is with either Mixer~2 or the reference signal LO~2 for that mixer. The same exercise can then be repeated with Mon~2 moved on to Mixer~3 (and LO~3) and the nominal setup used for Mon~1. Mixer~3 gives similar results to Mixer~2, with 1.7~times larger phase jitter than Mixer~1. This is seen in Figure~\ref{f:Mix1Mon1_Mix3Mon2}. The remaining task is therefore to identify whether the additional source of noise is from Mixer~2 or LO~2, and from Mixer~3 or LO~3.
\begin{figure}
\centering
\includegraphics[width=0.8\textwidth]{Figures/phaseMons/Mix1Mon1_Mix3Mon2}
\caption{Phase jitter along pulse with Mon~1 connected to the first mixer and Mon~2 connected to the third mixer. Blue: Mon~1, Mixer~1 and LO~1. Green: Mon~2, Mixer~3 and LO~3. Bands around the central lines show the standard error on the jitter values.}
\label{f:Mix1Mon1_Mix3Mon2}
\includegraphics[width=0.8\textwidth]{Figures/phaseMons/Mix1Mon1PhShft2_Mix2Mon2PhShft1}
\caption{Phase jitter along pulse with the LO swapped between the first mixer and the second mixer. Blue: Mon~1, Mixer~1 and LO~2. Red: Mon~1, Mixer~2 and LO~1. Bands around the central lines show the standard error on the jitter values.}
\label{f:Mix1Mon1PhShft2_Mix2Mon2PhShft1}
\end{figure}
This was determined by swapping the LO reference signals between the mixers. Figure~\ref{f:Mix1Mon1PhShft2_Mix2Mon2PhShft1} shows the measured phase jitter with LO~2 connected to Mixer~1, and LO~1 connected to Mixer~2. In this case the lower measured phase jitter stays with LO~1, with \(1.10\pm0.01^\circ\) jitter on Mixer~2 (with LO~1) and \(1.68\pm0.01^\circ\) on Mixer~1 (with LO~2). In Figure~\ref{f:Mix1Mon1PhShft3_Mix3Mon2PhShft1} the same is seen with LO~3 connected to Mixer~1, and LO~1 connected to Mixer~3, with the lower phase jitter coming from Mixer~3 (LO~1) in this case. In Table~\ref{t:elecSwapResults} it can also be seen that the lowest phase jitter in every dataset always comes from the phase monitor for which LO~1 was used.
\begin{figure}
\centering
\includegraphics[width=0.8\textwidth]{Figures/phaseMons/Mix1Mon1PhShft3_Mix3Mon2PhShft1}
\caption{Phase jitter along pulse with the LO swapped between the third mixer and the first mixer. Blue: Mon~1, Mixer~1 and LO~3. Green: Mon~2, Mixer~3 and LO~1. Bands around the central line show the standard error in the fitted parameter values.}
\label{f:Mix1Mon1PhShft3_Mix3Mon2PhShft1}
\includegraphics[width=0.8\textwidth]{Figures/phaseMons/jitterMechanicalShifters}
\caption{Phase jitter along pulse after installation of the mechanical phase shifters. Blue: Mon~1, Mixer~1 and LO~1. Red: Mon~2, Mixer~2 and LO~2. Bands around the central line show the standard error in the fitted parameter values.}
\label{f:jitterMechanicalShifters}
\end{figure}
\begin{table}
\begin{center}
\begin{tabular}{|c c c | c c c|}
\hline
& Mon~1 & & & Mon~2 & \\ \hline
Mixer & LO & Jitter & Mixer & LO & Jitter \\ \hline
1 & \textbf{1} & \(\mathbf{0.83\pm0.01^\circ}\) & 2 & 2 & \(1.38\pm0.01^\circ\) \\
2 & 2 & \(1.48\pm0.02^\circ\) & 1 & \textbf{1} & \(\mathbf{0.89\pm0.01^\circ}\) \\
1 & \textbf{1} & \(\mathbf{1.15\pm0.01^\circ}\) & 3 & 3 & \(1.91\pm0.01^\circ\) \\
1 & 2 & \(1.68\pm0.01^\circ\) & 2 & \textbf{1} & \(\mathbf{1.10\pm0.01^\circ}\) \\
1 & 3 & \(2.07\pm0.01^\circ\) & 3 & \textbf{1} & \(\mathbf{1.20\pm0.01^\circ}\) \\
\hline
\end{tabular}
\caption{Comparison of phase jitter along the pulse for each measurement with different setups of the electronics. Each row corresponds to the results of one dataset. The left hand side of the table shows the results from Mon~1 in that dataset, and the right hand side of the table the results from Mon~2. Bold text indicates the lower jitter value in that dataset, all of which use LO~1.}
\label{t:elecSwapResults}
\end{center}
\end{table}
In this way an issue with LO~2 and LO~3 was identified. The generation of the LO reference signals (Section~\ref{s:monElectronics}) consists of a 3~GHz source that is common to all three signals, in addition to separate phase shifters, frequency multipliers (to create the 12~GHz reference) and amplifiers for each LO signal. The digital phase shifters were thought to be the most likely culprit to be adding noise in to the system, and preliminary tests replacing one of the digital phase shifters with a mechanical alternative provided an immediate improvement in resolution. Finally, all three digital shifters were replaced with mechanical phase shifters (the specifications of the shifters were introduced in Section~\ref{s:monElectronics}). With this setup the measured phase jitter for Mon~1 and Mon~2 is the same irrespective of which mixer or LO the signal is connected to, as shown in Figure~\ref{f:jitterMechanicalShifters}. The final achieved resolution is presented in Section~\ref{s:resolutionMeas}.
\newsection{resolutionMeas}{Resolution Measurements}
This section presents resolution measurements with the mechanical phase shifters in place and the same overall electronics setup that was used to achieve the best PFF results in Chapter~\ref{c:feedforward}. All measurements use the upstream phase monitors Mon~1 and Mon~2. Although there is no way to directly verify the resolution of the downstream phase monitor Mon~3 in-situ, an upper limit can be placed based on the achieved correlations between the measured upstream and downstream phase. The achieved phase propagation in Chapter~\ref{c:phasePropagation} with \(0.74^\circ\) measured downstream phase jitter and 93\% upstream-downstream phase correlation suggest the Mon~3 resolution must be better than \(0.2^\circ\) using Equation~\ref{e:corrVsResolution}.
\subsection{Achieved Point-by-Point Resolution}
\label{ss:bestRes}
Figure~\ref{f:bestResolution} shows the phase resolution that has been achieved sample by sample along the pulse. Each point corresponds to the standard deviation of the difference between the measured Mon~1 and Mon~2 phase divided by the square-root of two, as per Equation~\ref{e:resolutionEq}. The resolution is quite stable along the pulse, with a mean value of \(0.126^\circ\) and a standard deviation of \(0.007^\circ\). This is below the \(0.14^\circ\) needed to be able to theoretically measure \(0.2^\circ\) corrected phase jitter with the PFF prototype, as derived in Section~\ref{s:resolutionEqs}. The achieved resolution corresponds to a theoretical limit of around \(0.18^\circ\) on the measured corrected downstream phase jitter.
\begin{figure}
\centering
\includegraphics[width=0.8\textwidth]{Figures/phaseMons/bestResolution}
\caption{Best achieved point-by-point phase monitor resolution (sampled at 192~MHz on the SiS digitisers). Bands show the standard error on the measured resolution. }
\label{f:bestResolution}
\end{figure}
The presented value corresponds to the lowest measured resolution to date. However, it must be noted that this value fluctuates over time as the performance of the monitors, and in particular the electronics, is very sensitive to small changes to the environment in the klystron gallery and to the beam setup. A representative value of the routinely achievable point-by-point resolution is \(0.2^\circ\), such as the example shown in Figure~\ref{f:resolutionWithAveraging} in Section~\ref{ss:resSampAvg}. Several sources of additional noise in the measured phase are discussed in Sections~\ref{s:monComp}--\ref{s:monPosition}. In particular, a sensitivity of the LO signals in the electronics to the power and phase of nearby klystrons has recently been identified (Section~\ref{s:monComp}).
\subsection{With Sample Averaging}
\label{ss:resSampAvg}
The phase monitor signals are digitised with a much higher sampling rate, 357~MHz on the FONT5a board or 192~MHz on the SiS digitisers, than the targeted PFF correction bandwidth of 30~MHz. This means the results from several samples could be averaged to reduce noise on the measurement whilst maintaining the same correction bandwidth. For example, for a measurement on the SiS digitisers, such as those shown here, 5 samples can be averaged to effectively create a signal with a 38~MHz sampling rate, reduced from the initial 192~MHz.
\begin{figure}
\centering
\includegraphics[width=0.8\textwidth]{Figures/phaseMons/resolutionWithAveraging}
\caption{Phase monitor resolution with (red) and without (blue) averaging 5 samples. Bands show the standard error on the resolution. }
\label{f:resolutionWithAveraging}
\end{figure}
The effect of doing this is shown in Figure~\ref{f:resolutionWithAveraging}, using a resolution measurement with \(0.199^\circ\) point-by-point resolution (with a standard deviation of \(0.011^\circ\) in that value along the pulse). By averaging five samples the resolution is improved to \(0.174^\circ\) (with a standard deviation of \(0.009^\circ\)), with the main improvement from the averaging coming from the reduction in digitiser noise (on the SiS digitisers). In addition, many of the measurements in Chapters~\ref{c:phasePropagation}--\ref{c:feedforward} use the mean, rather than point-by-point, pulse phase. For these measurements (averaging around 100~samples) there is a further small improvement in phase monitor resolution, to \(0.165\pm0.008^\circ\), for the measurement used here. For reference, the best achieved point-by-point resolution of \(0.126^\circ\) (Section~\ref{ss:bestRes}), can also be reduced by averaging 5 samples, to \(0.108^\circ\).
Currently the phase propagation (Chapter~\ref{c:phasePropagation}) is believed to be the main limiting factor for the PFF performance rather than the phase monitor resolution. However, it would be possible to implement sample averaging in the PFF firmware on the FONT5a board if deemed necessary for future tests \cite{glennPriv}.
\subsection{Dependence of Resolution on LO Phase}
\label{ss:resVsShifter}
\begin{figure}
\centering
\includegraphics[width=0.8\textwidth]{Figures/phaseMons/resolutionVsShifter}
\caption{Dependence of the phase monitor resolution on the phase offset between the beam and the LO, for the full \(360^\circ\) range. Error bars show the standard error on the measured resolution at each phase offset.}
\label{f:resolutionVsShifter}
\includegraphics[width=0.8\textwidth]{Figures/phaseMons/resVsSmallPhasOff}
\caption{Dependence of the phase monitor resolution on the phase offset between the beam and the LO, for offsets between \(\pm20^\circ\). Error bars show the standard error on the measured resolution at each phase offset.}
\label{f:resVsSmallPhasOff}
\end{figure}
The process of setting the mixers at their zero crossing after calibrations was documented in Section~\ref{ss:calZeroCross}. This is necessary to operate the mixers where the output voltage is most sensitive to variations in the phase. The dependence of the phase resolution on the beam phase across the full \(\pm180^\circ\) range is shown in Figure~\ref{f:resolutionVsShifter}. The plotted phase is the offset between the LO phase shifter setting and the calculated optimal setting. More than \(50^\circ\) away from the zero crossing there is a large degradation in resolution, reaching above 1~degree at the \(+90^\circ\) peak.
However, for the PFF system the phase resolution only needs to be guaranteed within its correction range, which is calculated to be \(\pm5.5^\circ\) in Section~\ref{ss:corrRange}. In Figure~\ref{f:resVsSmallPhasOff} it is seen that there is no noticeable degradation in resolution in the range between \(\pm15^\circ\). Therefore, providing the mixers have been correctly set at their zero crossings, this is not an issue for the PFF system.
%\subsection{Dependence of Resolution on Input Power}
%\label{ss:resVsPower}
%Would need to take new data to do this section properly. Have some data with input attenuation 0dB 10dB 13dB 16dB 20dB but from before new shifters (with adjusters), and really need more in the range from 0dB to 10dB rather than at very high attenuations.
\newsection{monBandwidth}{Bandwidth}
\begin{figure}
\centering
\includegraphics[width=0.8\textwidth]{Figures/phaseMons/bandwidthPlot}
\caption{Response of Mixer~3 to a jump in phase in the middle of the pulse.}
\label{f:bandwidthPlot}
\end{figure}
The overall targeted bandwidth for the prototype PFF correction is 30~MHz, which means each individual hardware component must have a bandwidth in excess of 30~MHz. To estimate the bandwidth of the phase measurement the delay loop has been used to create a sharp jump in the phase mid-way along the pulse. Normally the delay loop (whose length is 140~ns) is used with 1.5~GHz beam at CTF3, with seven 180 degree phase switches in the bunching at 140~ns intervals. Alternating 140~ns sub-trains are deflected in to the delay loop with a 1.5~GHz RF deflector, and then recombine with the 140~ns sub-trains bypassing the delay loop to double the drive beam current (Section~\ref{s:ctfIntro}). If the delay loop is instead used with 3~GHz beam alternating bunches, rather than sub-trains, enter the delay loop. The first 140~ns of the pulse after the delay loop contains only bunches that bypassed the loop, so is a 1.5~GHz beam with half the initial beam current. After the first 140~ns there is a fast transition back to 3~GHz beam with the same initial current as delayed bunches merge with the bypassing bunches. By varying the length of the delay loop (using a wiggler \cite{wiggler}) the phase of the bunches leaving the delay loop can be changed, also creating a fast phase jump at the transition to 3~GHz beam.
Figure~\ref{f:bandwidthPlot} shows the response of the Mon~3 mixer to a beam pulse with a phase step setup in this way.
In this case an initial 140~ns, 3~GHz, 4~A beam pulse is used, and is converted in to a 280~ns, 1.5~GHz, 2~A pulse following the delay loop by the process described above. With this pulse length the resulting downstream beam pulse has a phase jump but constant beam current and bunch frequency.
The time taken for the mixer output to respond to the fast phase change can be related to the bandwidth by this approximate relationship \cite{bwRisTim}:
\begin{equation}
\mathrm{BW} = \frac{350}{t}
\end{equation}
where \(\mathrm{BW}\) is the bandwidth in MHz and \(t\) is the rise time of the signal in ns. The transition between the two phase states as seen on the mixer output occurs between 156.6~ns and 167.0~ns, a rise time of 10.4~ns corresponding to a bandwidth of approximately 34~MHz. In addition, the falling edge of the mixer output at the end of the pulse also takes around a 10~ns, also leading to a bandwidth estimate in the region of 35~MHz.
%or use transient start of upstream pulse
%on FONT5a board goes 30 to 41 ns, suggests 32~MHz
%
%\begin{figure}
% \centering
% \includegraphics[width=0.8\textwidth]{Figures/phaseMons/transientUpstream}
% \caption{Energy transient at the start of the upstream pulse as seen on the second mixer.}
% \label{f:transientUpstream}
%\end{figure}
\newsection{monComp}{Comparison of Measured Phase Along Pulse}
\begin{figure}
\centering
\includegraphics[width=0.8\textwidth]{Figures/phaseMons/phaseAlongAll}
\caption{Comparison of phase along the pulse in the three PFF phase monitors and an alternative downstream phase measurement from a PETS. Blue: Mon~1, Red: Mon~2, Green: Mon~3 and Dashed Black: PETS.}
\label{f:phaseAlongAll}
\includegraphics[width=0.8\textwidth]{Figures/phaseMons/DiffMon1Mon2Along}
\caption{Difference between the measured Mon~1 and Mon~2 phase along the pulse.}
\label{f:DiffMon1Mon2Along}
\end{figure}
It has been shown that the phase jitter is the same in Mon~1 and Mon~2 (Section~\ref{s:shifters}), and that the achieved resolution is better than the level required for the PFF correction (Section~\ref{ss:bestRes}). Nevertheless there are several remaining effects that have been identified which may limit the PFF performance in a way not described by the resolution. These are the focus of the remainder of this chapter, starting with differences between the measured shape of the phase along the pulse, discussed here. Neither the phase jitter nor the resolution are sensitive to any static differences in the measured phase in each monitor. For the PFF system to remove not only phase jitter but also to flatten the phase sag along the pulse the shape of the upstream and downstream phase must be the same. In other words, the PFF system is sensitive to the accuracy of the phase measurement as well as the resolution.
Figure~\ref{f:phaseAlongAll} shows an example of the measured phase along the pulse in all three monitors, as well as a fourth phase measurement taken from one of the power extraction and transfer structures (PETS) in the TBL line after Mon~3 \cite{reidarPETS}. The PETS measurement provides an independent cross-check of the response and calibration of the three PFF monitors. All four phase measurements show approximately the same overall phase sag of around \(45^\circ\) along the full pulse length, as expected.
Nevertheless, there are differences between the measurements. As described later in Chapter~\ref{c:phasePropagation} there are many mechanisms by which the beam phase can change between the upstream and downstream monitors. Small discrepancies between the Mon~1 and Mon~2 phase compared to the Mon~3 and PETS phase are therefore not unexpected. A detailed comparison between the upstream and downstream phase is left to Chapter~\ref{c:phasePropagation} rather than being discussed here.
However, as Mon~1 and Mon~2 are neighbouring each other in the beam line their measurements are expected to agree almost perfectly but this is not the case. Figure~\ref{f:DiffMon1Mon2Along} shows the difference between the Mon~1 and Mon~2 phase along the pulse. The offset between the two has almost a linear dependence on the time along the pulse, varying by close to \(10^\circ\) across the full pulse length. Possible explanations could be an error in the fitted calibration amplitude or a time offset between the two signals. The fact that the Mon~2 phase is lower at one end of the pulse but higher at the other means that the difference is not simply a scale factor between the two, and therefore cannot be described by an error in calibration amplitude. Neither can it be explained by differences in the calibration constants along the pulse, as seen in Section~\ref{s:effectsMultiSampCal}. Similarly, by observing small variations along the pulse, for example at the end of the pulse after a time of 1000~ns in Figure~\ref{f:phaseAlongAll}, it can be seen that the two measurements are well aligned in time.
If there was a real difference in the phase sag between monitors (rather than it being a measurement effect) or if there was an issue with Mon~1, used as the PFF correction input, it would not be possible to completely flatten the phase sag along the pulse with the PFF system. The excellent flattening of the pulse that has in reality been achieved with the PFF system (Chapter~\ref{c:feedforward}) suggests this may be an issue affecting only Mon~2, as the correction input is based solely on Mon~1. Although the effect is not fully yet understood, recent measurements have suggested the source of the difference may be intermittent features on the LO phase used by the second mixer, and not present or at least much weaker on the first and third LO sources used for Mon~1 and Mon~3 \cite{jackFONTAug16}. The effect appears to be correlated with the phase and power of the two klystrons nearest the phase monitor electronics in the klystron gallery, suggesting a possible grounding issue in the electronics.
%\begin{figure}
% \centering
%% \includegraphics[width=0.8\textwidth]{Figures/phaseMons/mon2Rotated}
%% \caption{Comparison of Mon~1 (blue) and Mon~2 (red) phase along the pulse, with Mon~2 rotated by \(2.1^\circ\) about a time of 850~ns on the horizontal axis. The initial Mon~2 phase before the rotation is shown by the dashed red line.}
%% \label{f:mon2Rotated}
% \includegraphics[width=0.8\textwidth]{Figures/phaseMons/DiffMon1Mon2Along}
% \caption{Difference between the measured Mon~1 and Mon~2 phase along the pulse with.}
% \label{f:DiffMon1Mon2Along}
%\end{figure}
\newsection{effectsMultiSampCal}{Effect of Variations in Calibration Constant}
\begin{figure}
\centering
\includegraphics[width=0.75\textwidth]{Figures/phaseMons/multiSampMon2Along}
\caption{Effect of using a varying calibration constant on the upstream phase. Top: Phase with a constant calibration constant (blue) and phase with a varying calibration constant (red). Bottom: The difference between the two.}
\label{f:multiSampMon2Along}
\includegraphics[width=0.75\textwidth]{Figures/phaseMons/multiSampMon3Along}
\caption{Effect of using a varying calibration constant on the downstream phase. Top: Phase with a constant calibration constant (blue) and phase with a varying calibration constant (red). Bottom: The difference between the two.}
\label{f:multiSampMon3Along}
\end{figure}
In Section~\ref{ss:calMultiSamp} it was shown how the calibration parameters vary along the pulse. In the PFF algorithm, and usually also in data analysis, single values for each calibration constant are used across the full pulse length. This will lead to small discrepancies between the measured and the true beam phase. Examples of the size of this effect are shown in Figures~\ref{f:multiSampMon2Along}, for Mon~2, and in Figure~\ref{f:multiSampMon3Along} for Mon~3, comparing the measured phase when using single value and the actual point-by-point calibration constants. In the range between 650~ns and 900~ns around the middle of the pulse where the phase sag is flattest (the part of interest for the PFF system) using a varying calibration constant along the pulse makes almost no difference to the measured upstream phase, with residuals of below \(0.2^\circ\) between the two calibration methods. This is unsurprising as the calibration constants normally used are calculated from one sample in this range. %Outside this range the difference between the two reaches a peak of \(1.5^\circ\) near the start of the pulse.
For the downstream phase the differences are larger, including up to \(1^\circ\) offsets between the two methods in the range of interest for the PFF system. However, the example shown is without fully optimised downstream beam conditions achieved in Chapter~\ref{c:phasePropagation} and so represents a worst case scenario for normal PFF operation. The PFF correction quality also does not directly depend on the downstream phase measurement (apart from for the gain calculation, as derived in Section~\ref{s:pffEquations}), so these differences can be removed in offline analysis if deemed necessary.
%\begin{figure}
% \centering
% \includegraphics[width=0.8\textwidth]{Figures/phaseMons/resolutionWithMultiSampleCal}
% \caption{Effect of using a varying calibration constant on the phase resolution.}
% \label{f:resolutionWithMultiSampleCal}
%\end{figure}
\newsection{monPosition}{Dependence on Position}
As discussed in Section~\ref{s:phaseMonDesign} the phase monitor output from the two vertical RF feedthroughs are summed in hybrids, and it is this sum signal that is connected to the mixers. This reduces, but does not remove completely, the dependence of the phase monitor signal power on the beam position in the monitor. In this section the remaining position dependence of the phase measurement is determined.
The magnetic corrector placed roughly 1~m prior to Mon~1 (labelled CT.DHD0360) has been used to scan the beam position in the upstream phase monitors both horizontally and vertically. The position of the corrector with respect to the phase monitors can be seen in Figure~\ref{f:phMonCTPic}. Around 1~m following Mon~2 there is a quadrupole (CT.QFF0420) followed by a BPM (CT.BPM0430). Distances between the elements are shown in Table~\ref{t:distanceFromCT360}. For the purposes of this measurement the quadrupole is turned off so that the whole 3.5~m length of beam line between the corrector and the BPM is a drift space. It is then straightforward to reconstruct the position offset in the two phase monitors based on the BPM measurement without having to rely on the MADX model to take in to account the effect of the quadrupole on the beam orbit.
%A diagram of the locations of the correctors, phase monitors, quadrupole and BPM is shown in Figure~[REF]. Distances between the elements are shown in Table~\ref{t:distanceFromCT360}.
%[TODO: Diagram of corrector, mon1, mon2, quad, bpm locations]
\begin{table}
\begin{center}
\begin{tabular}{|c c c|}
\hline
Device & Distance From CT.0360 & Label\\ \hline
Mon~1 & 104.5~cm & \(s_{M1}\)\\
Mon~2 & 144.5~cm & \(s_{M2}\)\\
CT.BPM0430 & 357.0~cm & \(s_{430}\) \\ \hline
\end{tabular}
\caption{Distance of the upstream phase monitors and following BPM CT.0430 to the corrector CT.0360 before the phase monitors.}
\label{t:distanceFromCT360}
\end{center}
\end{table}
In these conditions a position offset of \(x_{430}\) measured in the BPM (in horizontal or vertical) corresponds to the following position offsets, \(x_{M1}\) and \(x_{M2}\), in each phase monitor:
\begin{align}
x_{M1} &= r_{M1}x_{430} \\
x_{M2} &= r_{M2}x_{430}
\end{align}
where \(r_{M1}\) and \(r_{M2}\) are the position offsets in the phase monitors per unit position offset in the BPM, given by:
\begin{align}
r_{M1} &= \frac{s_{M1}}{s_{430}} \\
r_{M2} &= \frac{s_{M2}}{s_{430}}
\end{align}
and where \(s_{M1}\), \(s_{M2}\) and \(s_{430}\) are the distances between the corrector and the phase monitors (\(s_{M1}\), \(s_{M2}\)) or BPM (\(s_{430}\)). Substituting in the values from Table~\ref{t:distanceFromCT360} gives values of \(r_{M1} = 0.29\) and \(r_{M2} = 0.41\).
\begin{figure}
\centering
\includegraphics[width=0.8\textwidth]{Figures/phaseMons/horizontalPosScan}
\caption{Mon~1 (blue) and Mon~2 (red) phase dependence on the horizontal position during the scan. Error bars show the standard error on the measured phase values at each position (errors on the position are smaller than the markers).}
\label{f:horizontalPosScan}
\includegraphics[width=0.8\textwidth]{Figures/phaseMons/horizontalScanDiode}