development of spacewire-based waveform-sampling pulse height analyzer … · 2009-06-15 ·...

91
Development of SpaceWire-based waveform-sampling pulse height analyzer and its application to a hard X-ray detector Takayuki Yuasa Department of Physics Graduate School of Science The University of Tokyo January, 2008

Upload: others

Post on 01-Apr-2020

10 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

Development of SpaceWire-basedwaveform-sampling pulse height analyzerand its application to a hard X-ray detector

Takayuki Yuasa

Department of PhysicsGraduate School of Science

The University of Tokyo

January, 2008

Page 2: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

Abstract

In the present thesis, we developed a new data acquisition system based on SpaceWire which isa promising network protocol for onboard detectors and satellite system components. The dataacquisition system consists of a small-sized computer SpaceCube and standard interface circuitboards. We developed a software library and template VHDL scheme for a user application onSpaceCube and an FPGA logic on the interface board. The data acquisition system has been usedin a several experiments.

As a part of a future satellite-onboard detector development, we implemented a SpaceWire-based 8-channel waveform-sampling ADC (analog-to-digital converter) board, and used it to cali-brate a number of scintillator to be used in a near-future balloon experiment. By measuring spectraof conventional γ-ray detectors which consists of a scintillator crystal and an avalanche photodiode, we examined the spectral performance of the board and showed the same energy resolutionas that of a commercially available product.

To fully utilize the performance of the waveform-sampling ADC, we further developed a super-resolution method based on the cross correlation between the template waveform and observedwaveforms. By applying the method to a time-of-flight measurement of back-to-back 511 keVγ-rays with two scitillator crystals and photomultiplier tubes, we obtained the time resolution of< 3 ns (FWHM) from waveform data acquired at 50 MHz (20 ns sampling interval).

Page 3: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

Contents

1 Introduction 9

2 SpaceWire Protocol and Remote Memory Access Protocol 122.1 SpaceWire Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122.2 Remote Memory Access Protocol (RMAP) . . . . . . . . . . . . . . . . . . . . . 17

3 SpaceWire-based Data Acquisition Framework 193.1 An Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193.2 Development of Hardware Devices . . . . . . . . . . . . . . . . . . . . . . . . . . 20

3.2.1 SpaceCube . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203.2.2 Standard Circuit Boards with SpaceWire Interfaces . . . . . . . . . . . . . 22

3.3 Development of Software and Logic Framework . . . . . . . . . . . . . . . . . . . 253.3.1 RMAP Library for User Application Programs on SpaceCube 1 . . . . . . 253.3.2 Modularized HDL Scheme for User FPGA on the Standard Circuit Boards 26

3.4 Basic Performance Measurement of the Developed Data Acquisition Framework . 283.4.1 Transfer Speed of SpaceWire/RMAP Protocol Stack . . . . . . . . . . . . 283.4.2 Transfer Speed of the On-chip Bus of User FPGA . . . . . . . . . . . . . . 28

4 Development of an 8-ch Waveform-Sampling ADC Board 314.1 Board Design and Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . 314.2 The Analog Part . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

4.2.1 An Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324.2.2 A pipelined ADC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

4.3 Development of a User FPGA Logic . . . . . . . . . . . . . . . . . . . . . . . . . 344.3.1 An Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344.3.2 Internal Structure of a User FPGA Logic . . . . . . . . . . . . . . . . . . 354.3.3 Channel Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354.3.4 Channel Manager Module . . . . . . . . . . . . . . . . . . . . . . . . . . 384.3.5 Switch Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384.3.6 Calculator Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394.3.7 Calculator Manager Module . . . . . . . . . . . . . . . . . . . . . . . . . 39

4.4 Readout of the ADC Board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404.4.1 An Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

2

Page 4: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

CONTENTS 3

4.4.2 Readout Program on SpaceCube . . . . . . . . . . . . . . . . . . . . . . . 404.4.3 Recorder Program on a PC . . . . . . . . . . . . . . . . . . . . . . . . . . 424.4.4 Off-line Aanalysis Software . . . . . . . . . . . . . . . . . . . . . . . . . 42

4.5 Basic Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424.5.1 Power Consumption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424.5.2 Linearity and Noise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434.5.3 Waveform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434.5.4 Throughput and Transfer Speed . . . . . . . . . . . . . . . . . . . . . . . 44

4.6 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

5 Spectral Measurements with a Digital Peak-holding Method 485.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 485.2 A Digital Peak-holding Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

5.2.1 An Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 485.2.2 Measurements of the Performance of the Digital Peak-Holding Method . . 495.2.3 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

5.3 Spectral Measurement of Single Channel . . . . . . . . . . . . . . . . . . . . . . . 545.3.1 An Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 545.3.2 Measurement Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 545.3.3 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

5.4 Spectral Measurement of Multiple Channels . . . . . . . . . . . . . . . . . . . . . 575.4.1 An overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 575.4.2 A Compton camera surrounded by active shielding scintillators . . . . . . 575.4.3 Experimental Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 585.4.4 Results and Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

5.5 Coincidence Measurement between Multiple Channels . . . . . . . . . . . . . . . 615.5.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 615.5.2 γ-rays from 22Na . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 615.5.3 Experimental Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 625.5.4 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63

6 Improvements of Energy and Time Resolution in Low Sampling Rate Measurements 686.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 686.2 A Cross-Correlation Method with a Template Waveform . . . . . . . . . . . . . . 69

6.2.1 Setup of the problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 696.2.2 Methods to define template waveform . . . . . . . . . . . . . . . . . . . . 70

6.3 Restoration of Spectral Resolution of Test Pulses . . . . . . . . . . . . . . . . . . 716.3.1 Preliminary analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 716.3.2 Cross-correlation with a template waveform . . . . . . . . . . . . . . . . . 71

6.4 Restoration of the Energy Resolution of Actual Detector Spectra . . . . . . . . . . 776.4.1 Measurement and Analysis Setup . . . . . . . . . . . . . . . . . . . . . . 77

Page 5: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

4 CONTENTS

6.4.2 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 786.5 Restoration of the Time Resolution . . . . . . . . . . . . . . . . . . . . . . . . . . 79

6.5.1 An Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 796.5.2 Preliminary Experiments . . . . . . . . . . . . . . . . . . . . . . . . . . . 796.5.3 Result of test pulse measurement . . . . . . . . . . . . . . . . . . . . . . . 796.5.4 Time-of-flight experiment . . . . . . . . . . . . . . . . . . . . . . . . . . 826.5.5 Results of time-of-flight experiment . . . . . . . . . . . . . . . . . . . . . 83

Page 6: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

List of Figures

1.1 A schematic drawing of HXD-Sensor. . . . . . . . . . . . . . . . . . . . . . . . . 10

1.2 Background spectra of sillicon PIN detectors of the HXD. . . . . . . . . . . . . . . 11

2.1 Features of SpaceWire. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

2.2 SpaceWire connector and cable assembly. . . . . . . . . . . . . . . . . . . . . . . 14

2.3 An example of signal encoding in the SpaceWire protocol. . . . . . . . . . . . . . 14

2.4 Data and Controll characters used in SpaceWire links. . . . . . . . . . . . . . . . . 15

2.5 The SpaceWire packet format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

2.6 Examples of a SpaceWire packet routing. . . . . . . . . . . . . . . . . . . . . . . 16

2.7 The RMAP Command and Reply packet structure. . . . . . . . . . . . . . . . . . 18

2.8 A typical RMAP transaction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

3.1 SpaceCube 1 and 006P type battery for size comparison. . . . . . . . . . . . . . . 21

3.2 A block diagram of SpaceCube 1. . . . . . . . . . . . . . . . . . . . . . . . . . . 21

3.3 A photograph of SpaceCube 2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

3.4 A block diagram of a standard SpaceWire circuit board and a picture of SpaceWireDigital I/O board. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

3.5 ”External” Bus signal connections between SpaceWire FPGA and User FPGA ina standard circuit board. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

3.6 Timing chart of External Bus. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

3.7 A SpaceWire/RMAP protocol stack on SpaceCube 1. . . . . . . . . . . . . . . . . 25

3.8 A block diagram of internal structures of two FPGAs. . . . . . . . . . . . . . . . . 27

3.9 Signal names and directions connected between a User module, a bus I/F, and thebus arbiter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

3.10 An actual connection topology of the developed User FPGA on-chip bus. . . . . . 29

3.11 A block diagram of User FPGA logic used in the on-chip bus speed measurement. . 29

3.12 A hard copy of oscilloscope screen. . . . . . . . . . . . . . . . . . . . . . . . . . 30

4.1 A block diagram of the SpaceWire ADC Box board. . . . . . . . . . . . . . . . . . 32

4.2 A picture of the SpaceWire ADC Box board and its layout drawing. . . . . . . . . 33

4.3 A schematic diagram of one of the eight analog circuits of the SpaceWire ADC Box. 34

4.4 A schematic diagram of the internal structure of ADC AD9238. . . . . . . . . . . 34

5

Page 7: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

6 LIST OF FIGURES

4.5 A block diagram of the User FPGA modules that are involved in waveform pro-cessing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

4.6 A detailed block diagram of the User FPGA logic. . . . . . . . . . . . . . . . . . . 374.7 Signal connections between four submodules of the Channel Module. . . . . . . . 384.8 The data structure used in the Buffer module. . . . . . . . . . . . . . . . . . . . . 384.9 An example structure of an event packet created in the Calculator module. . . . . . 394.10 A schematic structure of the SDRAM used as a ring buffer. . . . . . . . . . . . . . 404.11 A configuration of data readout and recording. . . . . . . . . . . . . . . . . . . . . 404.12 A flow chart of the readout program on SpaceCube. . . . . . . . . . . . . . . . . . 414.13 Power consumption of ADC AD9238 series, taken from the data sheet published

by Analog Devices. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434.14 A histogram of ADC values for a constant input voltage of +1.0V. . . . . . . . . . 444.15 The linearity of the SpaceWire ADC Box. . . . . . . . . . . . . . . . . . . . . . . 454.16 The digitized waveform. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

5.1 A schematic drawing of digitized waveform sampled at (a) high and (b) low rates. . 495.2 A setup of the test-pulse measurements. . . . . . . . . . . . . . . . . . . . . . . . 505.3 Waveform data for a 1022 mV test pulse and test pulse histograms. . . . . . . . . . 525.4 Overlaid test pulse spectra. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 535.5 Peak channel versus input pulse height. . . . . . . . . . . . . . . . . . . . . . . . 535.6 A configuration of the spectral measurement with the SpaceWire ADC Box and

Pocket MCA. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 545.7 A waveform of the input pulse taken with the SpaceWire ADC Box. . . . . . . . . 555.8 137Cs spectra of 5×5×5mm3 CsI scintillator viewed by an APD. . . . . . . . . . . 565.9 A typical interaction in a Compton camera. . . . . . . . . . . . . . . . . . . . . . 585.10 A schematic drawing of anti-shielding counters of the Compton camera. . . . . . . 595.11 A schematic configuration and a photograph of the experimental setup employed

in the simultaneous calibration of four CsI scintillators. . . . . . . . . . . . . . . . 605.12 Block diagrams of the newly developed two amplifiers (Clear Pulse Co, Ltd.). . . . 605.13 Output waveforms from the amplifiers for an input charge of 0.5 pC to the CSA. . . 615.14 Spectra of 137Cs taken with eight CsI scintillator each viewed by an APD. . . . . . 625.15 Light yield of eight CsI scintillators. . . . . . . . . . . . . . . . . . . . . . . . . . 635.16 A decay diagram of 22Na, and a schematic drawing of a pair of 511 keV γ-rays,

due to electron-positron annihilation. . . . . . . . . . . . . . . . . . . . . . . . . . 635.17 A setup of the coincidence measurement among four scintillators. . . . . . . . . . 645.18 The event packet structure used in the present measurement. . . . . . . . . . . . . 645.19 Spectra of 22Na taken with the four APD+CsI and the SpaceWire ADC Box. . . . . 645.20 22Na spectra of each APD+CsI pair after coincidence filtering. . . . . . . . . . . . 665.21 Histograms of APD+CsI No.29 placed at Pos (i). . . . . . . . . . . . . . . . . . . 67

6.1 Examples of waveform sampling with three different pulse phases. . . . . . . . . . 696.2 An example of output pulses from a shaping amplifier. . . . . . . . . . . . . . . . 69

Page 8: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

LIST OF FIGURES 7

6.3 The template waveform created by averaging 100 pulse waveform data of 1022mV-pulse-height measured at 50 MHz. . . . . . . . . . . . . . . . . . . . . . . . . 71

6.4 An example of the cross-correlation coefficient. . . . . . . . . . . . . . . . . . . . 726.5 The template waveform overlaid on to an observed waveform. . . . . . . . . . . . 726.6 Definitions of the variables used in the pulse-height calculation. . . . . . . . . . . 736.7 Histograms of the restored pulse height for 2.5 MHz measurement. . . . . . . . . . 756.8 Histograms of the restored pulse height for 1 MHz measurement. . . . . . . . . . . 766.9 The template waveform constructed from pulses from the APD+CsI detector, each

produced by a 662 keV γ-ray. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 776.10 Spectra of 137Cs taken with the SpaceWire ADC Box at a sampling rate of 1 MHz. 786.11 A setup of the test pulse experiment. . . . . . . . . . . . . . . . . . . . . . . . . . 796.12 An oscillograph of the shaper output. . . . . . . . . . . . . . . . . . . . . . . . . 806.13 An example of a waveform of a test pulse digitized at 50 MHz (20 ns intervals). . . 806.14 The created template waveform (left) and a close-up of the peak (right). . . . . . . 816.15 A histogram of the arrival time difference between Channel 0 and 1 in the test

pulse measurement. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 816.16 An oscillograph of the shaping amplifier output . . . . . . . . . . . . . . . . . . . 836.17 A measurement setup of the time-of-flight experiment. . . . . . . . . . . . . . . . 836.18 The spetrum of 22Na obtained with the LaCl3 and PMT pair. . . . . . . . . . . . . 846.19 The template waveform of the two channels. . . . . . . . . . . . . . . . . . . . . . 856.20 The histogram of delta-T between back-to-back events observed by the two detectors. 866.21 The path difference and difference of the event arrival time overlaid with the best-

fit linear function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86

Page 9: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

List of Tables

3.1 Specifications of SpaceCube 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213.2 Specifications of SpaceCube 2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223.3 List of available standard SpaceWire circuit boards and their functionalities. . . . . 243.4 A list of groups that use the User FPGA template scheme. . . . . . . . . . . . . . . 27

4.1 Specifications of the SpaceWire ADC Box board. . . . . . . . . . . . . . . . . . . 32

5.1 A list of the number N of the sampled data in the event packet. . . . . . . . . . . . 505.2 The peak center and broadening. . . . . . . . . . . . . . . . . . . . . . . . . . . . 515.3 The best-fit Gaussian parameters and 1σ errors for the 662 keV peak. . . . . . . . . 555.4 A list of the selected APDs and their avalanche gain at a bias voltage of 390 V. . . . 585.5 Results of spectral measurements of the eight trapezoidal CsI, each viewd by an

APD. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62

6.1 The peak center and broadening obtained from the restored histograms of the 2.5and 1 MHz data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73

6.2 The best-fit Gaussian parametes∗. . . . . . . . . . . . . . . . . . . . . . . . . . . . 786.3 Characteristics of scintillators. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 826.4 The configuration of five measurements. . . . . . . . . . . . . . . . . . . . . . . . 846.5 The best-fit parameters of the peaks in the histograms of the arrival time difference. 85

8

Page 10: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

Chapter 1

Introduction

Observations of celestial objects in a hard X-ray band (∼10 to several hundreds keV) have largesignificance, because it can reveal, for example, intermediate states of cosmic plasmas betweenthermal and non-thermal phases, and furthermore, can address the mechanism of the cosmic-rayacceleration. However, high-quality astrophysical observations in the hard X-ray band have beenhampered by difficulties in photon focusing, a high background environment in the space, andcomplex interactions between photons and detector materials. The high background is caused byprimary cosmic ray particles, their secondary products, and radio-activations of detector materialsthemselves. The major interaction mode changes from photo absorption (.100 keV) to Comptonscattering (&100 keV).

An effective way of overcoming these dificulties is provided by the use of active shielding andanti-coincidence scheme. Employing these techniques, a series of novel cosmic hard X-ray detec-tors have been developed in Japan through balloon experiments [3, 12]. The attempt has realizedthe Hard X-ray Detector (HXD) instrument [13, 4], put successfully onboard the Suzaku satellite[6] launched on 2005 July 10. In Figure 1.1, we show an overview of the HXD detector, and inFigure 1.2 spectra taken with PIN diode detectors of the HXD. Thus, applying successively the im-plemented background-rejection technique, the Suzaku HXD has achieved the lowest backgroundand the best sensitivity in an energy range between 10 keV to several 100 keV. Indeed, a numberof scientific outcomes, based on the hard X-ray view of the universe, have been published.

So far, scientific satellite including Suzaku have been using custom-made data buses of theirown, without much compatibility among them. However, in future satellite missions, a networkprotocol called SpaceWire [1, 9] will be employed as a universal satellite bus system. Onboarddetectors and satellite system components are connected with the SpaceWire protocol. From theearly stage of the detector development, we should employ the protocol as its readout system,so that the detector can be smoothly connected to the satellite bus system in the satellite integra-tion phase. Our group has been involved in the development and standardization process of theSpaceWire-based satellite network system in the runup to other groups in Japan.

As a part of general effort of developing a new data acquisition framework based on theSpaceWire network protocol, we develop in the present thesis, a template logic scheme for a cir-cuit board with SpaceWire interface, a software library that provides easy access to SpaceWire

9

Page 11: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

10 CHAPTER 1. INTRODUCTION

communication to user application programs [18, 8]. Furthermore, we develop a SpaceWire-based8-channel ADC (analog-to-digital converter) board, and utilize it to calibrate a number of scintilla-tor to be used in a near-future balloon experiment. These developments are also considered to be animportant step in our R&D activities toward a next-generation satellite, NeXT (New ExplorationX-ray Telescope), scheduled for launch in early 2010s.

In Chapter 2 and Chapter 3, an introduction to the SpaceWire protocol and the SpaceWire-based data acquisition framework are described, respectively. In Chapter 4, we describe the designconcept of the newly developed ADC board. In Chapter 5, we utilize the ADC board to measureCsI active shielding counters, which will be used in a balloon experiment. Chapter 6 presents amethod to improve the energy resolution and time resolution of the device under low samplingrates.

Fig. 3. Schematic drawing of HXD-S. It consists of 16 well-counter units and 20 anti-counter units.

3. HXD Sensor (HXD-S)

Since the background level sets the sensitivity limit in the hard X-ray band, the HXD

is designed to minimize the background by its improved phoswich (acronym for PHOSphor

sandWICH) configuration for the energy region above 40 keV and the adoption of newly-

developed thick silicon PIN diodes for the energies below ! 70 keV. Our detector ensures a low

background though the following techniques.

1. Well-type active shield:

In phoswich counters, two crystals with di!erent decay times are used for the detection

part (faster decay time) and the shielding part (slower decay time), and both signals are

extracted by a single photomultiplier. The improvement is that the shield is shaped in a

well, so that it also acts as an active collimator (well-type active shield). This narrows the

5

Figure 1.1: A schematic drawing of HXD-Sensor, taken from [13]. Cosmic hard X-rays, comingfrom the top direction, are detected by a 4×4 array of ”well-type” detectors, which work indepen-dently but under a tight mutual anti-coincidence. Each detector employs ”phoswitch” techniquewith a well-shaped active collimation, together with a hybrid structure made of sillicon PIN diodesand scintillators. The array is further surrounded by 20 BGO active shield counters.

Page 12: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

11

Fig. 9. The background spectra summed over the 64 PINs, acquired under various reduction conditions

(see text). They are normalized by the total geometrical area of the 64 PIN diodes.

anti-coincidence method, which comprises the basic concept of the HXD. Before applying the

anti-coincidence, a typical summed event rate from all the 64 PIN diodes is already reduced

down to 2–3 ct s!1, about one percent of the initial trigger rate, most of which are caused

by the in-orbit electrical interferences or thermal noise. Figure 9 illustrates how the PIN

background is reduced by stepwise application of anti-coincidence conditions. In the figure,

the crosses denote events which were extracted from a period when the PMT high-voltages

were reduced to zero due to operational reasons, that is, when the BGO shields were working

only as “passive” shields and collimators rather than the active anti-coincidence counters. This

background level is as high as those achieved in past hard X-ray missions equipped with passive

collimators (Rothschild et al. 1998; Frontera et al. 1997). Once the BGO shields start working

and the hard-wired PSD function is enabled (i.e., events with significant energy deposits onto

BGO are discarded in HXD-AE), the background decreases by a factor of 3 as indicated by

the open triangles in figure 9. Since the threshold energy for the PSD is higher than that for

the hit-pattern generation, the remaining events can be almost halved through on-ground data

screening, by discarding those events which carry the hit-pattern flag from the same unit (filled

triangles).

The whole detector volume of HXD is always exposed to energetic cosmic-ray particles,

of which the energies are higher than the geomagnetic cut-o! rigidity (COR) of several GV,

with a typical flux of !1 particle s!1 cm!2. When they penetrate the detector, secondary

radiation is promptly generated and adds to the background events in surrounding units. Since

most of the cosmic-ray particles are charged, their penetration usually causes simultaneous hits

to multiple units. This “multiplicity”, N , defined by the hit-pattern signals, can be used as

an e"cient tool for the rejection of such events. Here, a valid PIN or GSO event is defined

to have a multiplicity N (0"N"35), if there are simultaneous hits in N units excluding the

relevant triggering unit itself. If a smaller multiplicity is required as the screening condition,

16

Figure 1.2: Background spectra of sillicon PIN detectors of the HXD, taken from [4]. Crosses andopen triangles show background spectra taken when the surrounding BGO active shield countersare used as ”passive” and ”active” shielding, respectively. The other spectra represent residualbackground, obtained by progressively tightening the condition of anti-coincidence backgroundrejection [4].

Page 13: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

Chapter 2

SpaceWire Protocol and Remote MemoryAccess Protocol

2.1 SpaceWire Protocol

A scientific satellite must have a data bus through which various ”subsystems” onboard commu-nicate with one another, by sending/receiving commands, observed data, status flags, and otherpieces of information. So far, different missions have been using custom-made data buses of theirown, to meet diverse mission requirements. However, developing, testing, and trouble-shootingthese buses have been taking considerable time and financial resources, because experiences ac-quired with preceding developments were not efficiently fed to the following ones, and it was noteasy to improve the reliability of such single-use products.

With these backgrounds, a standard serial link protocol for spacecraft-borne networks, calledSpaceWire protocol[1], was proposed and developed, in order to replace these spacecraft buses,and hence to make the spacecraft developments more quick, cost-efficient, and reliable. The stan-dardization of this particular protocol has been carried out by ESA, NASA, JAXA, and other spaceagencies in several countries. SpaceWire can be used to control onboard instruments, to collectand transfer instrumental data, and to distribute time-code. With upper layer protocols, it flexiblymeets broad-ranging demands which arise in the mission planning, design, and integration stage.

Actually, SpaceWire has already been used successfully in several space missions such as Swift(γ-ray burst observatory), Rosetta (comet explorer), and Mars Express (Mars explorer). FutureJapanese scientific satellites, including SDS-I/SWIMµν (small-sized gravitational wave detectoronboard Small Demonstration Satellite), the aforementioned NeXT (X-ray/γ-ray observatory), andBepi Colombo/MMO (Mercury explorer, in cooperation with ESA), will be based on SpaceWire.SpaceWire is also used in the data acquisition system for high energy particle experiments not onlyin the spacecrafts [7].

SpaceWire is a full duplex, point-to-point, serial link protocol which enables high-speed (2–400 Mbps) data transfer between two nodes. Figure ?? shows a schematical overview of featuresof SpaceWire. It is designed for use in spacecrafts, where all kinds of resources (power, mass,area, etc.) are limited. Therefore, SpaceWire has a simple protocol structure so that it requires

12

Page 14: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

2.1. SPACEWIRE PROTOCOL 13

small logic resources and low power consumption for its implementation. At the same time, ahigh reliability, which is essential in space-borne experiments, is retained by a strict error han-dling procedure and a parity bit put on each character in packets. Flexible topology realized bya routing switch also improves the reliability of a SpaceWire network by providing to spacecraftdesigners with a fault-torelant and redundant network structure. Below we summarize features ofthe SpadceWire protocol.

Figure 2.1: Features of SpaceWire.

The protocol definition extends over the physical, data link, network, and transport layersin the OSI network reference model. In the physical layer, Low Voltage Differential Signaling(LVDS,[5]) is used, together with coaxial twisted metal cables connected to 9-pin micro D-subconnectors. The pin assignment is shown in Figure 2.2. The data link layer employs the Data-Strobe signal encoding, thus eliminating Phase Locked Loop circuit in the receiver node, which isoften needed by high-speed data link protocols. Clock recovery can be done with XORing the dataand strobe signals as shown in Figure 2.3. Data recovery is also done by latching the data signal atthe leading and trailing edges of the recovered clock.

In the character level of the SpaceWire protocol, three types of characters are defined, that is,Data Character, Control Character, and Control Codes. A character consists of a series of bits (1 or0), and is a unit of information transmission between nodes connected to a SpaceWire network. Anactual communication via a SpaceWire network is done by exchanging a series of these characters,called a packet. We show character types and their structure in Figure 2.4.

Data Character A Data Character consists of a parity bit and a Data-Control bit (0), followed by8-bit data. The parity rule is described in the specification sheet [1].

Contorol Character A Control Character is sent to tell some special information. It consists of aparity bit and a Data-Control bit (1), followed by 2-bit identifier that corresponds four typesof Control Character; a flow control token (FCT), end of packet (EOP), error end of packet(EEP), and escape (ESC). Since the SpaceWire protocol does not restrict the maximal lengthof a packet, an FCT is used to inform that the transmitter of the FCT can receive another

Page 15: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

14 CHAPTER 2. SPACEWIRE PROTOCOL AND REMOTE MEMORY ACCESS PROTOCOL

Din+

Sin+

Ground

Sout-

Dout-

Din-

Sin-

Sout+

Dout+

1

shell shield

low impedanceconnection

4 twisted-pair linesMDM connector

2

3

4

5

6

7

8

9

Figure 2.2: SpaceWire connector and ca-ble assembly. D and S represent ”Data” and”Signal”, respectively.

Data

1 0 0 1 1 0 1 1 0

Strobe

RecoveredClk

RecoveredData

Figure 2.3: An example of signal encoding inthe SpaceWire protocol. ”Data” and ”Strobe”are actually transmitted signals. ”Recovered Clk”and ”Recovered Data” are recovered in a receivernode.

8-byte so that each node can prevent a buffer overflow. The EOP and EEP is a delimiter of apacket, expressing normal end of a packet and erroneous abortion of a packet, respectively.

Control Codes The Control Codes are NULL and Time-code. The NULL is a character that issent when there is no Data Character or Control Character to be transferred. The Time-codeis used to broadcast the 8-bit time from a node to all the other nodes of a SpaceWire network.

In Figure 2.5, we show a typical packet format defined in the exchange level of the SpaceWireprotocol. Each packet consists of three parts; a destination address, cargo, and EOP. The desti-nation address part designates the address of a node to which the packet is delivered. The cargocontains main body of data, and it is followed by the EOP that is a terminal symbol of the packet.The address part and cargo part consists of a series of Data Characters.

The destination address part of a packet is important in a SpaceWire network, which as shownin Figure 2.6, generally consists of SpaceWire nodes and routing switches. When a routing switchreceives a packet from a certain port, it interprets the destination address and selects the port towhich the packet should be delivered. As illustrated in Figure 2.6, there are two ways to describethe destination address; Path Addressing and Logical Addressing, which are in a sense relative andabsolute addressing, respectively. In the Path Addressing mode, a Destination Address part of apacket consists of a series of ”port numbers” of SpaceWire routing switches that the packet will runthrough. On the other hand, in the Logical Addressing mode, ”Logical Address” of the destinationnode is written in a Destination Address part. A Logical Address is a unique number allocated toeach node, and each routing switch has to know the correspondence between its port number andthe Logical Address connected to it; namely a routing table. When the Logical Addressing mode isused, a ”master” node configures the routing table of each routing switch before the actual packettransfer starts.

Page 16: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

2.1. SPACEWIRE PROTOCOL 15

P 00X

1X

2X

3X

4X

5X

6X

7X

D ata Characters

Parity B itD ata-Control FlagLSB M SB

Control CharactersP 1 0 0

FC T Flow C ontrol TokenP 1 0 1

EOP Normal End of PacketP 1 1 0

EEP Error End of PacketP 1 1 1

ESC Escape

P 1 1 1 NU LL0 1 0 0Control Codes

P 1 1 10 1 2 3 4 5 6 7

LSB M SB

0 T T T T T T T T1 Time-code

Figure 2.4: Data and Controll characters used in SpaceWire links, taken from [1].

Destination Address

Cargo

End of Packet

Figure 2.5: The SpaceWire packet format.

Page 17: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

16 CHAPTER 2. SPACEWIRE PROTOCOL AND REMOTE MEMORY ACCESS PROTOCOL

SpWRouter A

SpW Node

(a) Path Addressing Mode

3

4

1

2 SpWRouter B

3

4

1

23

EOP

Cargo

4,1

EOP

Cargo

L.A.=100

L.A.=101

L.A.=102

L.A.=121

L.A.=120

L.A.=122

(b) Logical Addressing Mode

Routing Tables

Router A

... ... ... ...

L.A.100101102120121122

Port123444

Router B

L.A.120121122100101102

Port3412223

4

1

2

3

4

1

2

L.A.=120

EOP

Cargo

L.A.=102

EOP

Cargo

SpWRouter A

SpWRouter B

SpWRouter B

SpWRouter B

Figure 2.6: Examples of a SpaceWire packet routing. (a) Path Addressing mode that utilizesport numbers of SpaceWire routing switches. (b) Logical Addressing mode, and routing matricesneeded by routing switches.

Page 18: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

2.2. REMOTE MEMORY ACCESS PROTOCOL (RMAP) 17

2.2 Remote Memory Access Protocol (RMAP)

Remote Memory Access Protocol (RMAP, [2, 10]) is a standardized upper layer protocol ofSpaceWire. It enables for a node in a SpaceWire network to access the local address space (orthe local bus) of another node in the same SpaceWire network. Using this protocol, we can realizevarious types of remote accesses, from 8-bit register access up to 16M bytes data transfer. AnRMAP transaction consists of Command (Write/Read) and Reply packets. The Command and Re-ply packets are represented by a series of Data Characters, and transferred via SpaceWire networkpacked in a cargo of a SpaceWire packet. The Command and Reply packet structures are shownin Figure 2.7.

We show an RMAP transaction flow in Figure 2.8. A transaction source node composes aCommand packet, then sends it to a destination node. The destination node receives and interpretsthe packet to extract such information as the command type (read/write), initial address, accesslength, and data to be written (in write case). The destination node may access its local bus toread/write data from/into nodes in it, such as a memory, a fifo, digital I/O, etc. After the commandis executed successfully or is aborted with an error, the destination node edits a reply packet andsends it back to the source node.

In the present thesis, we have developed an RMAP software library and a template HDLscheme (§3.3) that enables general SpaceWire users to construct an RMAP-based data acquisi-tion system with ease. Furthermore, we utilize the library and the HDL scheme to transfer databetween a ”detector interface board” and a computer called SpaceCube (§3.2).

Page 19: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

18 CHAPTER 2. SPACEWIRE PROTOCOL AND REMOTE MEMORY ACCESS PROTOCOL

Destination Logical Address Protocol IdentifierPacket Type, Command,

Source Path Addr LenDestination Key

Source Logical Address Transaction Identifier (MS) Transaction Identifier (LS) Extended Write Address

Write Address (MS) Write Address Write Address Write Address (LS)

Data Length (MS) Data Length Data Length (LS) Header CRC

Data Data Data Data

Data Data Data Data

Data Data CRC EOP

Last Byte Transmitted

Fitst Byte Transmitted

RMAP Command Packet

RMAP Reply Packet

De

Last Byte Transmitted

Fitst Byte Transmitted

Source Logical Address Protocol IdentifierPacket Type, Command,

Source Path Addr LenStatus

stination Logical Address Transaction Identifier (MS) Transaction Identifier (LS) Reserved = 0

Data Length (MS) Data Length Data Length (LS) Header CRC

Data Data Data Data

Data Data Data Data

Data Data CRC EOP

Figure 2.7: The RMAP Command and Reply packet structure, taken from [2] with some mod-ifications. Data section in the Command packet will not appear in Read commands, and Replypackets will not have Data section in Write reply case. CRC means cyclic redundancy check codecalculated as defined in the RMAP protocol.

Source Node

RMAPrequest

result

interpretcommand

prepare Replypacket

RMAPCommand

RMAPReply

Destination Node

Local Bus

Memory

FIFO

Digital I/O

...

Figure 2.8: A typical RMAP transaction. Processes run from the top to bottom of the figure.

Page 20: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

Chapter 3

SpaceWire-based Data AcquisitionFramework

3.1 An Overview

As described in the previous chapter, SpaceWire is a promising network protocol, and many on-going or future space missions have already decided to adopt the protocol as their satellite bussystem. These includes several Japanese scientific space missions, such as SDS-I/SWIMµν, BepiColombo/MMO, and NeXT.

In a development of an instrument that can be connected to a SpaceWire network, standardSpaceWire-based devices, for example, digital I/O, ADC, and CPU, are generally needed. JapanSpaceWire Users Group1 designed and developed two types of hardware devices (§3.2); a standardnetwork controller ”SpaceCube” (§3.2.1) and standard front end circuit boards with SpaceWireinterfaces (§3.2.2).

These devices could be used in a readout system, is users by themselves develop softwarefor SpaceCube and HDL (hardware description language) logic to costomize the standard front-end circuit board(s) according to their requirements. However this is not necessarily easy forgeneral users who are not experts in the data acquisition system. Therefore it is vitally needed todevelop a standard software and logic framework such that general users can readily start a specificdevelopment for their instruments based on.

As a part of the present thesis, we coded a software library and HDL template scheme forSpaceCube and the standard circuit board, respectively, to provide the software and logic frame-work for other users. The work has been done in corporating with Hirokazu Odaka (Departmentof Physics, The University of Tokyo) who is a member of Takahashi group at JAXA/ISAS. Be-low, we introduce SpaceCube and the standard boards (§3.2), and present the design concepts andimplementations of the software and logic framework (§3.3).

1It consists of more than twenty comapanies, universities, and research institutes including JAXA, Osaka Univer-sity, The University of Tokyo, NEC, MIT, etc.

19

Page 21: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

20 CHAPTER 3. SPACEWIRE-BASED DATA ACQUISITION FRAMEWORK

3.2 Development of Hardware Devices

This section describes hardware devices used in a SpaceWire-based data acquisition system. Thedevices were mainly developed by JAXA, Shimafuji Electric Inc., NTSpace, MHI, and JapanSapceWire User’s Group.

3.2.1 SpaceCube

SpaceCube is an architecture name of a computer that has SpaceWire interface(s), and is operatedwith T-Kernel which is a famous embeded real-time OS based on TRON. The architecture hasbeen designed for computers to be used in a SpaceWire network in a satellite. As an intelligentcontroller of the network, it can be used, e.g, to transfer measured data from an instrument to amemory, and to processes the data before sending to ground.

Using a SpaceCube-architecture-based computer, users can emulate a SpaceWire network intheir laboratory, as it will be in their satellites. From ground experiments to onboard operations,the same environments are seamlessly migrated, improving reliability and accumulating technicalpractice.

Several types of SpaceCube computers have been developed so far. One of them is SpaceCube1 which was developed by Shimafuji Electric Inc. and JAXA to be used in experiments on ground.Figure 3.1 shows a photograph of SpaceCube 1. Since SpaceCube 1 totally uses electronics partsfor consumer application, the development costs much lower than that based on expensive MilitarySpecification ones.

SpaceCube 1 is a standard computer in the present SpaceWire-based data acquisition system.Basically, it is a small PC that has general functionalities such as XGA video out, USB, Ethernet,audio, and serial console. Besides them, it has three SpaceWire ports. A functional blcok diagramis shown in Figure 3.2 and detailed specifications of SpaceCube 1 is listed in table 3.1. If a userconnect a display, keyboard, and pointing device to SpaceCube 1, it can be used like an ordianryPC. It is also used via a serial console connecting a host PC to the serial port of SpaceCube 1. Thelatter usage is a common style in a development of an emebeded system with a CPU board.

User applications for SpaceCube 1 can be developed in standard C or C++ language. Thesource codes are compiled to MIPS binary with GNU tools running on cross-compiling environ-ments such as PC Linux, Windows, and Macintosh, then transferred to SpaceCube 1 via a serialconsole or ethernet. The transferred binary is executed by typing the program name in a commandline of the T-Kernel operating system.

SpaceWire communication of SpaceCube 1 is performed by a SpaceWire logic core which isdeveloped by NEC Soft. Ltd. It is implemented in a built-in Field Programmable Gate Arrays(FPGA). The FPGA is connected to a PCI bus of SpaceCube 1 (green rectangular in Figure 3.2).The driver software is also provided by NEC Soft., with which a user application controls the logiccore status and send/receive raw SpaceWire packet data via the PCI bus.

Other SpaceCube-architecture-based computers includes ”SpaceCube 2” (for satellite use, byNTSpace / JAXA), and ”SpaceCard MHI” (compact card type SpaceCube for satellite use, by MHI

Page 22: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

3.2. DEVELOPMENT OF HARDWARE DEVICES 21

SpaceWire I/F

Figure 3.1: SpaceCube 1 and 006P type batteryfor size comparison.

Table 3.1: Specifications of SpaceCube 1.CPU VR5701

MIPS architecture266MHz

RAM 64 MBFlash Memory 16 MBI/F SpaceWire×3,

Compact Flash,XGA video out,Ethernet (100Base)Audio, RS232, JTAG

Power DC 5 VSize 52×52×55 mm3

Audio Codec Mini Jack x 2

CPU(VR5701)

DDR SDRAM64 MB

FLASH Memory16 MB

Compact FlashI/F

RS-232CI/F

PeripheralController

IDEPCI

JTAG

Reset Switch

RTC

Video D-Sub 15pin

Type A I/FUSB

EthernetController

FPGA(SpW Logic)

SpW I/F x 3RJ 45

Figure 3.2: A block diagram of SpaceCube 1.

Page 23: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

22 CHAPTER 3. SPACEWIRE-BASED DATA ACQUISITION FRAMEWORK

/ JAXA). Figure 3.3 shows a photograph of SpaceCube 2, and its specifications are listed in Table3.2. These devices are to be employed in a series of scientific small satellites and medium-scalesatellites.

Figure 3.3: A photograph of SpaceCube 2, takenfrom [14].

Table 3.2: Specifications of SpaceCube 2.CPU HR5000

64 bit, 320 MIPSRAM 8+256 MBFlash Memory 8+256 MBI/F SpaceWire×3,

RS422Power DC 5VSize 71×220.5×175.5 mm3

3.2.2 Standard Circuit Boards with SpaceWire Interfaces

Scientific instruments usually output analog voltage or digital signals. To connect the instrumentsto SpaceWire network, some interface circuits are needed. Therefore, Japan SpaceWire UsersGroup has defined a standard SpaceWire circuit board. It consists of two blocks; a SpaceWireblock and a User block. They are clearly separated using two FPGAs, called SpaceWire FPGAand User FPGA, so that users can be disangaged from a somewhat difficult implementation of theSpaceWire block and can concentrate on the development of their own User block. The Spartan-3series product of Xilinx, Inc., namely XC3S1000 and XC3S400, are mainly used as SpaceWireFPGA and User FPGA, respectively, in the standard SpaceWire circuit boards developed so far.

Figure 3.4 shows a block diagram of a typical standard circuit board, and a sample pictureof SpaceWire Digital I/O board. All standard SpaceWire circuit boards have almost the sameSpaceWire block, meanwhile they differ in User block, in order to realize individual functionalitiesof the board, such as digital I/O, ADC, and DAC. The currently available standard boards have,in their SpaceWire FPGA, a logic core of a SpaceWire/RMAP protocol stack developed by NECSoft. is implemented.

SpaceWire FPGA and User FPGA are connected with a simple 16-bit bus (called ExternalBus), of which the signal connections are shown in Figure 3.5. An RMAP access from anotherSpaceWire node, such as SpaceCube, is converted to an External Bus access in SpaceWire FPGA,and then gets to User FPGA. User block can respond to the original RMAP access, by returningsome data, e.g, detector data or an internal register value, to the External Bus access. Timing chartof External Bus is shown in Figure 3.6.

More than five types of standard SpaceWire circuit boards have been developed so far. Their

Page 24: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

3.2. DEVELOPMENT OF HARDWARE DEVICES 23

"External" Bus(16-bit simple bus)

SpaceWireNetwork

SpaceWire Interface Circuit Board

User FPGA

Digital I/O

Detector ADC/DAC

LED/DIP Switchetc...

SpaceWire FPGA

SDRAM

User blockSpaceWire block

User FPGAXilinx XC3S400

LVCMOSIn(8)/Out(8)

LVDS In(12)/Out(12)LVDS In(12)/Out(12)LVDS In(12)/Out(12)

SpaceWire FPGAXilinx XC3S1000

SDRAM(16MB)

SpaceWire connectors (2)SpaceWire connectors (2)SpaceWire connectors (2)

Figure 3.4: A block diagram of a standard SpaceWire circuit board and a picture of SpaceWireDigital I/O board. SpaceWire block and User block are indicated in red and orange rectangles.

board names and functionalities are listed in table 3.3. The last item of the table, 8ch-waveform-sampling ADC board, is an outcome of the present thesis, for which we designed the functional-ity and implemented User FPGA logic in collaboration with Clear Pulse and Shimafuji Electric(Chapter 4).

Page 25: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

24 CHAPTER 3. SPACEWIRE-BASED DATA ACQUISITION FRAMEWORK

User FPGA SpaceWire FPGA

Grant

Request

Enable

Address(24)

Data(16)

Write/Read

Done

Figure 3.5: ”External” Bus signal connections between SpaceWire FPGA and User FPGA in astandard circuit board. Bidirectional arrows represent bidirectional signals usgin inout mode ofFPGA pins.

!"

!"#$%&'()*+,-.

!/0"SPW-FPGA1)*2324

#$%&'

()&*

*&%

$*+

,-./

,0./

1$2'*3'244 2&#

%(($

1$

(%'%

5 6738

5 6738

5 6738

5 6738

,-./

,-./

,-./

,-./

,0./

#$%&'

()&*

*&%

$*+

,-./

,0./

$*%(3'244 2&#

%(($

$(

5 6738

5 6738

5 6738,-./

,-./

,-./

,0./

(%'%

,0./

9:;<887=>?()&*0.@ABCDEFGHIJKLMNOPQ

5RS3"<7=

5RS3"<7=

TRU6V

5 6738

5RS3W<87=

5RS3W<87=

5RS3<887=

5RS3<887=

5 6738

!"

!"#$%&'()*+,-.

!/0"SPW-FPGA1)*2324

#$%&'

()&*

*&%

$*+

,-./

,0./

1$2'*3'244 2&#

%(($

1$

(%'%

5 6738

5 6738

5 6738

5 6738

,-./

,-./

,-./

,-./

,0./

#$%&'

()&*

*&%

$*+

,-./

,0./

$*%(3'244 2&#

%(($

$(

5 6738

5 6738

5 6738,-./

,-./

,-./

,0./

(%'%

,0./

9:;<887=>?()&*0.@ABCDEFGHIJKLMNOPQ

5RS3"<7=

5RS3"<7=

TRU6V

5 6738

5RS3W<87=

5RS3W<87=

5RS3<887=

5RS3<887=

5 6738

Figure 3.6: Timing chart of External Bus taken from an instruction manual of SpaceWire DigitalI/O board by Shimafuji Electric. The timing refers to the case where SpaceWire FPGA is a masterof the bus access.

Table 3.3: List of available standard SpaceWire circuit boards and their functionalities.Board Name Major FunctionalitiesDigital I/O LVCMOS In 8 ch/Out 8 ch, LVDS In 12 ch/Out 12 ch, RS232C, RS422PoGO ADC 8 ch 12-bit 50 MSamples/s ADC∗ designed for PoGO experimentFADC 1 ch 14-bit 10 MSamples/s ADC† with 4-to-1 analog multiplexerADC/DAC 2 ch 16-bit 500 kSamples/s ADC∗, 4 ch 16-bit DACADC Box‡ 8 ch 12 bit 65 MSamples/s ADC†, 8 ch digital In/Out∗Data output with serial LVDS interface. †Data output with parallel interface.‡Developed in this work.

Page 26: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

3.3. DEVELOPMENT OF SOFTWARE AND LOGIC FRAMEWORK 25

3.3 Development of Software and Logic Framework

To provide a user-friendly development environment of a SpaceWire-based data acquisition sys-tem, we developed a software library for SpaceCube 1 (§3.2.1) and created a modularized logicframework for the standard circuit boards (§3.2.2).

3.3.1 RMAP Library for User Application Programs on SpaceCube 1

As explained in the previous section, SpaceWire logic and driver software on SpaceCube 1 (here-after SpaceCube for simplicity) can only send/receive raw SpaceWire packets when communicat-ing via SpaceWire. Since an RMAP protocol stack is not included in the provided software, usershave to individually code a function that translate an RMAP access request (read/write) into anRMAP command packet according to the RMAP specifications. A Replay RMAP packet returnedby the accessed node is also received as a raw SpaceWire packet in SpaceWire logic (on built-inFPGA), and passed directly to the user application without any interpretation by the driver soft-ware. The user application should interpret a result of the access (succeeded/failed), and retrievedata in a read access case.

The translation and interpretation processes are commonly needed by each user application.Therefore we coded an RMAP library in C++ as a wrapper of the driver software. A schematicview of the SpaceWire/RMAP protocol stack on SpaceCube 1 is shown in Figure 3.7. The RMAPlibrary contains RMAP-read and RMAP-write functions as an application programming interface(API). Those API functions accept address and data of an RMAP request as argument parametersfrom a user application, and then translate the request into an RMAP packet. The translated packetis automatically sent to the destination node via the driver software and SpaceWire logic. A Replyis also interpreted by the RMAP library function, then a result of the RMAP access and reply data(in read case) are returned to the user application.

SpaceWire Logic Core

Driver Software

PCI Bus

RMAP Library

User Application

implemented in this work

provided by NEC Soft.

Hardware (FPGA)

SpaceWire link to the other node

Software in C

Software in C++

Software in C/C++ implemented by each user

Figure 3.7: A SpaceWire/RMAP protocol stack on SpaceCube 1. User application interfaces onlywith the API functions of the RMAP library.

Below is an example of user application using the RMAP library. The example makes someRMAP accesses to a node directly connected to SpaceCube, and then displays the result. Since

Page 27: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

26 CHAPTER 3. SPACEWIRE-BASED DATA ACQUISITION FRAMEWORK

any process related to packet sending/receiving is automatically done in the library, the sourcecode became fairy simple. SpaceWireRMAPHongo}class which appears in the source code is amain body of the RMAP library. Each functions related to an RMAP access is implemented as amember method of this class.

//UserApplication.cpp

//Include a header file of the RMAP library#include "SpaceWireRMAPHongo.h"

int main(int argc, char* argv){

//Instanciate body class of the RMAP librarySpaceWireRMAPHongo* rmap=new SpaceWireRMAPHongo(0);

//Open SpaceWire connectionrmap->openConnection();

//RMAP Write (16 bytes from 0x00000010)int address=0x00000010;vector<char> writedata;for(int i=0;i<16;i++){writedata.push_back((char)i);

}// execute API function of the RMAP libraryrmap->write(address,writedata);

//RMAP Read (16 bytes from 0x00000010)vector<char> readdata;// execute API function of the RMAP libraryreaddata=rmap->read(address,16);

//Display read resultcout << "Read result are" << endl;for(int i=0;i<readdata.size();i++){cout << i << " " << readdata.at(i) << endl;

}

return 0;}

3.3.2 Modularized HDL Scheme for User FPGA on the Standard CircuitBoards

We developed a template HDL scheme for the User block to accomplish these purposes. Animplementation of SpaceWire block in SpaceWire FPGA was done by Shimafuji Electric, usingtheir own on-chip bus, an SDRAM controller, and a SpaceWire/RMAP logic core by NEC Soft.Figure 3.8 shows a whole structure of the scheme. The scheme is written in VHDL and includesa simple 16-bit on-chip bus system, an External Bus adapter module, and a User module template(Figure 3.8). Users can construct their own module that interfaces with their instruments based onthe User module template.

Detailed signal connections of the User FPGA on-chip bus system is illustrated in Figure 3.9.Since use of bi-directional signal lines (namely ”inout” signal) are not recommended inside anFPGA, each User module is actually connected to a bus arbiter composing star network. Thereis no signal line shared among User modules unlike the traditional ”bus”, in which signal lines

Page 28: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

3.3. DEVELOPMENT OF SOFTWARE AND LOGIC FRAMEWORK 27

DIO

ADC

SpaceWire/RMAPLogic Core

SDRAMController

External BusAdapter

External BusAdapter

User ModuleB

User ModuleA

User ModuleC

Bus

I/F

Bus

I/F

Bus

I/F

Bus ArbiterBus Arbiter

InternalRegisters

on-chip bus

"External"Bus

on-chip bus

User FPGA SpaceWire FPGA

implemented by Shimafuji Electricimplemented in this work

D-S inD-S out

AddressData

Bus

I/F

Figure 3.8: A block diagram of internal structures of two FPGAs. Implementations of the schemeare independent, so two on-chip buses are not same although they are indicated in similar blocks.

are shared among connected modules. In this scheme, the bus arbiter is a switch that selects a busmaster and a bus target from connected node (User module) as shown in Figure 3.10. The selectionis done according to the accessed address and address space allocated to each User module.

Each module connected to the on-chip bus can be accessed by External Bus through the busadapter, blue module in Figure 3.8, and eventually can respond to an RMAP access. Additionally,the on-chip bus implementation is encapsulated by bus interface modules, green modules in Figure3.8, so that user modules is only needed to communicate with the bus interface. The on-chip busimplementation can be replaced, if it is necessary, with another higher speed system or one that fitsin smaller logic resources. In these cases, User module implementation will not be affected andavailable as it was.

As shown in table 3.4, this User FPGA template scheme and the RMAP library on SpaceCube(§3.3) has already been used and verified as SpaceWire-based readout system by several missions.In this thesis, we also implemented this scheme into newly developed 8ch ADC board adding somespecific modules that interface with onboard ADC chips and process waveform data (§4.3).

Table 3.4: A list of groups that use the User FPGA template scheme.

Mission Team DetectorPOGO SLAC, Hiroshima U., TITECH Balloon borne gamma-ray polarimeter.Compton camera JAXA/ISAS, et al. Si/CdTe Compton camera.SWIMµν Univ. of Tokyo, JAXA/ISAS, et al. Nano-sized gravitational wave detector.TEM/TES JAXA/ISAS et al. Transmission electron microscope with

transition edge X-ray spectrometer.

Page 29: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

28 CHAPTER 3. SPACEWIRE-BASED DATA ACQUISITION FRAMEWORK

User Module Bus I/F Bus Arbiter

Received Address (16)

Receive Enable

Read

beRead Data (16)beRead Done

Read Address (16)

Received Data (16)

Receive Buffer Full

Receive Buffer Empty

Address (16)Read Done

Read Data (16)

Grant

Bus Busy

beRead

beRead Address (16)

Send Buffer Full

Send Buffer Empty

Send Address (16)

Address (16)

Data (16)

Data (16)

Request (16)

Respond

Send

Read

Send Enable

Send Data (16)

Send

FIF

OR

ecei

ve F

IFO

Figure 3.9: Signal names and directions connected between a User module, a bus I/F, and the busarbiter.

3.4 Basic Performance Measurement of the Developed DataAcquisition Framework

3.4.1 Transfer Speed of SpaceWire/RMAP Protocol Stack

The current implementation of the SpaceWire protocol stack on SpaceCube 1 has a data transferspeed of ∼600 kbps. This value is derived from the time duration of data transfer between a userprogram on SpaceCube and the SDRAM on the standard circuit board (SpaceWire DIO board) viaSpaceWire/RMAP. The SpaceWire protocol in principle has an ability of data transfer at more than100 Mbps. Currently, we are trying to improve the processes, especially to speed up the SpaceWirelogic core on SpaceCube and the driver software.

3.4.2 Transfer Speed of the On-chip Bus of User FPGA

To measure a transfer speed of the on-chip bus, we developed two on-chip bus modules; Trans-mitter that sends 128 kByte data to another on-chip bus module according to a Go command froma user, and Receiver that receives the transferred data then just discard them without any pro-cess. During the transmission, the transmitter module outputs high level to an external pin of UserFPGA, so that elapsed time can be measured by an oscilloscope. Figure 3.11 show a data flow of

Page 30: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

3.4. BASIC PERFORMANCE MEASUREMENT OF THE DEVELOPED DATA ACQUISITION FRAMEWORK29

Bus ArbiterUser Module

Master

Target

: Bus I/F

Figure 3.10: An actual connection topology of the developed User FPGA on-chip bus. In thefigure, master and target User module are joined inside the bus arbiter which is essentially a switchor a multiplexer.

this measurement. In this measurement, the on-chip bus and connected modules are operated at 50MHz clock.

Figure 3.12 shows a result of the measurement. The duration of the high signal (during trans-mission) is ∼13.8 ms, consequently the transfer speed is calculated as 128 kBytes/ 13.8 ms = 9.3MByte/s = 74Mbps.

logic out

during (2) External BusAdapter

ReceiverModule

TransmitterModule B

us I/

FB

us I/

F

Bus

I/F

Bus Arbiter

"External"Bus

SpaceWireFPGA from User

(2) Transfer 128 kB

on-chip bus

User FPGA

(1) Go (register write)

Figure 3.11: A block diagram of User FPGA logic used in the on-chip bus speed measurement.Red and blue arrows represent paths of a Go command from a user, and the 128 kByte data transfer,respectively. The duration of the high signal output by the Transmitter Module is measured.

Page 31: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

30 CHAPTER 3. SPACEWIRE-BASED DATA ACQUISITION FRAMEWORK

Figure 3.12: A hard copy of oscilloscope screen. Channel 1 and 2 shows logic out from theTransmitter Module during the 128 kByte data transmission, and Done signal for single 16 bittransfer which is output by the Bus Arbiter, respectively. Channel 2 seems discontinuous in thescreen because of its frequent switching (65536 times in 13.8 ms) between low and high logiclevels.

Page 32: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

Chapter 4

Development of an 8-chWaveform-Sampling ADC Board

Future satellites and detectors onboard them are expected to be totally based on a SpaceWirenetwork. Several interface boards have been already developed and used in actual readout systems.

In the present thesis, we have newly developed a SpaceWire-based 8-channel waveform-samplingADC board, which can be utilized especially, e.g. in a multi-component detector incorporating so-phisticated anti-coincidence scheme. The data acquisition scheme (the RMAP library and theHDL template scheme) which were explained in §3.3 was also utilized. The board design anddevelopment were carried out together with Clear Pulse and Shimafuji Electric.

4.1 Board Design and Implementation

In Figure 4.1, we show a block diagram of the ADC board (hereafter SpaceWire ADC Box) devel-oped here. The board accepts eight analog signals. They are buffered by differential buffer amps,and then digitized simultaneously by four discrete dual-ADC chips that have a 12-bit resolutionand a maximum sampling rate of 65 MHz. Like the previous standard circuit boards, this board isalso equipped with the two FPGAs; User FPGA and SpaceWire FPGA.

We did not employ an analog peak-holding circuit so that the waveform data can be processedin the User FPGA logic, e.g., digital filtering, functional fitting, interpolation, and so on. Thedigitized signals are transferred in parallel from the ADC to the User FPGA, processed, and thenstored in an SDRAM. The stored data are transferred to SpaceCube via SpaceWire I/F, which iscontrolled by the SpaceWire FPGA. The SDRAM is connected to the User FPGA in the presentboard, while it was attached to the SpaceWire FPGA in the previous ones. Xilinx Spartan-3 seriesare selected for the FPGA chips of this board, as well as for the previous boards.

Specifications of the board are listed in table 4.1. Rather high power consumption, 8W infull operation, is mainly due to the four ADC chips. The power down pins (PDWN) of the ADCchips are connected to the User FPGA. In the User FPGA logic, the ADC operation mode (poweron/power down) is stored in a register for each ADC channel. Therefore, when only a part offour ADC is needed in a measurement, e.g., in a single channel measurement, the rest ADC chips

31

Page 33: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

32 CHAPTER 4. DEVELOPMENT OF AN 8-CH WAVEFORM-SAMPLING ADC BOARD

can be suspended (power down) by setting off these registers from a readout program running onSpaceCube. In the power down mode, the ADC chip consumes only 2 mW. Therefore, if only onechip is active and the remaining three is suspended, the power consumption decreases to 3.3W.

Figure 4.2 shows an overview of the accomplished ADC board. The analogue part and thedigital part of the board have been designed by Clear Pulse and Shimafuji Electric, respectively.The total board design and parts implementation were carried out by Shimafuji Electric.

External BusSpaceWireNetwork

SpaceWire ADC Box

Buffer amp / ADCCh 0,1

Ch 4,5

Ch 2,3

Ch 6,7 SDRAM

SpaceWire FPGA

SpaceCube50 MHz

User FPGA

12 bit

Buffer amp / ADC

Buffer amp / ADC

Buffer amp / ADC

Figure 4.1: A block diagram of the SpaceWire ADC Box board.

Table 4.1: Specifications of the SpaceWire ADC Box board.Input Analog × 8ch, Common Gate × 1ch, General Purpose Logic In × 4chAnalog Range -1.091–1.091 V (single ended)Output SpaceWire × 1, General Purpose Logic Out × 4ch

ADC Analog Devices AD9238-65 (dual 12-bit max 65-MSamples/s 10-staged pipeline)Buffer Amp National LM6142 for the 1st input buffer,

Linear Technology LT1994CMS8 for 2nd differential bufferFPGA Xilinx Spartan-3 XC3S1500-4FG456C for User FPGA,

Xilinx Spartan-3 XC3S1000-4FTG256C for SpaceWire FPGASDRAM Micron Technology MT48LC16M16A2TG-75 (32 MByte)

Oscillator 50 MHzPower ±5 V, 7.5 W (8ch 50Msps operation) or 3.3 W (1ch 50Msps operation)

4.2 The Analog Part

4.2.1 An Overview

In Figure 4.3, we show a schematic diagram of the analog part of the SpaceWire ADC Box board.It consists of attenuation registors, an input buffer, a differential buffer, and an ADC. The input

Page 34: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

4.2. THE ANALOG PART 33

LEDLED

SpaceWireFPGA

JTA

GJT

AG

User FPGASDRAM

ADCADCADCADC

PowerADC

Analog section close-up

Regulator

Diff. Buffer

Diff. Buffer

Input BufferReset

CommonGate Ch 0Ch 1Ch 2Ch 3Ch 4Ch 5Ch 6Ch 7

SpaceWireI/F

Figure 4.2: A picture of the SpaceWire ADC Box board (top) and its layout drawing (bottom).The bottom right panel is a close-up of a pair of analog processing section.

dynamic range of the ADC is −1.0 ∼ +1.0 V, and that of the entire board can be changed byadjusting the attenuation resistor values.

The analog part has neither analog peak-hold circuit, nor trigger comparator. Alternatively,these functionalities are implemented as a digital logic in the User FPGA. In a measurement, theADC converts an input signal all the time, and the User FPGA receives digitized signals from theeight ADCs in parallel (Figure 4.1). The eight channel data are individually and simultaneouslyprocessed in the User FPGA. In the process of each channel, a trigger signal is generated by com-paring the ADC data with a threshold value specified in a register, and then a waveform acquisitionis started according to the generated self-trigger.

The conversion clock is distributed from the UserFPGA to all the ADCs. The clock frequencyis also a register parameter of the User FPGA, and can be changed by writing a value to the registerfrom SpaceCube via RMAP (§4.3).

Page 35: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

34 CHAPTER 4. DEVELOPMENT OF AN 8-CH WAVEFORM-SAMPLING ADC BOARD

+Analog Input

Attenuator

Input Buffergain=1

LM6142 1/2

LT1994

-+-

AIN+

AD9238-65 1/2

User FPGAAIN-

CLK

D(12)PDWN

Differential Buffergain=1

ADC

Figure 4.3: A schematic diagram of one of the eight analog circuits of the SpaceWire ADC Box.

4.2.2 A pipelined ADC

We use a pipelined 12-bit ADC AD9238 as a AD converter chip. Figure 4.4 shows the internalstructure of the ADC. This ADC consists of a sample-hold amp and switched-capacitor AD con-verter block. The AD converter block includes a 4-bit conversion stage, eight pipelined 1.5-bitconversion stages, and a 3-bit conversion stage. A error correction stage generates 12-bit AD con-verted data from the output of the stages. The resultant 12-bit data has a seven clock pipelinedelay.

1.5-bitstage

3-bitstage

4-bitstage

SampleHold

Vref

Ain+Ain-

4CLK

ADC D

x 8

2 2 2

Delay Registers, Digital Correction, Binary Converter

2 2 2 2 2 3

12

Figure 4.4: A schematic diagram of the internal structure of ADC AD9238.

4.3 Development of a User FPGA Logic

4.3.1 An Overview

In order to make the full use of a FPGA-based logic, we decided to implement the function ofdigital waveform sampling in the User FPGA, instead of performing standard analog-to-digitalconversion only. However, we do not prefer reading out the entire digitized waveform data, sinceit would make the data flow too much high. Therefore, for each pulse, we perform basic waveformanalysis in the User FPGA, to derive such quantities as pulse heights, trigger timings, and so on.The output from each input pulse consists only of these limited pieces of waveform information.

Page 36: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

4.3. DEVELOPMENT OF A USER FPGA LOGIC 35

4.3.2 Internal Structure of a User FPGA Logic

To accomplish the tasks as mentioned above, while preserving the maintainability and expandabil-ity, we developed a User FPGA logic based on the modular template HDL scheme (§3.3). Addingto the waveform acquisition and processing, the User FPGA also has to control acquisition sta-tus (start/stop) of each channel and SDRAM usage. Therefore, we have implemented, in the UserFPGA, 5 main modules that deal with the AD-converted waveform data; Channel module, ChannelManager module, Switch module, Calculator module, and Calculator Manager module. Below wesummerize major roles of each module and their relation, refering to the block diagram shown inFigure 4.5. More detailed descriptions of individual modules and their connections are presentedin the following subsections and in Figure 4.6.

In the present implementation of the User FPGA logic, we utilized multiple FIFO (first in, firstout) modules that are realized using Block RAM equipped inside Xilinx Spartan-3 FPGA. All theFIFO have an identical data width of 16 bit and depth of 1024. Write/read operations can be doneindependently through dual input/output ports, which are operated by write/read clocks.

Channel Module Receives the ADC output data from a single input channel, generates a digitaltrigger from the data, and buffers events according to the trigger. There are eight identicalinstances1 of this module (Figure 4.6), each for one input channel.

Channel Manager Module Controls acquisition state (start/stop).

Switch Module Acts as a 8-to-N data pipe between eight channel modules and Calculator mod-ules. The buffered data are transferred from the Channel module to an idle Calculator mod-ule, and then processed therein.

Calculator Module Processes the waveform data recorded by any Channel module to derive pulseheight, peak time, etc. The calculated values are packed as an event packet, and then sent toCalculator Manager module to be stored in the SDRAM. Available amount of logic resourceslimits the number N of instances.

Calculator Manager Module Receives calculated event data from Calculator modules, and thenstrores them to the SDRAM. Management of the SDRAM usage (write pointer, read pointer,etc.) is also a task of this module.

4.3.3 Channel Module

This module receives and buffers ADC data. Eight discrete instances are created and operated inparallel. Acquisition parameters, such as trigger mode, trigger threshold, the number of data tobe buffered, depth of delay, ADC operation mode, etc., are stored to internal registers and theycan be accessed from a SpaceCube application program via the on-chip bus. Thise module alsohas Current ADC Value Register which contains an instanteneous ADC value so that a readoutprogram on SpaceCube can read the ADC value at the point without a trigger.

1Instance : A specific object or an actual body which is created (instantiated) from an abstract specification sheetdescribed as a ”module” or a ”class”.

Page 37: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

36 CHAPTER 4. DEVELOPMENT OF AN 8-CH WAVEFORM-SAMPLING ADC BOARD

Nch Nch

ChannelModule

Channel Manager Module

Event DataStart/Stop

ADC Data

SDRAM

Calculator Module

Calculator Manager Module

8ch 8chSwitch

Figure 4.5: A block diagram of the User FPGA modules that are involved in waveform processing.

Inside a Channel module, four submodules are working for each particular function as illus-trated in Figure 4.7; interfacing with ADC, trigger generation, delaying, and buffering.

ADC Submodule This submodule receives ADC data, controls the ADC operation mode (ac-tive/suspended), and supplies conversioin clock to the ADC. The received data are fed toTrigger and Delay modules.

Trigger Submodule This submodule generates a digital trigger signal by comparing the input datato a preset threshold value. The input data can be either the raw ADC data, or an average ofthe ADC data over a certain number of samplings. The trigger will be turned off after thelapse of the number of samples set by a user. Changing the trigger mode to Common GateIn mode, external triggers can also be used. Since the trigger generated in this submoduleis also output to the outer module (as an entity of a Channel Module), by connecting triggeroutputs of other channels to this module, users can ORing or ANDing the multiple triggersto generate genuine trigger which initiates an event acquisition sequence.

Delay Submodule This submodule outputs delayed ADC data to the Buffer submodule. Thedepth of the delay is stored in a register of the parent Channel module, and can be changedfrom a SpaceCube readout program. A delay of sufficient depth enables to acquire the wholewaveform of a pulse, by tracking back from a trigger that is generated from a real-time (notdelayed) ADC data.

Buffer Submodule This submodule records the (delayed) ADC data to an internal FIFO, accord-ing to the trigger from the Trigger module. Even if the frequency of AD conversion clock(namely, the sampling rate) and the User FPGA internal clock are different from each other,the buffered data are synchronized to the User FPGA internal clock at this FIFO. As shownin Figure 4.8, 12-bit ADC data are filled into the FIFO accompanied by a channel ID andfollowed by 48-bit trigger time data. Up to the depth of the FIFO (1024), the Buffer sub-module accepts multiple events. If there is no room for more waveform data in the FIFO,this module issues a veto signal toward the Trigger submodule to inhibit further triggeringand a livetime counter to stop counting up the live-time.

When any event is buffered in the Buffer submodule, the Channel module issues hasEvent flagtoward the Switch module, which then sends the event data to a Calculator module.

Page 38: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

4.3. DEVELOPMENT OF A USER FPGA LOGIC 37

Cha

nnel

Mod

ule

Cal

cula

tor M

odul

eC

alcu

lato

r Man

ager SD

RA

M C

ontro

ller

Exte

rnal

Bus

Ada

pter

Mod

ule

Cha

nnel

Man

ager

Switc

h

FIFO

read

/writ

e

Trig

ger

Adc

Dat

a(12

)

Even

tDat

a(16

)

Has

Dat

aD

ata(

16)

Rea

dEna

ble

Adc

Dat

a(12

)

Adc

Dat

a(12

)A

dcC

lkPo

wer

Dow

n

x 8 x 8

Use

rFPG

A

SDR

AM

x N

Adc

Mod

ule

Buf

ferM

odul

eLi

vetim

e M

odul

e

iBus

_Bus

IF

iBus

_Bus

IF

iBus

_Bus

IF

iBus

_Bus

IF

On-

chip

Bus

Gra

ntD

ata(

16)

Req

uest

Don

eR

eadE

nabl

e

Even

tRea

dyW

riteE

nabl

eD

ata(

16)

Gra

nt

Veto

Veto

Rea

ltim

e(48

)Li

vetim

e(32

)C

omm

onG

ateI

nTr

igge

rBus

(4)

SpW

FPG

A

Trig

gerM

odul

e

AD

C

Del

ayM

odul

e

RA

M

Cal

cAlg

orith

m

Figure 4.6: A detailed block diagram of the User FPGA logic. Arrows and boxes drawn in greenindicate the on-chip bus connection and the bus interface module, respectively.

Page 39: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

38 CHAPTER 4. DEVELOPMENT OF AN 8-CH WAVEFORM-SAMPLING ADC BOARD

Channel Module

ADCSubmodule

TriggerSubmodule

Trigger

Ext. TriggerCommon Gate In orTriggerOut of otherChannel Modules

Data

Data BufferSubmodule

DelaySubmodule

ADC DataADC Clock

Operation Mode}SwitchModuleTo

Trigger Out

On-chipBusToiBus I/F

Figure 4.7: Signal connections between four submodules of the Channel Module.

ADC Data 0FLAG0

FLAG0 (4 bit) :

Ch ID (3 bit)Start Bit(1 bit)

Trigger Time Size (3)FLAG1

0 0 0 0

MSB

LSB

ADC Data 1

0 0 0 0 ADC Data (N-1)

Trigger Time (47:32)

Trigger Time (31:16)

Trigger Time (15:0)....... FLAG1 (4 bit) :

1 0 0 1

Figure 4.8: The data structure used in the Buffer module.

4.3.4 Channel Manager Module

This module controls data acquisition status of each of the 8 Channel modules. A readout programon SpaceCube communicates with this module to start/stop the data acquisition status. This modulealso includes livetime counters. The counter is increased when the acquistion is initiated and thereis no veto signal in the corresponding Channel module. If the acquisition is started with a presetlivetime value, it will be automatically stopped after the livetime.

4.3.5 Switch Module

If the waveform processing performed in the Calculator module is complicated and requires aconsiderable time, multiple Calculator modules are needed to improve throughtput by parallelizingthe processes. However, the number of allocatable instances of the Calculator module is limited bythe amount of available logic resources. Therefore, we cannot generally have as many Calculatormodules as the Channel modules.

Switch module connects these Channel modules and Calculator modules that are not in one-to-one correspondence. If there is any hasEvent signal from a Channel module, the Switch modulesearches for an idle Calculator module, and connects the two modules to pass the buffered eventdata. While copying the event data from the Channel module (actually from the FIFO of the Buffer

Page 40: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

4.3. DEVELOPMENT OF A USER FPGA LOGIC 39

submodule) to the Calculator module FIFO, the two FIFOs are joined via a multiplexer inside theSwitch module.

4.3.6 Calculator Module

This module executes processing of the waveform data, after completing the data copy from aChannel module. Results of the calculation (e.g., pulse heights, trigger timing, rise time, etc.) arepacked into an event packet. We show an example structure of one of the simplest event packetin Figure 4.9. The event packet is sent to a FIFO of the Calculator Manager module if there is agrant signal from the manager, and then further written to the SDRAM by the Calculator Managermodule.

When this board is used as a simple multichannel analyzer, the main job of this module willbe searching the digitized waveform data for the highest value to obtain the pulse height. We canimplement more complicated processes, including, for example noise filtering, risetime calcula-tion, and so on. In the following experiments, we use a simple Calculator module that outputs thehighest value of a pulse, its trigger time, and the raw waveform data. We fill the highest valuesinto a histogram in a spectrum measurement (Chapter 5), and utilize the raw waveform data insuper-resolution experiments (Chapter 6).

Footer Flag(0xFFFF)

Real Time (15:0)Channel ID

Real Time (31:16)Real Time (47:32)

Pulse Height (11:0)

0Header Flag (0xFFF0)

bit15

Figure 4.9: An example structure of an event packet created in the Calculator module.

4.3.7 Calculator Manager Module

This module has a FIFO to receive event packets from Calculator modules. When a Calculatormodule completes a process on a waveform data set, it outputs eventReady signal to the managermodule. The manager module selects one from the ’ready’ Calculator modules, then connects theFIFO’s write port to the Calculator module, and issues a grant signal to it so that the event packetcan be transferred from the Calculator module. The written result data are sent to the SDRAMcontrolloer via the on-chip bus, and then finally stored to the SDRAM.

This module also manages write and read pointers (addresses) of the SDRAM to realize aring buffer. Figure 4.10 shows a schematic structure of the SDRAM usage. The readout programon SpaceCube reads the write pointer register to know how many events have been stored in the

Page 41: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

40 CHAPTER 4. DEVELOPMENT OF AN 8-CH WAVEFORM-SAMPLING ADC BOARD

SDRAM. When a part of the stored data has been transferred to SpaceCube, the program updatesthe read pointer to release the SDRAM space.

0 MB

Free Space

Read PointerThe addresss to which the readoutprogram on SpaceCube hascompleted data reading.Write Pointer Event Packet

Event PacketEvent Packet

Event Packet

Event Packet

Event Packet

Event Packet

Event Packet Event Packet

32 MBSDRAM

The addresss to which the Calculator Manager module has written the event packets.

Figure 4.10: A schematic structure of the SDRAM used as a ring buffer.

4.4 Readout of the ADC Board

4.4.1 An Overview

The event data stored in the SDRAM are read, via SpaceWire/RMAP, by a readout program thatruns on SpaceCube. Figure 4.11 shows a readout configuration of the board incoporating thisprogram. The data are further transferred, via TCP/IP, from SpaceCube to a PC on which a recorderprogram is running. The recorder program receives the data, and then simply writes them to a file.The recorded raw data are converted to an event list using an off-line analysis program.

TCP/IP

SpaceCubeReadout Program

PCRecorder Program HDD

SpaceWire

ADC BoxBoard

AnalogInputs

Figure 4.11: A configuration of data readout and recording.

4.4.2 Readout Program on SpaceCube

We coded the readout program running on SpaceCube in C++ based on the RMAP library (§3.3). Itis executed and interactively controlled via a SpaceCube command line. A flow chart of the readoutprogram on SpaceCube is shown in Figure 4.12. The process of the readout program are dividedinto three sequential stages; ”Initialization”, ”Acquisition/Data Transfer”, and ”Finalization”.

Page 42: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

4.4. READOUT OF THE ADC BOARD 41

Start

End

User Input

Start Commad

No

Yes

Yes

No

Request Semaphore

Open SpaceWire I/F

Initialization

Close SpaceWire I/F

Start Acquisition

Read "WritePointer"of SDRAM

Transfer Data fromSDRAM

Transfer the Datato PC via TCP/IP

Open TCP/IP socketto recorder PC

Close the TCP/IPsocket

Writeback "ReadPointer" of SDRAM

Acquisition Parameter

SpW

Input is?

AcquisitionCompleted?

Data TransferNeeded?

Set Parameter

SpW

Release Semaphore SpW

SpW

Check AcquisitionStatus SpW

SpW

SpWSpW

Acquisition / Data Transfer Finalization

Figure 4.12: A flow chart of the readout program on SpaceCube. The process marked with a blue”SpW” label executes a data transfer or a register access from/to the ADC board via SpaceWireand RMAP.

Initialization The program first initialize network interfaces (open SpaceWire I/F and createTCP/IP socket), and then prompts users to input parameters of the acquisition, such as anintegration time (exposure), channel number to be activated, trigger threshold, etc. The pa-rameters are written to the internal registers of individual modules in the User FPGA logic.When the start command is input, the program changes the acquisition status register of theChannel Manager module to start the acquisition, and then proceeds to the next stage.

Acquisition/Data Transfer After the start of the data acquisition, the ADC board digitizes inputpulses, calculates the pulse height, and stores the event data to SDRAM. The transfer ofdata stored in the SDRAM is performed by the readout program asynchronous to the eventacquisition. The readout program first checks the Write Pointer register of the CalculatorManager module (Figure 4.6), which indicates the final address of the stored event datain the SDRAM (Figure 4.9). If there are data that have not been read yet, the programtransfers the data from the SDRAM to SpaceCube RAM via SpaceWire/RMAP, and thenfurther transfers them to the recorder program on a PC via TCP/IP. After the data transferprocesses, the readout program also checks the acquisition status. If the acquisition has been

Page 43: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

42 CHAPTER 4. DEVELOPMENT OF AN 8-CH WAVEFORM-SAMPLING ADC BOARD

completed (elapsing preset integration time), the program proceeds to the next stage. Onthe other hand, if the acquisition is still running, the program continues checking the WritePointer and transferring the event data.

Finalization The readout program closes the TCP/IP socket and SpaceWire I/F, and then quits theexecution.

4.4.3 Recorder Program on a PC

We developed a simple recorder program which receives data from TCP/IP socket and writes themto a file. The program is coded in Java to utilize its easy-to-use network interface. The data transferspeed between SpaceCube and the recorder program on a PC can be done in > 5 Mbps. Therefore,the connection cannot be a bottleneck in the readout system.

As described in the previous section, the readout program on SpaceCube tries to create a socketwhich is connected to the recorder program in the initialization process. Therefore the recorderprogram should be running prior to the execution of the readout program to prevent the socketconnection failure.

If there is no available PC that executes the recorder program, or no network connection toSpaceCube, the local Compact Flash (CF) memory of SpaceCube can be used as data recordingmedia. In such a case, the readout program is executed with an optional argument to specify theCF usage. The program directly writes the event data to the CF. Since, however, the transfer speedbetween a SpaceCube user application and the CF is lower than that of the TCP/IP socket, the totalthroughput somewhat decreases, depending on the performance of individual CF cards.

4.4.4 Off-line Aanalysis Software

We also developed a data converter program based on the ROOT framework. The converter in-terprets event packets listed in the raw data transferred from the board, and then joins them to anevent list (an instance of TTree class). Further analysis, such as the generation of a histogram ofpulse heights, is done in the ROOT command line.

4.5 Basic Performance

4.5.1 Power Consumption

The power consumption of the board depends on the usage of FPGA logic cells and the numberof active ADC chips (§4.1). The logic implemented in the present thesis consumes 2.7 W with a50 MHz clock. One ADC chip consumes about 600 mW when operated at the same frequency.Therefore, as listed in table 4.1, the board consumes the maximum power of 7.5 W in its fulloperation with 8 ch.

Figure 4.13 shows the power consumption of an ADC versus operation frequency. The AD9238family is available in three speed grades, with the maximum operation frequency of 20, 40, and

Page 44: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

4.5. BASIC PERFORMANCE 43

65 MHz. The ones we are using one of the highest grade. If the developed ADC board is used inmeasurements of slow signals, the ADC chip can be changed to one with lower speed grades. Insuch a case, the power consumption in the ADC circuit decreases to about a half (40 MHz) or aquarter (20 MHz) of the current value.AD9238

― 12 ― REV. A

クロック周波数�

SINAD(dBc)� 72

70

74

068

20 40 60

SINAD –65SINAD –40

SINAD –20

12

11.5

11

サンプル・レート(MSPS)�

500AVDD電力(mW)�

400

300

200

600

1000 10 20 30 40 50 60

–65

–40

–20

TPC 19. SINADとFS(ナイキスト入力) TPC 22. アナログ消費電力とFS

デューティ・サイクル(%)�

85

SINAD、SFDR(dBc)�

80

75

70

95

65

30

60

40 45 50 55 60 65

55

50

DCSオン ― SINAD

DCSオン ― SFDR

DCSオフ ― SINAD

DCSオフ ― SFDR

90

35コード�

0.6

–0.8

INL(LSB)�

0.4

0.2

0

–0.2

–0.4

–0.6

0.8

1.0

–1.0150010005000 2000 2500 3000 3500 4000

TPC 20. SINAD、SFDRとクロック・デューティ・サイクル TPC 23. AD9238-65のINL(typ)

温度(℃)�

80

SINAD、SFDR(dBc)�

78

76

74

84

72

–50

70

0 50 100

68

66

SINAD

SFDR82

コード�

0.6

–0.8

DNL(LSB)�

0.4

0.2

0

–0.2

–0.4

–0.6

0.8

1.0

–1.0150010005000 2000 2500 3000 3500 4000

TPC 21. SINAD、SFDRの温度特性(fIN=32.5MHz) TPC 24. AD9238-65のDNL(typ)

Figure 4.13: Power consumption of ADC AD9238 family, taken from the data sheet published byAnalog Devices. Solid line labeled with 20, 40, and 65 represent power consumption of the ADCwhich have speed grade 20, 40, and 65 MHz, respectively.

4.5.2 Linearity and Noise

We measured linearity of the ADC board, supplying 21 different constant voltages ranging from-1.0 V to + 1.0 V with a step of 100 mV. KENWOOD PW18-1.3AT was used as the power supply.We measured instanteneous ADC values 200 times each of the 21 constant voltages, by readingCurrent ADC Value Register of the Channel module (§4.3.3). At each input voltage, 200 samplesof output ADC values were measured, and filled it into a histogram.

The ADC outputs for a certain constant input voltage can fluctuates by a few channels. There-fore, as shown in Figure 4.14, the histogram of the 200 samples of the ADC output has a peakwhich spreads over a few channel. To derive a mean value and broadening, we fitted the peaks,in the 21 individual histograms, with a Gaussian model. In Figure 4.16, we plot the peak ADCchannel against the input voltage. The best-fit linear-function model is also plotted in the figure.The width of each peak (1σ of Gaussian) is typically 1.0–1.5 ch. Thus, the linearity is sufficientlygood.

4.5.3 Waveform

Using the UserFPGA logic implemented above, we measured some waveforms of input signalswith the ADC Box. We added some codes into the Calculator module so that it outputs raw digi-tized waveform data to event packets. We extracted and plotted the waveform from the transferred

Page 45: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

44 CHAPTER 4. DEVELOPMENT OF AN 8-CH WAVEFORM-SAMPLING ADC BOARD

PHA ch3918 3920 3922 3924 3926 3928 3930 3932 3934

Coun

ts

0

10

20

30

40

50

60

70

80

Histogram for an Input Voltage of 1.0V

Figure 4.14: A histogram of ADC values for a constant input voltage of +1.0V. The best-fitGaussian model has a peak center at 3926.0 ch and a 1σ width of 1.06 ch.

data on a PC. In Figure 5.1, we show four types of waveforms (single pulse, piled-up pulses,sinusoidal wave, rectangular wave) comparing them with oscillographs.

In all the cases except for the rectangular wave, we obtained satisfying results. The waveformsare smoothly digitized with 12-bit ADC of the ADC Box. On the other hand, in the rectangularwave case, rising and falling edges of the ADC Box data incline slightly while those taken with theoscilloscope abruptly change between Low and High levels. This can be interpreted as a result ofthe low slew rate (1–5 V/µs) of the imput buffer amp (LM6142) of the ADC Box, especially in thelow input voltage region. Since the differential buffer amp has much higher slew rate, this effectwill be removed if we use other operational amplifiers with higher slew rates as an input buffer.

The ADC Box uses the embeded RAM (”Block RAM” of the Spartan-3 FPGA) to construct aFIFO which buffers the digitized waveform (§4.3.2). The time length of digitized waveform datawhich can be obtained in single trigger sequence is limited by the FIFO depth, currently 1024 (e.g.,20 ns×1024∼20mus at 50 MHz sampling). The FIFOs are easily cascaded to extend the depth,and if we connect five FIFOs for the buffer FIFO, the waveform of input pulses can be recordedfor over 1 ms with 20 ns intervals.

4.5.4 Throughput and Transfer Speed

Event throughput depends on the size of event packets generated in the Calculator module, andon the transfer speed between the board and SpaceCube. Measured transfer speed between theSDRAM on the board and SpaceCube via SpaceWire/RMAP is ∼120 kbps. The value is about aquarter of the maximum bandwith of current SpaceWire implementation, 600 kbps. This is becausethe readout program running on SpaceCube needs to perform single register accesses in additionto the buffered data transfer itself. The readout program on SpaceCube has to request/releasea semaphore berfore/after accessing the SDRAM, which is shared as a ring buffer between theCalculator Manager module and the readout program. These semaphore control sequence is carriedout as the single register accesses. The single register access is an RMAP access whose data size

Page 46: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

4.5. BASIC PERFORMANCE 45

PHA

ch

0

500

1000

1500

2000

2500

3000

3500

4000

(1893.1+/-0.3)x+(2038.6+/-0.2)

Input voltage V-1 -0.5 0 0.5 1

data

-mod

el c

h

-2

0

2

Input voltage V-1 -0.5 0 0.5 1

data

-mod

el c

h

-2

0

2

Figure 4.15: Output ADC ch versus input voltage. Upper panel shows data points and the best-fitlinear-function model, while lower panel shows the residuals (data-model). Error bars in the lowerpanel refers to 1σ width of the Gaussian model for each measurement (see text).

is only 16 bit (2 bytes). However, in the current implementation of the SpaceWire protocol stack,it costs almost the same time duration of 10 ms (see below) as the transfer of large size data (e.g., 4kB). Therefore, by issuing these single register accesses in each data transfer, the total throughputof the SpaceWire connection decreases to 120 kbps from the original value of 600 kbps.

The number of event packets, which can be transferred in the bandwidth of 120 kbps, dependson the size of an event packet (Figure 4.9) created in the Calculator module of the User FPGA. Thesize of an event packet is widely variable according to experiment purposes. In a simple spectrummeasurement, not the raw waveform data but only pulse heights will be needed. On the other hand,a number of raw waveform data must be output to an event packet if an off-line waveform analysisis needed.

A size of the smallest event packet, which consists, for example, only of the highest ADC value(pulse height) and the channel ID, is 16 bits. In such a case, a total throughput of the ADC boardand SpaceCube readout system is 120 kbps/16 bits=7.5×103 Hz. Meanwhile, in the case that rawADC data of 150 sample points are output to an event packet for a waveform analysis, the size ofthe event packet becomes at least 1800 bits, and hence the throughput decreases to 66.7 Hz.

Inside the FPGA, data transfer can be done at 74 Mbps (§3.4). Althoght there are some bottlenecks in the data flow from the Channel module to the Calculator Manager module, the eventthroughput inside the board is no less than a few Mbps. Therefore, the total throughput betweenthe board and SpaceCube is considerably limited by the maximum bandwidth (600 kbps) and theresponse time (10 ms) of the SpaceWire protocol stack on SpaceCube (§3.4).

Page 47: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

46 CHAPTER 4. DEVELOPMENT OF AN 8-CH WAVEFORM-SAMPLING ADC BOARD

4.6 Conclusion

We developed the SpaceWire-based data acquisition system using SpaceCube 1 and standard cir-cuit boards. The system can transfer data in 74 Mbps (inside UserFPGA) and 600 kbps (circuitboard–SpaceCube). The throughput is to be improved in the near future.

The outcomes of our development, especially on the UserFPGA HDL template shceme andthe RMAP library, are successfully reflected in the subsequent development of SpaceWire UserLSI (JAXA, NTSpace) which provides easy-to-use SpaceWire I/F to existing not-SpaceWired in-struments. By ”pasting” the User LSI to the instruments, users can connect them to SpaceWireinterface via a local bus like External Bus.

Page 48: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

4.6. CONCLUSION 47

Time us0 2 4 6 8 10 12 14

ADC

Ch

1600

1800

2000

2200

2400

2600

2800

3000

3200

3400

3600

3800

Time us0 2 4 6 8 10 12 14

ADC

Ch

1900

2000

2100

2200

2300

2400

2500

2600

Time us0 2 4 6 8 10 12 14

ADC

Ch

0

500

1000

1500

2000

2500

3000

3500

4000

Time us0 2 4 6 8 10 12 14

ADC

Ch

0

500

1000

1500

2000

2500

3000

3500

4000

Figure 4.16: The digitized waveform data taken with the SpaceWire ADC Box (left) and a os-cilloscope (right). Since the measurements were performed separately with the ADC Box and theoscilloscope, the displayed waveforms are not identical (especially in the piled-up case).

Page 49: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

Chapter 5

Spectral Measurements with a DigitalPeak-holding Method

5.1 Objectives

In simple measurements with radiation detectors, we often use commercial single-channel pulseheight analyzers, as represented by ”Pocket MCA” (MCA-8000A, Amptek). They are easy to useand have nice performance, e.g., spectral resolution, linearity, portability, and so on. However,they often have single input channel not to sacrifice its portability.

As described in Chapter 1, the Hard X-ray Detector onboard the Suzaku sattelite consists ofmultiple components (many active-shielding counters) to achieve the low backgound environment.Detectors for the future mission will also includes the same or more number of shielding counters.In calibration experiments of a number of detectors, we expect to use a multi-input pulse-height an-alyzer to carry out the experiment effectively, and at the same time reducing labor. The SpaceWireADC Box was designed to be utilized in such a measurement incorporating a SpaceWire network.

Before employing the ADC Box in actual experiments, we verify its performance as a pulse-height analyzer, utilizing test pulses and signals from a conventional γ-ray detector. In section 5.2,we describe an implementation of a method for pulse-height estimation. In section 5.3, we comparethe performance of the SpaceWire ADC Box with that of MCA-8000A, reffering to spectra of aCsI scintillator viewed by an avalanche photo diode (APD). In section 5.4, the SpaceWire ADCBox is applied to a readout of anti-shielding counters of a balloon borne Compton camera detector.In section 5.5, we carry a coincidence measurement using the SpaceWire ADC Box and the sameCsI scintillators.

5.2 A Digital Peak-holding Method

5.2.1 An Overview

In the SpaceWire ADC Box, we did not place an analog peak-holding circuit so that digitizedpulse waveform can be obtained. Therefore, when the ADC Box is used as a simple multichannel

48

Page 50: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

5.2. A DIGITAL PEAK-HOLDING METHOD 49

analyzer, a method to estimate a height of the pulse from their waveform should be implementedin a Calculator module (Figure 4.6) in the User FPGA block.

There are several pulse-height-estimation methods which can be implemented in a digital logic;e.g., one which picks up the maximal value out of the digitized waveform of each event just likean ordinary analog ADC with a peak-holding circuit in front of it, and one which utilize the ”area”of a pulse waveform by accumulating digitized pulse heights. A digitized waveform can also beinterpolated to achieve finner time resolution and better pulse-height estimation. Another methodmay fit digitized waveform with a model function if plenty of computational resources is available.

Among the estimation methods, we first implement the simplest one which utilizes the maximalvalue out of the digitized waveform (hereafter a digital peak-holding method), since it is easy toimplement but quite effective especially in measurements with high signal-to-noise ratios. We usethe implemented digital peak-holding method in several measurements described in the followingsections. In Chapter 6, as a next step, we implemet another estimation method based on the crosscorrelation.

5.2.2 Measurements of the Performance of the Digital Peak-Holding Method

A particular concern with this digital peak-holding method is how the achieved energy resolutiondepends on the waveform sampling rate for a given pulse shape (risetime and falltime). For exam-ple, as shown in Figure 5.1 (a), if the sampling rate is relatively higher than the frequency rangeof input pulses, a waveform can be sampled into enough data points, and hence the pulse heightis well approximated by the maximal value of the sampled data points. On the other hand, themaximum of an input pulse can be missed if the waveform is digitized with rather low samplingrates. In this case, the energy resolution would degrade.

Peak Time

(a) Enough High Sampling Rate (b) Low Sampling Rate

Pulse Height

Peak Time?

Pulse Height?

Figure 5.1: A schematic drawing of digitized waveform sampled at (a) high and (b) low rates.Orange dots represent individual sampling points.

We examined the validity of the method with test pulses, before taking actual detector data. InFigure 5.2, we show a setup of the test pulse measurement. The test pulse is generated by a pulsegenerator, filtereed in a shaping amplifier, and then fed to the SpaceWire ADC Box. The timeconstant of the shaping amplifier was set to 1 µs (peaking time of ∼2 µs), so as to mimic actual

Page 51: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

50CHAPTER 5. SPECTRAL MEASUREMENTS WITH A DIGITAL PEAK-HOLDING METHOD

measurement using photo-multiplier tubes (PMT) or APD. The digital peak-holding method wascoded in a Calculator module. The module searches the maximal ADC value in a pulse waveform.The picked maximal value is packed to an event packet with raw waveform data, and then storedto the SDRAM. A SpaceCube readout program transfers the event packet from the SDRAM to arecorder PC. Only one channel of the SpaceWire ADC Box was operated to acquire the event dataand the other 7 channels were suspended to reduce the power consumption.

SpaceCubeSpaceWireADC Box

Shaping AmpORTEC570

PulserCANBERRA

risetime=250 nsfalltime=50 us

shaping time=1 us(peaking time=2.5us)

Only 1 ch was operated, the other 7 channels were suspended

2.5usPulse height

1022 mV754 mV513 mV233 mV

Figure 5.2: A setup of the test-pulse measurements.

We performed five measurements changing the sampling rate of the SpaceWire ADC Box to50, 10, 5, 2.5, and 1 MHz. In each measurement, test pulses with 4 different pulse heights, 1022,754, 513, and 233 mV, were fed to the ADC. Since we preset the integration time for one pulseheight at 30 s, the total data, which were obtained in each sampling rate measurement, have anintegration time of 30×4=120 s. The trigger threshold of the activated channel was set at 2080 ch(17 mV) which corresponds to 1.6 and 7.4% of the pulse height of 1022 and 233 mV pulses,respectively. The AD-converted pulse data were delayed by 30 clocks (ADC clock) in the Delaysubmodule (§4.3.3) before recorded in the Buffer submodule, in order to acquire the very beginingof each pulse.

In addition to the maximal ADC value obtained in the digital peak-holding logic, we also outputthe number N of the ADC data out of sampled pulse waveforms to the event packet for furtherwaveform analysis presented in Chapter 6. The number N was changed in each measurement(each sampling rate), using the readout program on SpaceCube, so that the total pulse waveformappears in an event packet. Table 5.1 lists the N value versus sampling rates of the measurements.

Table 5.1: A list of the number N of the sampled data in the event packet.Sampling Rate MHz 50 10 5 2.5 1

N 900 180 100 100 100

5.2.3 Results

In the left panels of Figure 5.3, we show waveform data obtained in the 1022 mV test pulse mea-surements. The right panels of the Figure represent histograms of pulse heights which were esti-mated with the digital peak-holding method over a large number of pulses. The peaks for input

Page 52: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

5.2. A DIGITAL PEAK-HOLDING METHOD 51

pulses with 1022 mV pulse height are also overlaid in Figure 5.4. The spectrum exhibit a sharppeak when the sampling rate is high (e.g., 50 MHz), whereas the peak broadens and becomestrailing toward lower pulse heights at lower sampling rates (e.g., 2.5, 1, and 0.5 MHz).

For more quantitative studies, we fitted the peaks with a Gaussian model (e.g., the right panelof Figure 5.4). The peak center and 1σ width of the best-fit Gaussians are listed in table 5.2. Inthe histograms of the 50, 10, and 5 MHz data, the peak centers agree within ∼ ±3 ch. We plot thepeak center versus input voltage in Figure 5.5. The best-fit linear function gave a relation as (peakADC ch) = 1893.3× V + 2038.5, where V is the input pulse height in a unit of volt. This relationcompletely matches the one derived by measuring the constant input voltage (Figure 4.16). In thecase of 2.5 and 1 MHz hisograms, the peak was hardly expressed with a Gaussian. We, therefore,simply put the roughly estimated channel of the broadening.

Table 5.2: The peak center and broadening.Sampling Input Pulse Height (mV)

Rate (MHz) 233 513 754 102250 µ∗ 2480.2 3008.8 3466.4 3973.6

1σ† 0.91 0.98 0.87 0.9110 µ∗ 2479.4 3006.7 3463.2 3973.6

1σ† 1.36 1.49 1.40 1.285 µ∗ 2478.3 3005.7 3461.9 3971.4

1σ† 1.75 1.52 1.27 2.702.5 width‡ 10 20 30 401 width‡ 50 110 150 200

∗The peak center in ch. The typical statistical error is ±0.1 ch.†The 1σ width of the peak in ch. The typical statistical error

is ±0.1 ch. ‡Roughly estimated width of the peak.

Since the shaper output pulse has a typical duration (in FWHM) of ∼2 µs, the present resultsimply that the digital peak-holding method works as long as we have & 10 sampling points acrossthe peak portion of each pulse. In the following sections, we, therefore, utilize the method inmeasurements of actual detector pulses. In Chapter 6, we develop a more sophisticated method ofdigital pulse-height analysis which can be applied to cases at low sampling rates.

Page 53: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

52CHAPTER 5. SPECTRAL MEASUREMENTS WITH A DIGITAL PEAK-HOLDING METHOD

Time us0 2 4 6 8 10 12 14

ADC

Ch

2000

2500

3000

3500

4000

Test Pulse Waveform 50MHzTest Pulse Waveform 50MHz

PHA ch2200 2400 2600 2800 3000 3200 3400 3600 3800 4000

Coun

ts

0

200

400

600

800

1000

1200

Histogram of test pulses 50MHzHistogram of test pulses 50MHz

Time us0 2 4 6 8 10 12 14

ADC

Ch

2000

2500

3000

3500

4000

Test Pulse Waveform 10MHzTest Pulse Waveform 10MHz

PHA ch2200 2400 2600 2800 3000 3200 3400 3600 3800 4000

Coun

ts

0

100

200

300

400

500

600

700

800

900

Histogram of test pulses 10MHzHistogram of test pulses 10MHz

Time us0 2 4 6 8 10 12 14

ADC

Ch

2000

2500

3000

3500

4000

Test Pulse Waveform 5MHzTest Pulse Waveform 5MHz

PHA ch2200 2400 2600 2800 3000 3200 3400 3600 3800 4000

Coun

ts

0

100

200

300

400

500

600

700

800

Histogram of test pulses 5MHzHistogram of test pulses 5MHz

Time us0 2 4 6 8 10 12 14

ADC

Ch

2000

2500

3000

3500

4000

Test Pulse Waveform 2.5MHzTest Pulse Waveform 2.5MHz

PHA ch2200 2400 2600 2800 3000 3200 3400 3600 3800 4000

Coun

ts

0

50

100

150

200

250

300

350

400

450

Histogram of test pulses 2.5MHzHistogram of test pulses 2.5MHz

Time us0 2 4 6 8 10 12 14

ADC

Ch

2000

2500

3000

3500

4000

Test Pulse Waveform 1MHzTest Pulse Waveform 1MHz

PHA ch2200 2400 2600 2800 3000 3200 3400 3600 3800 4000

Coun

ts

0

20

40

60

80

100

120

140

160

180

Histogram of test pulses 1MHzHistogram of test pulses 1MHz

Figure 5.3: Left: A single waveform of a 1022 mV test pulse digitized by the SpaceWire ADCBox at sampling rates of 50 (black), 10 (red), 5 (green), 2.5 (blue) and 1 MHz (cyan). Right:Histograms of pulse heights determined with the digital peak-holding method, using samplingrates of corresponding left panels. Results from the four different pulse heights (1022, 754, 513,and 233 mV) are superposed.

Page 54: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

5.2. A DIGITAL PEAK-HOLDING METHOD 53

PHA ch3760 3780 3800 3820 3840 3860 3880 3900 3920 3940 3960 3980

Cout

ns

0

200

400

600

800

1000

Test Pulse SpectraTest Pulse Spectra

PHA ch3960 3962 3964 3966 3968 3970 3972 3974 3976 3978 3980

Cout

ns

0

200

400

600

800

1000

Test Pulse SpectraTest Pulse Spectra

Figure 5.4: (Left) Test pulse spectra taken with samping rates of 50 (black), 10 (red), 5 (green),2.5 (blue), and 1 MHz (cyan). (Right) Enlargement of the spectra for 50, 5, and 2.5 MHz. Thebest-fit Gaussians are also plotted by solid curves.

Input Voltage mV200 300 400 500 600 700 800 900 1000 1100

Peak

Cen

ter c

h

2400

2600

2800

3000

3200

3400

3600

3800

4000

The Cross-Correlation CoefficientThe Cross-Correlation Coefficient

Figure 5.5: Peak channel versus input pulse height. Black, red, green crosses represent the peakcenter values determined from the pulse-height data measured at a sampling rate of 50, 10, and 5MHz. The black solid line is the best-fit linear function for the 50 MHz data.

Page 55: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

54CHAPTER 5. SPECTRAL MEASUREMENTS WITH A DIGITAL PEAK-HOLDING METHOD

5.3 Spectral Measurement of Single Channel

5.3.1 An Overview

In the present section, we examine the spectral measurement performance of the SpaceWire ADCBox. The energy resolution and noise level are mainly focused and compared with the valueobtained with a commercial product, Pocket MCA. The pulse-height estimation is carried out withthe digital peak-holding method which is implemented in a Calculator module in the User FPGAlogic.

5.3.2 Measurement Setup

In order to verify the SpaceWire ADC Box in comparison with Pocket MCA, we have employeda conventional γ-ray detector consisting of a CsI scintillator (5×5×5 mm3) and an APD (Hama-matsu, S8664-55). Figure 5.6 is a block diagram of this measurement setup. The CsI and APDwere optically coupled using silicon grease OKEN 6262A. The remaining five faces of the CsIscintillator were enwrapped with a GORE-TEX sheet (250 µm thickness), to reflect scintillationlight.

To the APD, a bias voltage of 378 V was supplied by a power unit (CP6641, Clear Pulse)through a pre-amplifier (CP580K, Clear Pulse). At this bias, the APD has a multiplicity of 50 at25 C◦. The pre-amplifier output was filtered by a shaping amplifier (570, ORTEC) with a shapingtime constant of 1 µs (peaking time ∼ 2 µs), before fed to an ADC (SpaceWire ADC Box orPocket MCA). The gain of the shaping amplifier was individually adjusted to the dynamic rangeof the two ADCs; ∼0–1 V for ADC Box, and ∼0–5 V for Pocket MCA.

For a pulseheight estimation algorithm in the SpaceWire ADC Box, we implemented the samedigital peak-holding method as used in section 5.2. Each input channel is read by a self-trigger,which is generated in the Trigger submodule of the Channel module. We set the sampling rate ofthe ADC Box at 50 MHz so that the systematic spectral broadening by the digital peak-holdingmethod will be minimized. The exposure of each measurement was 3600 s.

CsI

RI 137Cs APDS8664-55

GORE-TEX

Covered with a blacksheet

Pre AmpCP580K ADC PC or

SpaceCube

SpaceWire ADC Boxor Pocket MCA

Shaping AmpORTEC570

HV SupplyCP6641

Figure 5.6: A configuration of the spectral measurement with the SpaceWire ADC Box and PocketMCA.

Page 56: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

5.3. SPECTRAL MEASUREMENT OF SINGLE CHANNEL 55

5.3.3 Results

We measured spectra of a radio active source, 137Cs emitting 662 keV γ-rays, with the SpaceWireADC Box and Pocket MCA. An example waveform taken with the ADC Box is shown in Figure5.7.

Samples0 100 200 300 400 500

ADC

Ch

2050

2100

2150

2200

2250

2300

2350

2400

CsI+APD Waveform taken with SpaceWire ADC Box

Figure 5.7: A waveform of the input pulse taken with the SpaceWire ADC Box. The samplingrate is 50 MHz, therefore a size of one bin of the x axis is 20 ns.

Figure 5.8 shows the spectra obtained with the SpaceWire ADC Box and Pocket MCA. Thus,the two spectra are very similar, exhibiting the 662 keV peak photo-peak, the Compton shoulder (at∼400 keV), and a Compton back-scattered peak (at ∼200 keV). At the lowest end of the spectra,we notice a noise component. Around 2100 ch (ADC Box) and 150 ch (Pocket MCA), anotherpeak due to ∼33 keV characteristic X-rays emitted from 137Ba, also appears above the noise level.

We fitted the 662 keV peaks with Gaussian models then obtained the best-fit parameters asshown in table 5.3. The two ADCs gave the same energy resolution of 7.1±0.1%, which weascribe to the intrinsic energy resolution of the CsI plus APD system. Therefore, the two ADCsshow essentially the same spectral performance. The noise level was also 24 keV in both cases.Through the present experiment, we have confirmed that the SpaceWire ADC Box, when used ina single-channel mode, has effectively the same performance to a simple scintilaltion detector, asa commercially available single-channel ADC.

Table 5.3: The best-fit Gaussian parameters and 1σ errors for the 662 keV peak.Mean (ch) Sigma (ch) Resolution (%)

ADC Box 3195.8±0.5 34.6±0.4 7.1±0.1Pocket MCA 2565.2±1.2 76.8±0.9 7.1±0.1

Page 57: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

56CHAPTER 5. SPECTRAL MEASUREMENTS WITH A DIGITAL PEAK-HOLDING METHOD

PHA ch2200 2400 2600 2800 3000 3200 3400

Coun

ts

0200400

600800

10001200140016001800

200022002400APD+CsI 137Cs SpaceWire ADC Box boardAPD+CsI 137Cs SpaceWire ADC Box board

PHA ch0 500 1000 1500 2000 2500 3000

Coun

ts

0

200

400

600

800

1000

1200

1400

1600

1800

2000

2200

APD+CsI 137Cs Pocket MCAAPD+CsI 137Cs Pocket MCA

PHA ch

3000 3050 3100 3150 3200 3250 3300 3350

Co

un

ts

0

50

100

150

200

250

300

662 keV peak SpaceWire ADC Box

PHA ch

2200 2300 2400 2500 2600 2700 2800 2900

Co

un

ts

0

50

100

150

200

250

300

662 keV peak Pocket MCA

Figure 5.8: 137Cs spectra of 5×5×5mm3 CsI scintillator viewed by an APD taken with theSpaceWire ADC Box (top left) and Pocket MCA (top right). Red curves are best-fit Gaussiansfor 662 keV peak. Enlarged plots around the 662 keV peak are also shown in lower panels.

Page 58: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

5.4. SPECTRAL MEASUREMENT OF MULTIPLE CHANNELS 57

5.4 Spectral Measurement of Multiple Channels

5.4.1 An overview

In this section, we measure spectra of multiple CsI scintillators which will be used as active shield-ing counters surrounding a Compton camera in a balloon experiment. The primary objective is toverify multichannel simultaneous readout performance of the SpaceWire ADC Box, which is oneof its largest sales points.

5.4.2 A Compton camera surrounded by active shielding scintillators

A Compton camera is the most promising method to observe MeV photons. It utilizes the Comptonscattering kinematics to constrain arrival directions of incident X-ray/γ-ray photons. Figure 5.9shows an example of a photon interaction in a Compton camera. The incident photon with energyEin is Compton scattered in the scattering part of a detector, depositing energy E1, and then theresidual energy (E2) is totally absorbed in the absorber part. The Compton scattering angle θ iswritten as,

Ein = E1 + E2, (5.1)

cos θ = 1 − mec2

E2

+mec

2

E1 + E2

, (5.2)

where me and c are the electron mass and the speed of light, respectively. By measuring theinteraction position as well as the deposited and absorbed energies, we can solve equation 5.2 forθ, so that the photon source can be located on a circle of light-cone angle θ aroung the directionconnecting the two interaction points. Accumulating the directions over a number of events, we candetermine the source location (if it is a single point source) as an intersection point among manycircles. If the source has more complex spatial distributions, we can reconstruct a sky image viaappropriate image cleaning algorithms. If we reject events which come from outside the detectorfield of view, the backgrounds can be drastically reduced. Using this method, the COMPTEL[11]detector, onboard the CGRO satellite launched in 1991, achieved excellent low background levelin 1–30 MeV and spatial resolution of 1◦–2◦. Furthermore, this Compton camera method allowsmeasurements of polarization of incoming photons.

The Compton camera method is planned to be employed in the Soft Gamma-ray Detector(SGD) onboard the next Japanese X-ray/soft γ-ray satellite, named New exploration X-ray Tele-scope (NeXT). As a prototype of the SGD, a balloon experiment of Compton camera employingsolid-state position-sensitive detectors is in progress[15, 16]. To attain the low background envi-ronment, the Compton camera is placed inside a vase-like active shield which consists of fourteenCsI scintillators each viewed by an APD. The overview of this balloon-borne Compton camera isshown in Figure 5.10.

Page 59: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

58CHAPTER 5. SPECTRAL MEASUREMENTS WITH A DIGITAL PEAK-HOLDING METHOD

Scattering PartE1

Ein

E2Absorbing Part

Figure 5.9: A typical interaction in a Compton camera.

5.4.3 Experimental Setup

To each CsI scintillator, a 1×1 cm2 APD (SPL4650, Hamamatsu) is attached with scillicon grease.Since only two high voltage supplies are available in the balloon experiment, APDs with similargain characteristics must be used. Among fouteen available pieces of SPL4650 type APDs, wethus selected eight samples for the eight trapezoidal scintillators. As shown in table 5.4, they havesimilar gains at a common bias voltage of 390 V, which we determined in order to operate all theselected APDs well below the break down voltages (430–450 V).

Table 5.4: A list of the selected APDs and their avalanche gain at a bias voltage of 390 V.APD No. 15 19 23 25 29 33 37 39

Gain 44.2 50.6 50.2 43.1 50.0 47.0 50.6 41.4Dark Current∗ 17.4 18.1 18.8 19.0 19.3 19.7 21.2 21.8∗Dark current in a unit of nA, measured at an avalanche gain of 50

and temperature of 25◦C.

Using an experimetal setup of Figure 5.11, we measured the performance of the 8 trapezoidalCsI scintillators (indicated by blue in Figure 5.10. They were placed inside a thermostatic chamberwith a constant temperature of 20 ◦C, to stabilize the APD gains. Because of the limited chambersize, only four scintillators could be placed at the same time. Therefore, we conducted measure-ments twice, each with four pairs of APD and CsI (APD+CsI); Set A (APD No.15, 25, 33, and37) , and Set B (APD No. 19, 23, 29, and 39). Hereafter we call each APD+CsI pair by the serialnumber of the pasted APD. A 137Cs radio isotope was placed on top of the thermostatic chamber touniformly irradiate 662 keV γ-rays to the four scintillators. The SpaceWire ADC Box was placedoutside the chamber. Four input channels of the ADC Box were activated in the measurement, andthe others were suspended.

We wrapped all scintillators doubly (twofold) with a GORE-TEX sheet (250 µm thickness),except for the one viewed by APD No. 39 which has only onefold GORE-TEX wrap (see below).The APDs are connected to an 8-input pre-amplifier (CP5909, Clear Pulse) throught a simple cableconverter which accepts coaxial cables from an APD and converts it to a QLA connector. A biasvoltage of 390 V, supplied by a high voltage unit (CP6641, Clear Pulse), is distributed to each APD

Page 60: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

5.4. SPECTRAL MEASUREMENT OF MULTIPLE CHANNELS 59

91.0

20.0

Parts-A-1

HEFT/Compton : CsI active shield

40.0

40.0

25.5

Cover part (Yellow)x1

2007.02.05 by [email protected]

74.0

20.0

Parts-A-2

Bottom part (Blue)x1

40.0

20.0

150.0

Parts-B

HEFT/Compton : CsI active shield

80.0

74.0

90.0

20.0

180.0

Parts-C

HEFT/Compton : CsI active shield

Square Column part (Green)x4

Oct. Column part (Blue)x8

Figure 5.10: Left: A schematic drawing of anti-shielding counters of the Compton camera to beutilized in a balloon experiment. Red cylinder illustrates the Compton camera itself (not in scale).Green, blue, and yellow show anti-shielding CsI blocks, which consist of fourteen individual parts.Right: Dimensions of CsI parts that comprises the anti shield. Color names specify individual partsin the left panel. Red squares represent APDs pasted on each block.

through the pre-amplifier. Output signals from the pre-amplifier is filtered in a shaping amplifier(CP4473, Clear Pulse), and then fed to the ADC Box. A User FPGA logic of ADC Box is thesame as one used in section 5.3 which utilizes the digital peak-holding method. Parameters ofthe ADC Box, such as the sampling rate and threshold are configured from a readout programon SpaceCube via SpaceWire/RMAP. As mentioned above, four ADC channels are utilized inindividual measurements of APD+CsI pairs (Set A and B), while the remaining four ADC channelare suspended (§4.1).

The pre-amplifier CP5909 and shaping amplifier CP4473 are new products developed for theballoon experiment. They process eight individual input signals simultaneously. Their internalblock diagrams and typical output waveforms are presented in Figure 5.12 and 5.13, respectively.Although CP4473 also has discriminator circuits to generate anti-coincidence triggers which willbe used in the balloon experiment, we do not use the function in the present measurement.

5.4.4 Results and Discussion

In Figure 5.14, we show 137Cs spectra taken in the two calibration runs (Set A and B) of 300 sexposure each. All channels were operated normally, thus demonstrating that the ADC Box can beused as a multiple-input pulse height analyzer. The energy resolution of individual channels andtheir noise levels are summarized in table 5.5.

The energy resolutions (8.5–11.4%) are worse than that of a 5 mm cubic CsI (7.1% at 662keV, table 5.3), while the avalanche gains are almost the same (∼40–50) as the 5 mm cubic CsI

Page 61: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

60CHAPTER 5. SPECTRAL MEASUREMENTS WITH A DIGITAL PEAK-HOLDING METHOD

Thermostatic Chamber LU-113T=20 C

i ii iii

PreAmpCP5909

CableConverter

iv

Set A

APD No.i ii iii iv

37 15 33 25Set B 39 29 23 19

(Front View)

4 ch

137Cs HV CP6641+390 V

Power+/-12 V

4 ch SpW

Shaping AmpCP4473

SpaceWireADC Box SpaceCube

Figure 5.11: A schematic configuration (top) and a photograph (bottom) of the experimental setupemployed in the simultaneous calibration of four CsI scintillators.

experiment (50). This can be understood as a result of a drop of scintillation light yield in theAPD. In this measurement, the size of the CsI scintillator (90×20×180 mm3) is much larger thanthe aperture size of the APD (10×10 mm2). Therefore, most scintillation photons are reflectedby the wrapping GORE-TEX many times, before they are absorbed by the APD. Although thereflectivity of GORE-TEX is high (> 99%), the light yield is considered to become lower than thatof a small scintillator that matches the APD aperture (less reflection), and the signal to noise ratioof the APD+CsI system decreases accordingly.

Figure 5.15 shows relative light yield of each APD+CsI pair, which was calculated as a ratio ofthe 662 keV peak channel to the APD gain (table 5.4). These values includes the light collectionefficiency by the APD. The values are relatively uniform with ∼20%, except for that of APD+CsI

Charge SensitiveAmp Buffer Amp

Pre Amp CP5909 Shaping Amp CP4473

x 8 ch

In Out In Out

DiscriOut

x 8 ch

Differential-IntegralAmp Integral Amp

Discriminator

Figure 5.12: Block diagrams of the newly developed two amplifiers (Clear Pulse Co, Ltd.).

Page 62: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

5.5. COINCIDENCE MEASUREMENT BETWEEN MULTIPLE CHANNELS 61

falltime 50 us

Pre Amp Output Shaping Amp Output

peaking time 2us

Figure 5.13: Output waveforms from the pre-amplifier (left) and shaping amplifier (right) for aninput charge of 0.5 pC to the charge sensitive amp.

No.39, which is about a half of the others. This is most likely because No.39 has only onefoldGORE-TEX wrap, as noted above. This results exemplifies necessity for twofold GORE-TEXreflector in a large size scintillator measurement. On the other hand, the 20% variation of the lightyield in the other seven APD+CsI pairs probably originates from an individual difference of thelight yield of each scintillator crystal, or a scatter in the optical coupling between the APD and theCsI.

5.5 Coincidence Measurement between Multiple Channels

5.5.1 Objectives

In the User FPGA logic, the timing information is distributed from the Channel Manager moduleto each Channel module (Figure 4.6). The real time is counted by a 48-bit counter operated with50 MHz clock in the Channel Manager module. Therefore, all the Channel modules share a timerwith 20 ns resolution. When a Channel module records an event, in other words, when a trigger isissued by a Trigger submodule, the Real Time value is latched, and attached to the event data bythe Channel module. By thus assigning the 48-bit real time information to an event packet at theCalculator module, we can obtain the time when the event was recorded.

In order to evaluate the time-measurement accuracy of the SpaceWire ADC Box, we performeda coincidence measurement between multiple input channels utilizing the time information. Thesame trapezoidal CsI scintillators were used to detect back-to-back pairs of 511 keV γ-rays from22Na.

5.5.2 γ-rays from 22Na22Na is a radio-active isotope used widely in timing measurements. As shown in Figure 5.16, a2211Na nucleus β+ decay into 22

10Ne, emitting a positron followed by a 1.27 MeV γ-ray. After the β+

decay, the positron rapidly loses its kinetic energy just moving a few mm from the produced point.

Page 63: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

62CHAPTER 5. SPECTRAL MEASUREMENTS WITH A DIGITAL PEAK-HOLDING METHOD

PHA ch2200 2400 2600 2800 3000 3200 3400 3600 3800 4000

Coun

ts

0

100

200

300

400

500

600

APD+CsI read by SpW ADC Box SetA

No.15

No.25

No.33

No.37

APD+CsI read by SpW ADC Box SetA

PHA ch2200 2400 2600 2800 3000 3200 3400 3600 3800 4000

Coun

ts

0

100

200

300

400

500

600

700

800

900

APD+CsI read by SpW ADC Box SetB

No.19

No.23

No.29

No.39

APD+CsI read by SpW ADC Box SetB

Figure 5.14: 137Cs spectra of eight CsI scintillator each viewed by an APD taken with theSpaceWire ADC Box.

Table 5.5: Results of spectral measurements of the eight trapezoidal CsI, each viewd by an APD.APD+CsI No. 15 19 23 25 29 33 37 39Peak Center ch 2961.2 2849.7 2953.8 2768.0 2962.7 3096.1 2920.5 2483.5

σ ch 32.8 31.6 34.3 29.1 36.8 37.9 34.1 21.1Energy Resolution∗ % 8.5 9.3 8.9 9.5 9.5 8.5 9.2 11.4

Noise Level keV 52 67 60 80 59 52 58 102∗At 662 keV peak. Statistical errors are 0.04–0.06% in 1σ level.

It eventually annihilates with an electron, and emits two 511 keV γ-rays in the opposite directionto each other, to conserve the energy and momentum of the system.

5.5.3 Experimental Setup

We show an experimental setup in Figure 5.17. Four CsI scintillators each viewd by an APD,were placed in the thermostatic chamber (Position i, ii, iii, and iv), surrounding a radio-activesource 22Na. We selected four APD+CsI pairs (No. 15, 23, 29, and 33) that have approximatelythe same total light yields (close peak channels in Figure 5.14). The correspondence between theAPD+CsI number and the position number is shown in the same figure. The temperature inside thechamber was controlled to 20◦C. In the chamber, the scintillator pairs of i-iv and ii-iii were placedsymmetrically with respect to the 22Na. Based on the back-to-back property of the annihilation511 keV γ-rays from 22Na, we expect more coincidence events in these scintillator pairs than thatin the other pairs such as i-ii or i-iii. We supplied a bias voltage of 390 V to the APDs. Signalsfrom the APDs were connected to the cable converter, and then processed in the same way as insection 5.4. On SpaceCube, the same readout program as the previous experiment was utilized.

In order to enable an off-line coincidence analysis, the Calculator module in the User FPGAlogic was modified to output, to an event packet, not only the pulse height derived wi th the digitalpeak-holding method but also the trigger time. Figure 5.18 shows a structure of the event packetdefined in the present measurement. By adding a Peak Position value (see Figure 5.18 right) to

Page 64: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

5.5. COINCIDENCE MEASUREMENT BETWEEN MULTIPLE CHANNELS 63

APD+CsI No.

Arbi

trary

Sca

le

0

0.2

0.4

0.6

0.8

1

1.2

15 19 23 25 29 33 37 39

Avalanche Gain Corrected Light Yield of each APD+CsI

Figure 5.15: Light yield of eight CsI scintillators, obtained by correcting the 137Cs peak channelfor the APD gain. The values are normalized to that of No.15.

11Na22

511 keV

180°

511 keV

11Na2211Na22

10Ne22

90% β+

10% EC

•γ1 1.274 MeV (100%)Emission from decays

•e-e+ Annihilation 511 keV•Characteristic X-rays of Ne

1.274

0γ1

Figure 5.16: A decay diagram of 22Na, and a schematic drawing of a pair of 511 keV γ-rays, dueto electron-positron annihilation.

the Trigger Time in an off-line process, the timing of the peak of an input pulse can be restoredwith 20 ns resolution, and used to search a coincidence event in the other APD+CsI pairs. Since,however, the input pulse comes up with the noise, the ”peak” can be mimicked, for example, bythe second highest value in the original pulse if a positive noise is added. In such a case, the peaktime also deviates from the true value. Therefore, we allows the coincidence to be relatively wide(300 ns, see below).

5.5.4 Results

Figure 5.19 shows spectra of 22Na taken with the four APD+CsI pairs for an exposure of 300 s. Inthe spectra, peaks of 511 keV and 1.274 MeV photons are clearly seen. Although the 1.274 MeVpeaks are not fully covered by the dynamic ranges of the spectra, this is not a problem since ourpresent purpose is a coincidence measurement of 511 keV γ-rays.

Page 65: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

64CHAPTER 5. SPECTRAL MEASUREMENTS WITH A DIGITAL PEAK-HOLDING METHOD

Thermostatic Chamber LU-113T=20 C

i ii

iii

PreAmpCP5909

CableConverter

22Na

iv

(Front View)

4 ch

25 cm HV CP6641+390 V

Power+/-12 V

4 ch SpW

Shaping AmpCP4473

SpaceWireADC Box SpaceCube

35 c

m

APD No.i ii iii iv

29 23 15 33

Figure 5.17: A setup of the coincidence measurement among four scintillators.

Footer Flag(0xFFFF)Pulse Height (11:0)

Peak Position (9:0)Trigger Time (15:0)Trigger Time (31:16)Trigger Time (47:32)

0Header Flag (0xFFF0)

bit15

Trig Th.Clock

Trigger Time Peak Position

Pulse Height

Figure 5.18: The event packet structure used in the present measurement (left) and the definitionof individual parameters (right).

PHA ch2200 2400 2600 2800 3000 3200 3400 3600 3800 4000

Coun

ts

0

100

200

300

400

500

600

700APD+CsI read by SpW ADC Box : 22 Na

No.15

No.23

No.29

No.33

APD+CsI read by SpW ADC Box : 22 Na

Figure 5.19: Spectra of 22Na taken with the four APD+CsI and the SpaceWire ADC Box. Twonoticeable peaks in each spectrum are due to 511 keV (2600–2900 ch) and 1.274 MeV (3600–4000ch) γ-rays.

Page 66: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

5.5. COINCIDENCE MEASUREMENT BETWEEN MULTIPLE CHANNELS 65

We then extracted events that have a coincident hit in the opposite APD+CsI pair (hereaftercoincidence events), by comparing the peak times of individual events. As mentioned above, thepeak time has a jitter of several clocks. Therefore we set the coincidence condition as,

COMPANION_PEAKTIME− 7 clock ≤ MY_PEAKTIME ≤ COMPANION_PEAKTIME+ 7 clock,

where MY_PEAKTIME is the 48-bit peak time of an event which occurred in a certain APD+CsIpair, and COMPANION_PEAKTIME is that of a coincidence event observed in the opposite APD+CsIpair. Under the condition, the coincidence window has a length of 20 ns×(7 × 2 + 1) = 300 ns.We applied no condition on the pulse height.

By selecting only the coincidence events between diagonal APD+CsI pairs (i-iv and ii-iii),we obtained spectra shown in Figure 5.20. In the spectra, two structures are clearly seen; the 511keV peaks and their Compton continua. In contrast, the 1.274 MeV γ-ray events were considerablydecreased. We also extracted the coincidence events between neighboring (not diagonal) APD+CsIpairs such as i-ii and i-iii. In Figure 5.21, we show an example histogram of the (accidental)coincidence events in the neighboring pairs (i-ii). The number of these events (e.g., 359 in thefigure) is smaller than that of the diagonal pairs (627). The difference is considered to arise fromthe back-to-back directivity of the 511 keV γ-rays from 22Na.

Thus, by applying the coincidence condition to the obtained events, we successfully extractedthe 511 keV γ-ray events which were emitted simultaneously and oppositely in electron-positronpair annihilation in 22Na.

Page 67: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

66CHAPTER 5. SPECTRAL MEASUREMENTS WITH A DIGITAL PEAK-HOLDING METHOD

PHA ch2500 3000 3500 4000

Coun

ts

0

2

4

6

8

10

12

14

16

18

20

Spectrum of APD+CsI Pos.(iii) : Coincident with Pos.(ii) Entries 662

Pos.(iii)

Spectrum of APD+CsI Pos.(iii) : Coincident with Pos.(ii)

PHA ch2500 3000 3500 4000

Coun

ts

0

5

10

15

20

25

30

Spectrum of APD+CsI Pos.(iv) : Coincident with Pos.(i) Entries 786

Pos.(iv)

Spectrum of APD+CsI Pos.(iv) : Coincident with Pos.(i)

PHA ch2500 3000 3500 4000

Coun

ts

0

5

10

15

20

25

Spectrum of APD+CsI Pos.(i) : Coincident with Pos.(iv) Entries 786

Pos.(i)

Spectrum of APD+CsI Pos.(i) : Coincident with Pos.(iv)

PHA ch2500 3000 3500 4000

Coun

ts

0

2

4

6

8

10

12

14

16

Spectrum of APD+CsI Pos.(ii) : Coincident with Pos.(iii) Entries 662

Pos.(ii)

Spectrum of APD+CsI Pos.(ii) : Coincident with Pos.(iii)

Figure 5.20: 22Na spectra of each APD+CsI pair after coincidence filtering (see text). Spectra ofPosition i, ii, iii, and iv are shown from bottom left to top left, anticlockwise. The alignment ofthe plots corresponds to that of the APD+CsI pairs in the thermostatic chamber (Figure 5.17). Forpresentation, the spectra were re-binned every 6 channels.

Page 68: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

5.5. COINCIDENCE MEASUREMENT BETWEEN MULTIPLE CHANNELS 67

PHA ch2200 2400 2600 2800 3000 3200 3400 3600 3800 4000

Coun

ts

0

5

10

15

20

25

Spectrum of APD+CsI Pos (i)

Concident with the diagonal APD+CsI at (iv)627 Entries

Concident with the neighboring APD+CsI at (ii)359 Entries

Spectrum of APD+CsI Pos (i)

Figure 5.21: Histograms of APD+CsI No.29 placed at Pos (i), obtained by selecting only thecoincidence events among the diagonal (black) and neighbor (red) APD+CsI pairs.

Page 69: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

Chapter 6

Improvements of Energy and TimeResolution in Low Sampling RateMeasurements

6.1 Objectives

In the previous chapter, we measured spectra of APD+CsI pairs with the SpaceWire ADC Box.The digital peak-holding method was implemented to calculate pulse heights of input pulses fromthe detector, and a sufficient spectral resolution was achieved (table 5.2, and Figure 5.8) in thesemeasurements. This is because the filtered pulse waveform (shaping amp output) is slow enoughfor the method to determine pulseheights at a sampling rate of 50 MHz.

The number of sampled data points in one pulse waveform is essential to get a good energy (orspectral) resolution in the digital peak-holding method (Figure 5.1). In fact, as shown in Figure5.3, the energy resolution degrades significantly, at lower sampling rates, for example, 1 MHz,because only a few sampling points are available across an input pulse with ∼1 µs shaping time.The same effect can occur even in a sampling rate of 50 MHz, if the input pulse is very sharp (e.g.,plastic scintillators), and a faster shaping time must be employed. In such a case, an estimationof the arrival time of an input pulse is not easily performed, either, since the ”peak time”, whenthe sampled waveform data becomes maximals, cannot be used to accurately determine the arrivaltime (Figure 5.1).

To fully utilize the waveform sampling functionality of the SpaceWire ADC Box, we newlydeveloped a method that restores the energy and time resolutions of input pulses under sparsesamplings. In section 6.2, we describe a recipe of the restoration method, and then verify itseffectiveness in section 6.3 using a test pulse. In section 6.4, the method is applied to restore theenergy resolution of a spectrum of APD+CsI. In section 6.5, we apply the method to a coincidenceexperiment performed at a sampling rate of 50 MHz, to achieve a time resolution superior to thesampling interval (20 ns).

68

Page 70: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

6.2. A CROSS-CORRELATION METHOD WITH A TEMPLATE WAVEFORM 69

6.2 A Cross-Correlation Method with a Template Waveform

6.2.1 Setup of the problem

A signal measure by using the SpaceWire ADC Box is usually an output of a shaping ampli-fier. The arrival time of individual input pulses are not synchronized with the sampling (AD-conversion) clock. Therefore, as illustrated in Figure 6.1, a digitized waveform depends signifi-cantly on ”phase” of the sampling points relative to the pulse arrival time, when the sampling rateis low. The restoration of the energy and time resolutions can be translated to a problem of how toestimate the sampling ”phases” of waveform data.

ADCClock

Figure 6.1: Examples of waveform sampling with three different pulse phases.

Since a shaping amplifier generally has a relatively narrow frequency bandpass, its outputpulse heve nearly the same shape except for different pulse heights. For the same reason, the pulseshape is not much affected by various noise components. Therefore, a pulse waveform P can beexpressed as a function of time t as

P (t) = A × T (t) (6.1)

where A is an amplitude of the pulse, and T (t) is a normalized template pulse waveform. Thisproperty allows us to utilize a cross-correlation technique.

Rise Time Fall Time

Figure 6.2: An example of output pulses from a shaping amplifier.

If we somehow obtain a template pulse, at an small enough sampling intervals, equation 6.1allows us to compare the template with each digitized waveform to derive phase information. The

Page 71: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

70CHAPTER 6. IMPROVEMENTS OF ENERGY AND TIME RESOLUTION IN LOW SAMPLING RATE MEASUREMENTS

most standard way of performing such a phase estimation is to calculate cross correlation betweenthe template and each digitized waveform.

The cross-correlation coefficient Ci for two discrete functions Ai and Bi is defined as

Ci = ΣjAjBi+j, (6.2)

where i represents a translation of one function from the other. The cross-correlation methodsearches for i that maximizes Ci, and hence, that maximizes the overlap between Aj and Bk.Its application includes image recognition, detection of nerve signals, and so on. In Figure 6.4,we show an example of the cross correlation between a template and simulated waveform. Thesimulated waveform contains a noise component in addition to a signal component.

We assumes that the available template pulse waveform, Ti, consists of a sufficently largenumber of data points with a small sampling interval. In contrast, observed waveform, Di isconsumed to be sampled under a low rate, so that it contains a smaller number of data points thanTi. Therefore we should slightly modify equation 6.2. If the sampling rate of Ti is R times higherthan that of Di, one data point in Ti corresponds to every R data point in Di. Therefore, equation6.2 may be modified as

Ci = ΣjDjTi+j×R. (6.3)

Here, the index i runs from 0 to the number of data entries in Ti, while to summation over j is takenfrom 0 to the end of Dj . The value of i that maximizes Ci indicates the best alignment betweenthe template and observed data. This method is mathematically nearly equivalent to performing aleast-square fit to each pulse waveform with equation 6.2, with leaving A and the relative time lagas free parameters.

6.2.2 Methods to define template waveform

There are mainly two ways to obtain the template waveform of input pulses; an actual measurementand simulation. If input pulses are relatively noise free, an average of measured waveforms can beused as the template. However, the measurement has to be performed at high enough a samplingrate, requiring a device operated under a very high sampling rate. For example, present digitaloscilloscopes, which often have a sampling rate of >0.5–1 GHz, may be employed. If the operatingsampling rate is lower than the maximum of the SpaceWire ADC Box (65 MHz), the ADC Boxitself can be a candidate.

In the case that there is no available device that can precisely measure input pulses, a circuitsimulation will be an alternative way. If the internal operations (amplification, integration, differ-entiation, etc.) of amplifiers and their parameters are known, we can derive their transfer functionby a computer simulation. The simulated transfer function directly provides to the template wave-form.

In the following sections, we employed the former way, with the SpaceWire ADC Box, toconstruct the template waveform. Especially in section 6.5, we further interpolate the sampleddata points to define the template with a higher time resolution.

Page 72: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

6.3. RESTORATION OF SPECTRAL RESOLUTION OF TEST PULSES 71

6.3 Restoration of Spectral Resolution of Test Pulses

We first verify the effectiveness of the cross-correlation method using a test pulse data. The wave-form data measured at a sampling rate of 50 MHz is used to construct the template waveform.We cross correlates this template against a waveform data measured at lower sampling rates, toexamine whether a better spectral resolution can be achieved with the method.

6.3.1 Preliminary analysis

We utilize the same test pulse data measured at at 50, 10, 5, 2.5, and 1 MHz in section 5.2. Theevent data hold pulse waveforms of four different input pulse heights (1022, 754, 513, and 233mV) as shown in Figure 5.3. The off-line cross-correlation program extracts the event waveformdata, and then calculates the cross correlation with the template waveform.

6.3.2 Cross-correlation with a template waveform

We actually applied the cross-correlation method to the waveform data sampled at a rate of 2.5 or1 MHz, and examined whether this new method can restore the energy resolution which degradedat these low sampling rates as long as the digital peak-holding method is used.

The template waveform was constructed by averaging 100 acquisitions of 1022 mV-pulse-height pulses sampled at 50 MHz. Figure 6.3 shows the derived template waveform. In the actualcross-correlation process, the core region of the template waveform (0–10 µs in Figure 6.3) wasextracted and utilized to reduce the computational time. Since the test pulse is almost noise free,the averaged pulse waveform is very similar to individual (not averaged) ones as shown, e.g.,example, one shown in Figure 5.3.

Time us0 2 4 6 8 10 12 14

ADC

Ch

2000

2500

3000

3500

4000

Template WaveformTemplate Waveform

Figure 6.3: The template waveform created by averaging 100 pulse waveform data of 1022 mV-pulse-height measured at 50 MHz.

Figure 6.4 shows an example of the calculation result for a pulse waveform sampled at 1 MHz.The coefficient has its maximum at a translation of i =1441. In Figure 6.5, we superpose the

Page 73: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

72CHAPTER 6. IMPROVEMENTS OF ENERGY AND TIME RESOLUTION IN LOW SAMPLING RATE MEASUREMENTS

waveform and the template translated by 1441 steps. The two waveforms nicely agrees with eachother under this best solution.

Translation1300 1400 1500 1600 1700

Coef

ficie

nt

0

100

200

300

400

500

600

700

610×The Cross-Correlation Coefficient

Figure 6.4: Left: An example of the cross-correlation coefficient between the waveform sampledat 1 MHz and the template. The peak has its maximum at a translation of 1441. Right: A close-upof the cross-correlation peak.

Samples0 1000 2000 3000 4000 5000

ADC

ch

2000

2200

2400

2600

2800

3000

3200

3400

3600

3800

Sampled Waveform (1MHz) and The Template

Sampled Waveform 1 MHzThe Template

Sampled Waveform (1MHz) and The Template

Samples1400 1500 1600 1700 1800 1900 2000

ADC

ch

2000

2200

2400

2600

2800

3000

3200

3400

3600

3800

Sampled Waveform (1MHz) and The Template

Sampled Waveform 1 MHzThe Template

Figure 6.5: Left: The waveform sampled at 1 MHz (red) and the template (black; sampled at 50MHz). The template is translated by i =1441 in the x-axis direction. Right: A close-up of the leftplot.

While the value of i that maximizes Ci gives our best estimate of the pulse arrival phase, weneed some consideration to restore the pulse height. Here, we defined the restored pulse height as

PH =Tmax

Ti

Dmax, (6.4)

where Tmax, Dmax, and Ti are the maximal value of the template waveform, the maximum of thepulse waveform sampled at a low sampling rate, and a template value at the same position as Dmax.The definition of each variable is also shown in Figure 6.6.

By accumlating the pulse height which is calculated according to equation 6.4, we obtainedhistograms shown in Figure 6.7 and 6.8, correspondingly to the samplig rates of 1 and 2.5 MHz,

Page 74: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

6.3. RESTORATION OF SPECTRAL RESOLUTION OF TEST PULSES 73

: The Template

Tmax

Ti

Dmax

PH

ij

: An Input Pulse: sampled points

Figure 6.6: Definitions of the variables used in the pulse-height calculation.

respectively. Each peak in the restored histograms is much shaper than that of the raw histograms,and the low-pulse-height tails have disappeared. The bottom panels of the Figure show expandedviews of the histogram peaks, together with Gaussian fits. The parameters of the best-fit functionsare listed in table 6.1. Thus, the cross correlation indeed restores the pulse height successfully, evenat an extremely low sampling rate of 1 MHz. Incidentally, in the 2.5 MHz histogram (Figure 6.7),individual peaks in the restored histogram can be well explained by the Gaussian, while those ofthe 1 MHz histograms (Figure 6.8) have somewhat different shapes from (shaper than) a Gaussianfunction.

Table 6.1: The peak center and broadening obtained from the restored histograms of the2.5 and 1 MHz data.

Sampling Input Pulse Height (mV)Rate (MHz) 233 513 754 1022

2.5 µ∗ 2478.1 3006.7 3463.2 3973.81σ† 1.5 1.5 1.7 1.9

1 µ∗ 2478.4 3006.5 3463.0 3973.51σ† 1.9 2.5 3.2 4.0

∗The peak center in ch. The typical statistical error is ±0.1 ch.†The 1σ width of the peak in ch. The typical statistical error

is ±0.1 ch.

We conclude that the cross-correlation method successfully restores pulse heights of inputpulses even when only several sampling points. Although the systematic broadening of the re-stored peak (1.5–4.0 ch, table 6.1) is larger than that derived with the digital peak-holding methodat higher samplig rates (0.9–3 ch, table 5.2), the restored peak center values are almost the same

Page 75: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

74CHAPTER 6. IMPROVEMENTS OF ENERGY AND TIME RESOLUTION IN LOW SAMPLING RATE MEASUREMENTS

in both methods. The linearity relation between the input pulse height and the peak center is alsocorrectly preserved in the cross-correlation method.

The cross-correlation calculation consumes machine time of 20 s to process 10000 events on aPC with Dual Core AMD Opteron operated at 2.4 GHz. Since this calculation only needs integeroperations, the calculation can be implemented in HDL logic rather easily than other estimationmethods which utilizes floting-point operations. By implementing it into the FPGA, this operationcan be performed on-line, reducing time spent in an off-line analysis.

Page 76: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

6.3. RESTORATION OF SPECTRAL RESOLUTION OF TEST PULSES 75

PHA ch2200 2400 2600 2800 3000 3200 3400 3600 3800 4000

Coun

ts

0

100

200

300

400

500

600

700

800

Histogram of the Restored PH 2.5 MHz

Histogram with the Digital Peak-holding MethodRestored Histogram with the cross correlation

PHA ch2450 2455 2460 2465 2470 2475 2480 2485 2490

Coun

ts

0

100

200

300

400

500

600

700

800

PHA ch2960 2970 2980 2990 3000 3010 3020

Coun

ts

0

100

200

300

400

500

600

700

800

PHA ch3420 3430 3440 3450 3460 3470 3480

Coun

ts

0

100

200

300

400

500

600

700

800

PHA ch3930 3940 3950 3960 3970 3980 3990

Coun

ts

0

100

200

300

400

500

600

700

800

Figure 6.7: Top: The raw (blue) and restored (black) histograms of test pulses measured at asampling rate of 2.5 MHz. The raw histograms is the same as Figure 5.3. Bottom: Close-up plotsof individual peaks. The best-fit Gaussian models for the restored peaks are also plotted by redsolid lines.

Page 77: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

76CHAPTER 6. IMPROVEMENTS OF ENERGY AND TIME RESOLUTION IN LOW SAMPLING RATE MEASUREMENTS

PHA ch2200 2400 2600 2800 3000 3200 3400 3600 3800 4000

Coun

ts

0

100

200

300

400

500

600Histogram of the Restored PH 1 MHz

Histogram with the Digital Peak-holding MethodRestored Histogram with the cross correlation

PHA ch2350 2400 2450 2500 2550 2600

Coun

ts

0

100

200

300

400

500

600

PHA ch2800 2850 2900 2950 3000

Coun

ts

0

100

200

300

400

500

600

PHA ch3250 3300 3350 3400 3450 3500

Coun

ts

0

100

200

300

400

500

600

PHA ch3750 3800 3850 3900 3950 4000

Coun

ts

0

100

200

300

400

500

600

Figure 6.8: The same as Figure 6.7, but for the data of 1 MHz measurement. The raw histogramis plotted in cyan.

Page 78: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

6.4. RESTORATION OF THE ENERGY RESOLUTION OF ACTUAL DETECTOR SPECTRA77

6.4 Restoration of the Energy Resolution of Actual DetectorSpectra

We apply the cross-correlation method to an actual detector spectra acquired at a low samplingrate. We utilize the same pair of 5 mm cubic CsI and 5×5 mm2 APD as used in section 5.3, tocompare the results to be obtained here those from the digital peak-holding method (table 5.3).

6.4.1 Measurement and Analysis Setup

The same measurement setup as the previous single channel measurement (Figure 5.6) was utli-tized. The supplied bias voltage (378 V), gain parameters of the amplifiers (e.g. a shaping timeconstant 1 µs), and the room temperature (25◦C) are totally same as described in section 5.3.2.Hence, the avalanche gain of the APD is 50.

Irradiating γ-rays of 137Cs, we measured spectra with the SpaceWire ADC Box with the sam-pling rate of the ADC set to 1 MHz. The integration time was 3600 s. Like the test pulse measure-ment described in the previous section, we output raw waveform data of 100 sampling points to anevent packet.

We constructed the template waveform by averaging acquisitions of the 662 keV pulses, eachdigitized at a sampling rate of 50 MHz. Since the utilized data actually contains raw waveformsof various pulse heights, we selected only those events of which the raw pulse height (determinedwith the digital peak-holding method) falls in the range of 3198–3202 ch. This corresponds to the662 keV photo-peak. We set the pulse height range rather narrow to produce the template frompulses with similar waveforms. Eventually, the template waveform was constructed by averaging100 of such pulse waveforms. Figure 6.9 shows the obtained template waveform.

Time us0 5 10 15 20 25 30

ADC

Ch

2000

2200

2400

2600

2800

3000

3200

3400

Template Waveform of APD+CsI 50 MHzTemplate Waveform of APD+CsI 50 MHz

Figure 6.9: The template waveform constructed from pulses from the APD+CsI detector, eachproduced by a 662 keV γ-ray.

Page 79: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

78CHAPTER 6. IMPROVEMENTS OF ENERGY AND TIME RESOLUTION IN LOW SAMPLING RATE MEASUREMENTS

6.4.2 Results

After the data acquisition, we calculated the cross-correlation with the template waveform, andaccumlated the restored pulse heights into a histogram. In Figure 6.10, the obtained histogram areshown, together with that from the digital peak-holding method. We fitted the 662 keV peak ineach histogram with a Gaussian function. The best-fit models are also shown in the figure, whilethe best-fit parameters are listed in table 6.2. The energy resolution at 662 keV is considerablyimproved from 9.1% to 7.1%, by applying the cross-correlation method. Futhermore, the 662 keVpeak profile, which was distorted when using the digital peak-holding method, now appears moreGaussian.

From the result, we have successfully examined the restoration of the energy resolution withthe cross-correlation method in a low sampling rate measurement. Particularly, in a measurementof the APD+CsI signal, the energy resolution at the 662 keV peak in the restored histogram of1 MHz data is as same as that obtained by applying the digital peak-holding method to the dataacquired at 50 MHz (table 5.3).

ADC ch2200 2400 2600 2800 3000 3200 3400

Coun

ts

0

100

200

300

400

500

600

700

800APD+CsI spectrum 1 MHz

The Digital Peak-Holding Method

The Cross-Correlation Method

APD+CsI spectrum 1 MHz

ADC ch3050 3100 3150 3200 3250 3300 3350

Coun

ts

0

20

40

60

80

100

120

140

160

180

200

220A Close-Up of the 662 keV Peak

The Digital Peak-Holding Method

The Cross-Correlation Method

7.1%9.1% at 662 keV

A Close-Up of the 662 keV Peak

Figure 6.10: Spectra of 137Cs taken with the SpaceWire ADC Box at a sampling rate of 1 MHz.The left panel shows overall spectra obtained with the digital peak-holding method (black) and thecross-correlation method (red). An expanded view of the 662 keV peaks and their best-fit Gaussianfunctions are presented in the right panel.

Table 6.2: The best-fit Gaussian parametes∗.Method Mean (ch) 1σ Resolution (%)

Digital Peak-Holding 3170.1±0.7 43.3±0.6 9.1±0.1Cross Correlation 3197.1±0.6 34.6±0.5 7.1±0.1

∗With 1σ errors.

Page 80: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

6.5. RESTORATION OF THE TIME RESOLUTION 79

6.5 Restoration of the Time Resolution

6.5.1 An Overview

In this section, we verify the performance of the cross-correlation method in the time resolutionrestoration. As explained in the previous sections, the cross-correlation method can restore the en-ergy resolution by deriving the ”phase” of a pulse waveform which is measured at lower samplingrate than that of the template waveform. The phase derivation is performed by coordinating thetemplate waveform and the measured waveform by calculating the cross correlation. In this oper-ation, not only the pulse height information but also the time information of the pulse is restored.Using this restored time information, we try to improve the time resolution of the SpaceWire ADCBox. First we examine the time resolution which can be achieved with the ADC Box using thecross-correlation method, by measuring test pulses. Then, we measure a time-of-flight of 511 keVγ-rays to verify the effectiveness of the time resolution restoration in a practical experiment.

6.5.2 Preliminary Experiments

In Figure 6.11, we show a setup of the test pulse measurement. Test pulses, which have a constantpulse height, are filtered in two distinct shaping amplifiers (with a shaping time constanf of 100 ns),and then fed to the ADC. Figure 6.12 shows an oscillograph of the input pulses. Since Channel 0and 1 of the ADC Box measure the same pulse waveform, the acquired data consist of a number ofcoincidence (actually identical) events, and therefore, the time difference of the arrival time shouldbe zero.

We use the same User FPGA logic as the previous experiments. We output, to an event packet(e.g. Figure 4.8), data of 150 sampling points of digitized waveform in addition to the 48-bit triggertiming counted by 50 MHz counter. The event acquisition is started by a self-trigger generated inindividual Channel module. The pulse frequency of the test pulse generator is 90 Hz. We carriedan event acquisition for 30 s, and obtained 2700 events per channel.

Shaping AmpORTEC579

SpaceWireADC Box

Test PulseGenerator SpaceCube PC

TCP/IPSpaceWire

x2Shaping Time

100ns2 ch Activated

(5 ch Suspended)

Figure 6.11: A setup of the test pulse experiment.

6.5.3 Result of test pulse measurement

We show an example of a digitize waveform measured at 50 MHz in Figure 6.13. Because thetime resolution of the real time counter in the Channel Manager module is 20 ns (50 MHz), the

Page 81: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

80CHAPTER 6. IMPROVEMENTS OF ENERGY AND TIME RESOLUTION IN LOW SAMPLING RATE MEASUREMENTS

Figure 6.12: An oscillograph of the shaper output.

time resolution obtained from the waveform data is not improved from 20 ns if we perform nocalculation on the raw digitized waveform.

Time us0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8

ADC

Ch

1900

2000

2100

2200

2300

2400

2500

2600

2700

2800

Test Pulse Waveform 50 MHzMHzTest Pulse Waveform 50 MHzMHz

Figure 6.13: An example of a waveform of a test pulse digitized at 50 MHz (20 ns intervals).

In order to perform the cross-correlation calculation, we prepared the template waveform. Wefirst averaged raw waveform data, and then interpolated the observed sampling points with a 3-dimensional spline method to obtain thinner sampling intervals by 20 times (1 ns). This interpola-tion to the obesrved data is feasible because the shaper output signal has smooth pulse shape, andhas the high signal to noise ratio. Figure 6.14 shows the created template waveform.

Since the slew rate of the input buffer amp (LM6142) of the ADC Box limits the build-upspeed of the pulse, the created template waveform also shows a rectilinear building up (0.6–0.8 µsin Figure 6.14). It is a critical problem, for the cross-correlation method, that the measurementis performed in a slew-rate-limited configuration because it assumes the similarity of the pulseshape between the template and observed pulses (§6.2). However, in this experiment, the cross-correlation calculation is applied only to pulses which have almost constant pulse heights (fromthe test pulse generator), and therefore, we consider that the slew-rate-limited waveform of the

Page 82: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

6.5. RESTORATION OF THE TIME RESOLUTION 81

templte hardly has an effect on the cross-correlation result.

Time us0.7 0.72 0.74 0.76 0.78 0.8

ADC

Ch

1900

2000

2100

2200

2300

2400

2500

2600

2700

2800The Teplate Waveform

Figure 6.14: The created template waveform (left) and a close-up of the peak (right).

Using the template waveform, we performed the cross-correlation between observed waveformand the template in an off-line analysis. From the calculation result, the translation in the time-axis, where the cross-correlation coefficient has its maximal value, is determined with a 1 ns stepsince we adopted the interpolated template waveform (described above) which has 1 ns samplingintervals.

By adding the trigger time (20 ns resolution) and the translation (1 ns resolution), we obtain theabsolute hit timing of observed events. We filled differences of the hit time between coincidenceevents of Channel 0 and 1 into a histogram as shown in Figure 6.15. The best-fit Gaussian modelgave a 1-σ width of 0.45 ns. Therefore we conclude that, by applying the cross-correlation method,the time resolution of the ADC Box for the absolutely coincidence events are improved to 1.1 ns(FWHM) from the original resolution of 20 ns.

Time ns-4 -3 -2 -1 0 1 2 3 4

Coun

ts

0

200

400

600

800

1000

1200

1400

1600

1800

2000

2200

Time Difference of Test Pulses between Ch.0 and Ch.1

(FWHM 1.1 ns)1sigma 0.45 ns

Time Difference of Test Pulses between Ch.0 and Ch.1

Figure 6.15: A histogram of the arrival time difference between Channel 0 and 1 in the test pulsemeasurement.

Page 83: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

82CHAPTER 6. IMPROVEMENTS OF ENERGY AND TIME RESOLUTION IN LOW SAMPLING RATE MEASUREMENTS

6.5.4 Time-of-flight experiment

Using the restored time resolution of the SpaceWire ADC Box, we perform a time-of-flight mea-surement using two distinct detectors and back-to-back emitted 511 keV γ-rays from 22Na.

We show a setup of the time resolution experiment in Figure 6.17. Two scintillators eachviewed by a photo-multiplier tube (PMT) are used to detect the back-to-back 511 keV γ-rays from22Na. By measuring the difference of the arrival time of events between the detectors, we canobtain the path difference L2 − L1. If the path difference is zero (L1 = L2), a pair of 511 keVγ-rays will hit the detectors coincidently.

As the number of scintillation light in a scintillation crystal decreases, or as the decay time ofthe scintillation light extends, the timing fluctuation of the output pulse, which originates from thecrystal itself becomes large. To reduce such a timing fluctuation because of the scintillators, weused LaCl3 and LaBr3 which have such favorable characteristics as a fast scintillation decay timeand numerous scintillation light. Basic parameters of the crystals are listed in table 6.3 togetherwith those of NaI and CsI.

Table 6.3: Characteristics of scintillators∗.Crystal Specific Gravity λ Decay Time Light Yield

(g/cm3) (nm) (ns) (ph/MeV)LaBr3 5.40 356 25 62000LaCl3 3.79 335 280 49000

NaI(Tl) 3.67 415 230 38000CsI(Tl) 4.51 540 680 (64%), 65000

3340 (36%)From [17].

The output of the PMT is further multiplied through a pre-amplifier (CP2869, Clear Pulse),and then filtered with a shaping time constant of 100 ns by a fast shaping amplifier (579, ORTEC).Figure 6.16 shows an oscillo graph of pulse waveforms.

The shaper output signals are fed to the SpaceWire ADC Box. Since the coincidence eventrate between the two detectors are much lower than that of single hit events in each detector, weimplemented an on-line coincidence logic in a Trigger submodule of the User FPGA logic. Theevent acquisition is started only by the coincidence trigger to prevent a number of single hit eventsto exhausting the data transfer bandwidth (120 kbps, §4.5.4). We set rather wide coincidence win-dow of 30 µs to simplify the implementation work of the coincidence logic. The trigger thresholdin each channel was set at 2080 ch (∼8% of sthe pulse height of 511 keV photo-peak). In a Cal-culator module, like the previous experiment, we output data of 150 sampling points of digitizedwaveform to an event packet. We performed five measurements changing the distance between the22Na source and the detector. The configuration in individual measurements are listed in table 6.4.

Page 84: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

6.5. RESTORATION OF THE TIME RESOLUTION 83

Figure 6.16: An oscillograph of the shaping amplifier output for channel 1 (trace 1) and 2 (trace2). Trace 3 shows a coincidence trigger.

PMTHPK R6231

PreAmpCP2869

HV

Shaping AmpORTEC579

SpaceWireADC Box

SpaceCube

PC

TCP/IP

SpaceWire

x2Shaping Time

100ns2 ch Activated

(5 ch Suspended)IsometricCabling

GORE-TEXBlack Sheet

PMTHPK R6231

PreAmpCP CP2869

22Na

L2 cm

LaBr3

LaCl3L1 cm

Ch.0

Ch.1

Figure 6.17: A measurement setup of the time-of-flight experiment.

6.5.5 Results of time-of-flight experiment

We obetained a spectrum of 22Na by filling pulse heights into a hisogram as shown in Figure 6.18.Since we applied on-line coincidence triggering, only the back-to-back 511 keV events (photo-peak and Compton continuum) are seen in the hisogram while the 1.274 MeV photons totallydissapeared.

Accumulating waveforms of the photo-absorbed event of 511 keV γ-rays, we created a tem-plate waveform for individual channels. The waveforms of 511 keV photo-absorbed events, whichhave a maximal ADC value of 2482–2487 ch (Ch.0) and 2465–2470 ch (Ch.1), were selectivelyutilized for the template creation. Like the previous analysis of the test pulse data, we also inter-polated the averaged waveform so that the template has a sampling interval of 1 ns, twenty timesas dense as the original one (20 ns). The eventually obtained template waveform is shown in Fig-ure 6.19. Since the two scintillators have different scintillation decay timescale (table 6.3), andthat of LaCl3 is longer than the shaping time constant (100 ns), the template waveforms show adiscrepancy especially in their decaying part.

As described in section 6.5.3, the observed waveforms, including the created template, also

Page 85: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

84CHAPTER 6. IMPROVEMENTS OF ENERGY AND TIME RESOLUTION IN LOW SAMPLING RATE MEASUREMENTS

Table 6.4: The configuration of five measurements.

Measurement No. 1 2 3 4 5L1 (cm) 10 10 10 10 10L2 (cm) 10 20 30 70 100

Path Difference (cm) 0 10 20 60 90Exposure (s) 600 1200 1200 7200 10800

PHA ch2200 2400 2600 2800 3000 3200 3400

Coun

ts

0

20

40

60

80

100

120

Spectrum of 22Na

Figure 6.18: The spetrum of 22Na obtained with the LaCl3 and PMT pair (Channel 0 in Figure6.17) in measurement No.1.

show a rectilinear shape in their build up part because the input pulse has rather fast shaping timeconstant. However, like the test pulse measurement, that cannot be a big problem since the targetwaveforms of the cross-correlation calculation are the 511 keV photo-peak events which has assimilar pulse height as that of the template in this experiment.

We calculated the cross-correlation coefficient for each measurement. Only the coincidentphoto-peak events in which the two 511 keV γ-rays are totally absorbed in the two scintillators areutilized in the calculation. According to the same procedure as shown in section 6.5.3, we furtherfilled the difference of the arrival time of the events into histograms. Figure 6.21 shows the result.As the distance increases, the time difference of the coincidence event becomes large.

By fitting the peak in individual histograms, we obtained the peak width and center value. Thebest-fit parameters are listed in table 6.5. The 1-σ widths of the peak is, for example, 0.97 ns(No.4), and therefore the time resolution of this experiment is determined to 2.29 (FWHM). Thevalue is slightly worse than that of the test pulse measurement. This can be understood as extraspreading of the arrival time because of the time resolution of photomultiplier tubes and scintillatorcrystals.

The peak center values are plotted in respect to the path difference (L2 − L1) of two 511 keVphotons, which made a coincidence hit in the two detectors. All the data point are consistentlyaligned on a linear function. The best-fit model results an experimental value of the speed of light

Page 86: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

6.5. RESTORATION OF THE TIME RESOLUTION 85

Figure 6.19: The template waveform of the two channels created by averaging and interpolatingmeasured waveforms of 511 keV events.

of (2.94 ± 0.01) × 108 m/s which closely agrees with the definition (2.997 · · · × 108 m/s) in 2%.Althoug the peaks (Figure 6.20) have widths of ∼1.5 ns (1σ) level, if we accumulate a number ofevents, the centroids of L2 − L1 = 0 cm and L2 − L1 = 10 cm are clearly distinguished (Figure6.21).

We thus successfully achieved the time resolution less than 3 ns (FWHM) improving from theoriginal value of 20 ns by the cross-correlation method with the scintillator crystals viewed byphotomultiplier tubes. It is noticeable that, although the observed signal is filtered with a shapingconstant of 100 ns to reduce the noise component, we can determine the arrival time of an eventwith much smaller time interval.

Table 6.5: The best-fit parameters of the peaks in the histograms of the arrival timedifference∗.

Measurement No. 1 2 3 4 5Path Difference (cm) 0 10 20 60 90

Peak Cetnter (ns) 1.36±0.05 1.66±0.06 1.97±0.11 3.32±0.09 4.57±0.20σ (ns) 1.37±0.04 1.23±0.05 1.18±0.11 0.97±0.09 1.24±0.15

FWHM (ns) 3.23±0.09 2.89±0.12 2.79±0.27 2.29±0.21 2.93±0.35∗With 1σ errors.

Page 87: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

86CHAPTER 6. IMPROVEMENTS OF ENERGY AND TIME RESOLUTION IN LOW SAMPLING RATE MEASUREMENTS

0

100

200

300

L=0, Mean=0

0

50

100

150

L=10, Mean=0.30

0

10

20

30

40

L=20, Mean=0.61

010203040

L=60, Mean=1.96

0

5

10

15

L=90, Mean=3.21

Time ns-6 -4 -2 0 2 4 6 8 10

Coun

ts

Figure 6.20: The histogram of delta-T between back-to-back events observed by the two detectors.

Ditance cm-10 0 10 20 30 40 50 60 70 80 90 100

Tim

e ns

-1

0

1

2

3

4

5

Ditance cm-10 0 10 20 30 40 50 60 70 80 90 100

Tim

e ns

-1

0

1

2

3

4

5

Time ns=0.034*(L2-L1 cm)+0.0008 =(L2-L1 cm)/(29.4 cm/ns)+0.0008

Delta-T versu Distance

Figure 6.21: The path difference and difference of the event arrival time overlaid with the best-fitlinear function. Error bars indicate the ±1σ fitting uncertainties of the best-fit Gaussian means.

Page 88: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

Summary

In the present thesis, we developed a data acquisition framework based on the SpaceWire protocol,waveform-sampling ADC board with a SpaceWire I/F, and a method that can restore the spectraland timing resolution in a low sampling rate measurement.

• Development of SpaceWire-based data acquisition system

– We coded a software library in C++, which provides easy-to-use RMAP communica-tion to a user application on SpaceCube.

– We developed a VHDL template scheme for the User FPGA logic on a standard circuitboard. The template scheme includes an on-chip bus, an external bus adapter, and auser module template.

– The data acquisition system has been properly working in a several experiments. Theachievement has been also applied to the development of a new SpaceWire I/F LSI.

• Development of 8-channel waveform-sampling ADC board

– The SpaceWire-based data acquisition framework was implemented.– We examined the spectral performance of the ADC board with the digital peak-holding

method. The same energy resolution (7.1%) and noise level (24 keV) as that from acommercial multi-channel analyzer was obtained in a measurement of a CsI crystalviewed by an APD.

– Spectra of eight scintillators for a balloon-borne Comptom camera experiment were si-multaneously measured by the ADC board, showing the multiple readout performance.

• Development of the cross-correlation method

– Using a cross correlation, we developed an alternative pulse height estimation method.– The cross-correlation method successfully restored the energy resolution of test pulse

and APD+CsI spectra obtained at low sampling rates.– With the cross-correlation method, we achieved the time resolution of 1.1 ns (FWHM)

from test pulse waveforms acquired at 50 MHz.– The time-of-flight of back-to-back 511 keV γ-rays was measured using two scitillator

crystals and photomultiplier tubes. By applying the cross-correlation method, we deter-mined the arrival time of events with 2.3–3.2 ns (FWHM) resolutions from waveformdata acquired at 50 MHz.

87

Page 89: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

Acknowledgement

I would like to express my thanks to all the people who have supported my graduate student life.Especially, I am grateful to Professor Makishima to his constant support and precise advices to mywork. His broad-ranging knowledge and experience guided me rightly in many aspects of my twoyears life in his group.

I would like to thank Senior Assistant Professor Nakazawa who taught me the way of carryingon research in the X-ray astoronomy field through many discussions. Associate Professor Kokubun(JAXA/ISAS), who worked as an assistant professor at The University of Tokyo by 2006, has beentraining my skill on scientific experiments and data analysis since I joined Makishima group as anundergraduate student. A great chance to participate the development of the SpaceWire-based dataacquisition system was provided by assistance of Professor Takahashi (JAXA/ISAS) and ProfessorNomachi (Osaka University) from the beginning.

My colleagues also helped me kindly in many ways. In particular, I am very happy to have anice classfellow, Mr. Yamada. Continuous discussion with him on science, everyday affairs, andhuman life relaxed me so much in hectic days.

I also grateful to my family for their support of my everyday life. Delicious meals and a com-fortable residence provided by them encouraged me so much to carry on research at the graduateschool. Last, I thank to my father who raised my interest on science, and has passed away at ayoung age in 2003.

88

Page 90: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

Bibliography

[1] European Space Agency, ECSS-E50-12A, ”SpaceWire: Links, Nodes, Routers and Net-works”, 2003

[2] European Space Agency, ECSS-E50-11 Draft F, ”Remote memory access protocol”, 2006

[3] Kamae, T., et al. 1992, Proc. SPIE, 1734, 2

[4] Kokubun, M., et al. 2007, PASJ, 59, S53

[5] LVDS Owner’s Manual 3rd Edition, National Semiconductor,2004, http://www.

national.com/appinfo/lvds/0,1798,100,00.html

[6] Mitsuda, K., et al 2007, PASJ, 59, S1

[7] Nomachi, M. et al. 2007, ”Serial Backplane for SpaceWire”, International SpaceWireConference, Dundee, Scotland, http://spacewire.computing.dundee.ac.uk/

proceedings/Papers/Networks\%20and\%20Protocols\%202/nomachi.

pdf

[8] Odaka, H., et al. 2007, ”Development of a SpaceWire-based Data Acquisition System fora Semiconductor Compton Camera”, International SpaceWire Conference, Dundee, Scot-land, http://spacewire.computing.dundee.ac.uk/proceedings/Papers/

Missions\%20and\%20Applications\%202/odaka.pdf

[9] Parkes, S. & Rosello, J. 2003, ”SpaceWire ECSS-E50-12A”, International SpaceWireSeminar, Noordwijk, The Netherlands, http://spacewire.esa.int/content/

TechPapers/documents/SpaceWire\%20Standard\%20\%20ISWS\%202003.

pdf

[10] Parkes, S. & McClements, C. 2003, ”SpaceWire Remote Memory Access Protocol”, DataSystems in Aerospace, Edinburgh, Scotland, http://spacewire.esa.int/content/TechPapers/documents/SpaceWire\%20RMAP\%20DASIA\%202005.pdf

[11] Schoenfelder, V., et al. 1993, ApJS, 86, 657S

[12] Takahashi, T., et al. 1993, IEEE Trans. Nucl. Sci., 40, 890

[13] Takahashi, T., et al. 2007, PASJ, 59, S35

89

Page 91: Development of SpaceWire-based waveform-sampling pulse height analyzer … · 2009-06-15 · Development of SpaceWire-based waveform-sampling pulse height analyzer and its application

90 BIBLIOGRAPHY

[14] Takahashi, T., et al. 2007, ”Space Cube 2, an Onboard Computer based onSpace Cube Architecture”, International SpaceWire Conference, Dundee, Scotland,http://spacewire.computing.dundee.ac.uk/proceedings/Papers/

Onboard\%20Equipment\%20and\%20Software/takahashi.pdf

[15] Tanaka, T., et al. 2004, Proc. SPIE, 5501, 229

[16] Tanaka, T., et al. 2005, NIM A, 568, 375

[17] Yanagida, T. 2004, Master Thesis, The University of Tokyo

[18] Yuasa, T., et al. 2007, ”Development of a SpW/RMAP-based Data Acquisition Frame-work for Scientific Detector Applications”, International SpaceWire Conference, Dundee, Scot-land, http://spacewire.computing.dundee.ac.uk/proceedings/Papers/

Missions\%20and\%20Applications\%202/yuasa.pdf