Fusion Engineering and Design 85 (2010) 367–369
Contents lists available at ScienceDirect
Fusion Engineering and Design journal homepage: www.elsevier.com/locate/fusengdes
An optical timing verification system for Alcator C-Mod夽 J. Stillerman ∗ , W. Burke, B. Labombard Massachusetts Institute of Technology, 175 Albany Street, Cambridge, MA 02139, USA
a r t i c l e
i n f o
Article history: Available online 30 March 2010 Keywords: Fusion Data acquisition Timing
a b s t r a c t We have built a system to generate and optically distribute a TTL timing waveform around the experiment cell. This waveform provides recognizable time markers which when digitized allow time-bases of the data acquisition equipment and software to be independently verified. The system can be used off line to characterize repeatable system behavior, or channels can be dedicated to digitizing this reference waveform for every shot providing a check for triggering behavior, clock and trigger timing accuracy and overall system correctness. Measuring transient phenomena with different diagnostics at different locations is becoming increasingly important. As measuring frequencies increase it becomes more and more difficult to line up the samples of separate measurements in time. At the same time the channel count for many diagnostics is increasing, lowering the incremental cost of dedicating a channel for time-base verification. In this paper we will describe the system and its motivation, and provide initial results from its deployment. © 2010 Elsevier B.V. All rights reserved.
1. Background
2. Approach
Alcator C-Mod has a distributed timing system that provides synchronized clocks and triggers to the diagnostic racks [1]. Despite this, uncertainty in the times of measurements exists. There are many factors that contribute to the timing uncertainties and errors. Often, diagnostics employ heterogeneous hardware to record their measurements and they are not co-located in the experiment hall. In addition, many high-frequency measurements are recorded using clocks that are internal to the recording devices. The triggering behavior for many digitizers is not well characterized, and is dependent on the relative phase of the clocks and triggers. Occasional hardware and software errors as well as user misconfiguration also contribute to incorrect time measurement. The ability to absolutely synchronize the time-bases of disparate diagnostics is extremely useful, as it allows the correlation of measurements. This in turn, allows analysis of the propagation of phenomena in the machine. We have built a system to distribute synchronized timing signature waveforms to multiple diagnostics on the experiment. These waveforms can be used to verify the time-bases of measured signals, and if necessary correct them.
We have created an optically distributed digital timestamp signal for this purpose. It can be digitized by any diagnostics that can measure voltage as a function of time and used to correlate their time-bases. This signal is either measured on a spare channel, or gated with the measurement signal before and after the discharge, when no spare channels are available. Analyzing the acquired waveform, since we know the times of the signature signal’s edges, we can detect timing discrepancies. These can be flagged when they are due to hardware problems or configuration problems. In the case of digitizers sampling on internal clocks, a new time-base can be constructed that correctly labels the samples at the edges of the signature waveform. The waveforms are distributed over a dedicated star configuration fiber optic network. By using homogeneous fan out electronics and identical fiber runs, we can assure the synchronicity of the delivered waveforms. Simple routines in IDL and Python have been developed which recognize the signature of this waveform and assign absolute times to the samples. Fig. 1 shows an example of the generated waveform. It is made up of 20 bit data frames encoded on a 1 kHz waveform. Each frame has 19 data bits followed by one stop bit. The transmitted data is the current value of a 20 ms, or 50 Hz, counter. Zeros are encoded as a 400 ms pulses; ones are 700 ms. All leading edges are aligned on 1 ms boundaries. The stop bit is a 1 ms low value. This design can accommodate a maximum range of 219 × 20 ms, which is approximately 10,480 s or 2.9 h. It is easily adaptable to other timescales. The timing reference hardware was developed on a 3U General Purpose CPLD Board. This board has flexible front panel I/O with up
夽 This work was supported by the U.S. Department of Energy, Cooperative Grant No. DE-FC02-99ER54512. ∗ Corresponding author at: Massachusetts Institute of Technology, Plasma Science and Fusion Center, NW 17-268, Cambridge, MA 02139, USA. Tel.: +1 781 648 6145. E-mail address:
[email protected] (J. Stillerman). 0920-3796/$ – see front matter © 2010 Elsevier B.V. All rights reserved. doi:10.1016/j.fusengdes.2010.02.003
368
J. Stillerman et al. / Fusion Engineering and Design 85 (2010) 367–369
Fig. 1. Digitized time signature signal.
to four fiber optic or Lemo connectors. It is based on an inexpensive Atmel ATF1508 CPLD ($10 US) with 128 macrocells. The timing signature logic uses 40% of the chip resources. The 20 MHz on-board crystal allows 50 ns time resolution. It can also be implemented on a larger 6U CPLD Board to deploy the timing reference. These can be fitted with 12–36 flexible I/O ports and use same CPLD and programming. The initial algorithm uses subtraction of adjacent samples to find the transitions in the signature waveform. These indices are then subtracted from each other to get the bit widths and stop bit positions. Once this is done, the times encoded as numbers in the signature can be read off trivially. 3. Results A test setup was created using two independently clocked and triggered 10 MHz digitizers. The test waveform shown in Fig. 2 overlaid with the timing signature signal were recorded by each
Fig. 2. Timing signature overlaid with test signal.
Fig. 3. Detail showing discrepancy after 1E7 samples.
digitizer. Fig. 3 shows the accumulated discrepancy after 1 s of recording. By constructing a new time-base based on the times extracted from the timing signature signal, the traces of the two test measurements can be accurately aligned. This is shown in Fig. 4. Even though the test setup used two digitizers in the same rack, it provides a clear demonstration that this method can be used to both verify and correct a time-bases of measured signals. 4. Future directions We plan to deploy the system for use with the probe diagnostics during the 2009 experimental campaign. As we gain experience with it, we will work on a wider deployment to other diagnostics. In addition we plan to develop automated software to both verify and extract time-bases. Using signal switching electronics, timing signature signals will be automatically swapped with data signals before and after the experiment, providing this functionality on every shot without the need for extra digitizer channels. If necessary, the time signature will be provided in a variety of bit rates so that faster and slower measurements can be aligned. The fast
Fig. 4. Test signals after time-base correction.
J. Stillerman et al. / Fusion Engineering and Design 85 (2010) 367–369
rise time of the signal along with the relatively wide data widths make it applicable to a wide range of timescales, so this may not be necessary. In the longer term, the system can be used to achieve subsample timing accuracy. The samples which fall on the rising or falling edges of the signature signal can be very accurately timestamped. In addition, the frequencies of the sampling clock and the time signature signal can be beat against each other and used as a vernier. These techniques increase the range of the timescales that can be handled by given time signature signal. Statistical and frequency analysis of the measured time signatures can be used to identify timing anomalies. By digitizing and analyzing this extra signal, we can provide shot to shot verification that the measurement recording hardware and software is correctly functioning. 5. Conclusions Most modern experiments provide hardware and software for distributing and sharing clocks and triggers between diagnostics [2,3]. Despite having these, questions arise about the exact timing
369
of measurements. The factors that lead to these questions include user misconfiguration, incorrect triggering behavior characterization, the use of internal clocks for high-frequency measurements and malfunctioning hardware, firmware and software. We have developed a simple external timing verification system that can be used to eliminate timing uncertainty regardless of the underlying cause. This system makes no assumptions about the validity of the provided clocks and triggers. It does all of its calculations based on the known characteristics of the input signal and sample numbers of the transitions of this signal. References [1] J. Bosco, S. Fairfax, The Alcator C-MOD control system, in: Proceedings, 14th IEEE/NPSS Symposium on, 30 Sep–3 Oct 1991, Fusion Engineering 2 (1991) 782–785. [2] J. Schacht, H. Niedermeyer, C. Wiencke, J. Hildebrandt, A. Wassatsch, A triggertime-event system for the W7-X experiment, Fusion Engineering and Design 60 (June (3)) (2002) 373–379, doi:10.1016/S0920-3796(02)00035-2, ISSN 09203796. [3] S. Sudo, H. Nakanishi, M. Emoto, S. Ohdachi, M. Kojima, K. Watanabe, et al., LHD Experiment Group, overview of LHD diagnostics and data acquisition system, Fusion Engineering and Design 48 (August (1–2)) (2000) 179–185, doi:10.1016/S0920-3796(00)00121-6, 0920-3796.