Implementation of real-time digital CR–RCm shaping filter on FPGA for gamma-ray spectroscopy

Implementation of real-time digital CR–RCm shaping filter on FPGA for gamma-ray spectroscopy

Nuclear Inst. and Methods in Physics Research, A 906 (2018) 1–9 Contents lists available at ScienceDirect Nuclear Inst. and Methods in Physics Resea...

1MB Sizes 1 Downloads 61 Views

Nuclear Inst. and Methods in Physics Research, A 906 (2018) 1–9

Contents lists available at ScienceDirect

Nuclear Inst. and Methods in Physics Research, A journal homepage: www.elsevier.com/locate/nima

Implementation of real-time digital CR–RCm shaping filter on FPGA for gamma-ray spectroscopy Yinyu Liu a,b , Jinglong Zhang a,c , Lifang Liu b , Shun Li b , Rong Zhou a ,∗ a b c

College of Physical Science and Technology, Key Laboratory of Radiation Physics and Technology, Ministry of Education, Sichuan University, Chengdu 610064, China Microsystem and Terahertz Research Center, China Academy of Engineering Physics, Chengdu 610200, China Chengdu University of Technology, Sichuan 610059, China

ARTICLE

INFO

Keywords: CR–RCm shaping Gamma-ray spectroscopy Semi-Gaussian filter Digital signal processing

ABSTRACT A novel implementation of a digital CR–RCm shaping filter for gamma-ray spectroscopy is presented in this paper, derived from the digitalization and quantization of the input and output voltage of CR and RC circuits. Compared with the conventional digital CR–RCm shaper, it has a relatively simple structure consuming fewer multipliers and is easy to realize on DSP chips. More importantly, this digital shaper also overcomes the shortcoming of the conventional digital CR–RCm shaper, which lacks the function of pole-zero cancellation (PZC). Experimental data on noise suppression, immunity to ballistic deficit, and energy resolution improvement show that the digital spectroscopy system based on the described shaper achieves the same excellent performance as the analog spectroscopy system from CANBERRA, which therefore provides a new way to realize the shaping of digital signals from radiation detectors, and this carries great significance for engineering applications.

1. Introduction Currently, digital signal processing (DSP) is widely used in gamma spectroscopy systems. A general block diagram of a digital gamma spectroscopy system is shown in Fig. 1 [1]. It consists of two blocks: one is the detector usually integrated with a preamplifier, and the other is composed of an adapter circuit based on an anti-aliasing filter and a single-ended to differential amplifier with adjustable gain, an analog-todigital converter (ADC), and a DSP chip. In the digital system shown in Fig. 1, the preamplifier’s output signals are directly digitized by ADC. In the following, all signal processing operations, including pulse shaping and pile-up processing, are carried out by programmable DSP chips. Pulse shaping, which is to shape the signal to optimize the spectrometer’s performance, such as immunity to ballistic deficit effect, pile-up rejection and signal-to-noise ratio, plays the most important role of all DSP operations [2]. CR–RCm shaping is one of the most widely used shaping methods in analog gamma spectroscopy systems. A recursive implementation of a digital Gaussian shaper based on wavelet analysis is proposed in [3,4], but it is too complicated to realize in DSP chips. The real-time digital CR–RCm shaping algorithm described in [5] has pretty good logic control and pipelined processing but with the shortcoming of lacking the function of pole-zero cancellation (PZC) and of its notable complexity for implementation on an FPGA chip. Considering the advantages of FPGA, a novel implementation of a digital CR–RCm shaper is proposed. Based on research work to improve the shaper’s performance in noise suppression, immunity to

ballistic deficit, and pile-up rejection through simulations, an optimized digital spectroscopy system is implemented. In the meantime, many experiments are conducted for this digital system to obtain performance data on the shaper’s energy resolution improvement and additionally to explore the performance difference between the presented system and the conventional analog spectroscopy system from CANBERRA. The rest of the paper is organized as follows. A review of analog CR–RCm shapers is described in Section 2. In Section 3 and Section 5, the novel digital CR–RCm shaper and its implementing strategies for FPGA are presented. Then, Sections 4 and 6 outline the simulation and experimental results of the shaper’s performance. Finally, the conclusion is drawn in Section 7. 2. 𝐂𝐑–𝐑𝐂𝐦 shaper As shown in Fig. 2, analog CR–RCm shaping filter is a network of one CR differentiator followed by m RC integrators with a suitable cascade arrangement. The number of RC integrators is the order number of the shaper. From [2], the transfer function of the CR–RCm shaping filter in the Laplace domain can be easily obtained as (1). 𝐻 (𝑠) =

𝑠 ⋅ 𝑅𝐶 (1 + 𝑠 ⋅ 𝑅𝐶)𝑛+1

(1)

With bilinear transformation in [6], the transfer function of the CR–RCm shaper in the discrete-time domain could be obtained as (2)

∗ Corresponding author. E-mail address: [email protected] (R. Zhou).

https://doi.org/10.1016/j.nima.2018.05.020 Received 1 November 2017; Received in revised form 10 May 2018; Accepted 10 May 2018 Available online xxxx 0168-9002/© 2018 Elsevier B.V. All rights reserved.

Y. Liu et al.

Nuclear Inst. and Methods in Physics Research, A 906 (2018) 1–9

Fig. 1. Typical block diagram of digital gamma spectroscopy system.

Fig. 3. Schematic of CR and RC circuit.

equation: 𝑅𝐶 ⋅

𝑉 [𝑛] − 𝑉𝑖𝑛 [𝑛 − 1] 𝑉𝑜 [𝑛] − 𝑉𝑜 [𝑛 − 1] 𝑉𝑜 [𝑛] + = 𝑖𝑛 (4) 𝑇 𝑅𝐶 𝑇 where 𝑇 is the sampling period of ADC. By applying 𝑑 = 𝑅𝐶∕(𝑅𝐶 + 𝑇 ), (4) can be simplified into the following form as:

Table 1 Algorithm details obtained through the bilinear transformation of CR–RCm filters for order 1–4. Algorithm details

1

𝑉𝑜 [𝑛] = 𝑉𝑜 [𝑛] =

2

𝑉𝑖𝑛 [𝑛] 𝑃12

𝑉𝑜 [𝑛] =

4



2𝑃2 ⋅𝑉𝑜 [𝑛−1] 𝑃1

𝑃12







𝑃22 ⋅𝑉𝑜 [𝑛−2]

𝑃12

𝑉𝑜 [𝑛] = 𝑑 ⋅ (𝑉𝑖𝑛 [𝑛] − 𝑉𝑖𝑛 [𝑛 − 1]) + 𝑑 ⋅ 𝑉𝑜 [𝑛 − 1]

𝑃12

𝑉𝑖𝑛 [𝑛−3] 𝑃13





𝑃13





4𝑃2 ⋅𝑉𝑜 [𝑛−1] 𝑃1

𝑃14

𝑅𝐶 ⋅

𝑉𝑖𝑛 [𝑛] 3⋅𝑉 [𝑛−1] 2⋅𝑉 [𝑛−2] 2⋅𝑉 [𝑛−3] 3⋅𝑉 [𝑛−4] + 𝑖𝑛𝑃 5 + 𝑖𝑛𝑃 5 − 𝑖𝑛𝑃 5 − 𝑖𝑛𝑃 5 𝑃15 1 1 1 1 10𝑃22 ⋅𝑉𝑜 [𝑛−2] 10𝑃23 ⋅𝑉𝑜 [𝑛−3] 𝑉𝑖𝑛 [𝑛−5] 5𝑃2 ⋅𝑉𝑜 [𝑛−1] − − − 𝑃5 − 𝑃1 𝑃12 𝑃13 1 5𝑃24 ⋅𝑉𝑜 [𝑛−4] 𝑃25 ⋅𝑉𝑜 [𝑛−5]



𝑃14



(5)

It can be easily determined from (5) that the digital CR differentiator is a recursive digital filter. Similarly, the relationship of analog input voltage 𝑉𝑖𝑛 and output voltage 𝑉𝑜 of the RC integrator, as shown in Fig. 3(b), satisfies the following formula:

3𝑃2 ⋅𝑉𝑜 [𝑛−1] 𝑃1

𝑃13

2⋅𝑉 [𝑛−1] 2⋅𝑉 [𝑛−3] 𝑉 [𝑛−4] 𝑉𝑖𝑛 [𝑛] + 𝑖𝑛𝑃 4 − 𝑖𝑛𝑃 4 − 𝑖𝑛 𝑃 4 𝑃14 1 1 1 6𝑃22 ⋅𝑉𝑜 [𝑛−2] 4𝑃23 ⋅𝑉𝑜 [𝑛−3] 𝑃24 ⋅𝑉𝑜 [𝑛−4]

− 𝑉𝑜 [𝑛] =

𝑉𝑖𝑛 [𝑛−2] 𝑃12

𝑉𝑖𝑛 [𝑛] 𝑉 [𝑛−1] 𝑉 [𝑛−2] + 𝑖𝑛 𝑃 3 − 𝑖𝑛 𝑃 3 𝑃13 1 1 3𝑃22 ⋅𝑉𝑜 [𝑛−2] 𝑃23 ⋅𝑉𝑜 [𝑛−3]



3



(3)

In consideration of the digital signal 𝑉𝑖𝑛 [𝑛] and 𝑉𝑜 [𝑛], the discrete digital signal sequences obtained by the ADC real-time sample and quantize 𝑉𝑖𝑛 (𝑡) and 𝑉𝑜 (𝑡) (3) can be written as follows:

Fig. 2. Schematic of CR–RCm filter.

𝑚

𝑑𝑉𝑜 (𝑡) 𝑑𝑉𝑖𝑛 (𝑡) + 𝑉𝑜 (𝑡) = 𝑅𝐶 ⋅ 𝑑𝑡 𝑑𝑡

𝑑𝑉𝑜 (𝑡) + 𝑉𝑜 (𝑡) = 𝑉𝑖𝑛 (𝑡) 𝑑𝑡

(6)

The relationship of the digital RC integrator’s input and output signals also can be obtained as follows:

𝑃15

Here, 𝑃1 = (𝑇 + 2𝑅𝐶)∕2𝑅𝐶, 𝑃2 = (𝑇 − 2𝑅𝐶)∕2𝑅𝐶.

𝑉𝑜 [𝑛] = (1 − 𝑑) ⋅ 𝑉𝑖𝑛 [𝑛] + 𝑑 ⋅ 𝑉𝑜 [𝑛 − 1]

(7)

where 𝑑 = 𝑅𝐶∕(𝑅𝐶 + 𝑇 ) and 𝑇 is the sampling period of ADC. through (1).

( )𝑚 ⋅ (1 − 𝑧−1 ) ⋅ 1 + 𝑧−1 𝐻 (𝑧) = (( ) ( ) )𝑚+1 1 + 2𝑅𝐶 + 1 − 2𝑅𝐶 ⋅ 𝑧−1 𝑇 𝑇 2𝑅𝐶 𝑇

3.2. Transfer function and frequency response of the CR and RC filter (2) It is necessary to obtain the transfer function of digital CR and RC filters to create the realization block diagram and illustrate their frequency response. The transfer function of the digital CR filter can be deduced from (5) with the standard approach in [7] by taking z-transforms of both sides for (5) and solving the ratio.

where 𝑇 is the sampling period of ADC. Detailed algorithms, as shown in Table 1, of the digital CR–RCm shaper can be obtained through (2). However, the transfer function (2) is too complicated to realize on DSP chips, especially on FPGA chips. It is noteworthy that the shaper exhibited in Fig. 2 does not have the function of PZC. If taking the PZC into account, the transfer function will be more complicated than in (2). To solve this problem, an optimized digitalization implementation is introduced in detail in the next section.

𝑉𝑜 (𝑧) = 𝑑 ⋅ 𝑉𝑖𝑛 (z) ⋅ (1 − z−1 ) + 𝑑 ⋅ 𝑉𝑜 (z) ⋅ z−1 𝑉 (𝑧) 𝑑 ⋅ (1 − 𝑧−1 ) = 𝐻𝐶𝑅 (𝑧) = 𝑜 𝑉𝑖𝑛 (𝑧) 1 − 𝑑 ⋅ 𝑧−1

(8) (9)

Clearly, (9) is the transfer function of the digital CR filter. Thus, similarly we can obtain the transfer function of the digital RC filter as (11) from (7) in the same way.

3. 𝐂𝐑–𝐑𝐂𝐦 shaper’s digitalization As is commonly known, it is too complicated to digitize the CR–RCm filter directly. To deal with this challenge, the divide-and-conquer strategy is applied by dividing the digitalization process into three simple procedures: (a) decomposing the shaper into one CR differentiator and m RC integrators; (b) digitizing the CR differentiator and the RC integrator separately; (c) reconstructing the CR–RCm filter with a digitalized CR differentiator and RC integrator.

𝑉𝑜 (𝑧) = 𝑉𝑖𝑛 (z) ⋅ (1 − 𝑑) + 𝑑 ⋅ 𝑉𝑜 (z) ⋅ z−1 𝑉 (𝑧) 1−𝑑 𝐻𝑅𝐶 (𝑧) = 𝑜 = 𝑉𝑖𝑛 (𝑧) 1 − 𝑑 ⋅ 𝑧−1

(10) (11)

The frequency response of the digital CR and RC filter can be deduced by replacing z with ej𝜔 —a method to obtain the frequency response in [7]—in 𝐻𝐶𝑅 (𝑧) and 𝐻𝑅𝐶 (𝑧). ( ) 𝑑 ⋅ (1 − e−j𝜔 ) 𝐻𝐶𝑅 ej𝜔 = 1 − 𝑑 ⋅ e−j𝜔 ( j𝜔 ) 1−𝑑 𝐻𝑅𝐶 e = 1 − 𝑑 ⋅ e−j𝜔

3.1. Digitalization of CR and RC filter From the circuit depicted in Fig. 3(a), the input voltage 𝑉𝑖𝑛 and output voltage 𝑉𝑜 of CR differentiator is related by the following 2

(12) (13)

Y. Liu et al.

Nuclear Inst. and Methods in Physics Research, A 906 (2018) 1–9

Reorganize (21) as follows: 𝑉𝑜 [𝑛] = 𝑀 ⋅ 𝑉𝑖𝑛 [𝑛] − 𝑁 ⋅ (𝑉𝑖𝑛 [𝑛 − 1] − 𝑉𝑜 [𝑛 − 1]) 𝑘𝑅𝐶 + 𝑇 (22) 𝑘𝑅𝐶 + 𝑘𝑇 + 𝑇 𝑘𝑅𝐶 𝑁 = 𝑘𝑅𝐶 + 𝑘𝑇 + 𝑇 Replacing 𝑅𝐶∕𝑇 with 𝑑∕(1 − 𝑑), which can be easily obtained from Section 3.1, (22) can be rewritten as follows: 𝑀 =

𝑉𝑜 [𝑛] = 𝐴 ⋅ 𝑉𝑖𝑛 [𝑛] − 𝐵 ⋅ (𝑉𝑖𝑛 [𝑛 − 1] − 𝑉𝑜 [𝑛 − 1])

Fig. 4. Schematic of CR circuit with PZC.

𝑘𝑑 + 1 − 𝑑 𝑘+1−𝑑 𝑘𝑑 𝐵 = 𝑘+1−𝑑 Taking 𝑧-transforms for both sides of (23): ( ) 𝑉𝑜 (𝑧) = 𝑉𝑖𝑛 (𝑧) ⋅ 𝐴 − 𝐵 ⋅ 𝑧−1 + 𝐵 ⋅ 𝑉𝑜 (𝑧) ⋅ 𝑧−1 𝐴 =

where 𝜔 = 2𝜋𝑓 ∕𝑓𝑠 is the angular frequency, 𝑓𝑠 = 1∕𝑇 is the sample rate of ADC, and 𝑓 is the frequency of the filter’s input signal. The frequency responses of (12) and (13) are valid, because those filters’ region of convergence, |𝑧| > 𝑑 and 𝑑 < 1, contain the unit circle. Those filters, therefore, are stable. The magnitude response of the digital CR and RC filter can be obtained as (15) and (16) with the identity shown in (14), which is valid for any real-valued 𝑎. √ | | (14) |1 − 𝑎 ⋅ ej𝜔 | = 1 − 2𝑎 ⋅ cos 𝜔2 + 𝑎2 | | √ ( )| 𝑑 ⋅ 2 − 2 cos 𝜔2 | (15) |𝐻𝐶𝑅 ej𝜔 | = √ | | 1 − 2𝑑 ⋅ cos 𝜔2 + 𝑑 2 ( )| 1−𝑑 | (16) |𝐻𝑅𝐶 ej𝜔 | = √ | | 1 − 2𝑑 ⋅ cos 𝜔2 + 𝑑 2 3.3. Digital

𝐶𝑅 − 𝑅𝐶 𝒎

𝐻𝐶𝑅𝑃 𝑍𝐶 (𝑧) =

𝐻 (𝑧) =

𝑑

(1 − 𝑑 ⋅ 𝑧−1 )𝑚+1 ( j𝜔 ) 𝑑 ⋅ (1 − 𝑑)𝑚 ⋅ (1 − e−j𝜔 ) 𝐻 e = (1 − 𝑑 ⋅ e−j𝜔 )𝑚+1 √ 𝑑 ⋅ (1 − 𝑑)𝑚 ⋅ 2 − 2 cos 𝜔2 | ( j𝜔 )| |𝐻 e | = (√ )𝑚+1 | | 1 − 2𝑑 ⋅ cos 𝜔2 + 𝑑 2

𝑉𝑝𝑟𝑒 (𝑡) = 𝑉𝑚 ⋅ e−𝑡∕𝜏

𝑉𝑝𝑟𝑒 (𝑧) =

(26)

𝑉𝑚 1 − 𝑑1 ⋅ 𝑧−1

(27)

where 𝑑1 = e−𝑇 ∕𝜏 , and 𝑇 is the sampling and quantizing period of ADC. Thus, 𝑘 can be calculated by the following equation:

(17) (18)

𝑘= (19)

𝑑1 1−𝑑 𝜏 = ⋅ 𝑅𝐶 1 − 𝑑1 𝑑

(28)

The transfer function of the digital CR–RCm filter with PZC can be obtained as in (29) by replacing (9) with (25) in the transfer function of (17). ( )𝑚 1−𝑑 𝐴 − 𝐵 ⋅ 𝑧−1 𝐻 (𝑧) = ⋅ (29) 1 − 𝐵 ⋅ 𝑧−1 1 − 𝑑 ⋅ 𝑧−1 The frequency response 𝐻(ej𝜔 ) also can be obtained as follows: ( )𝑚 ( ) 𝐴 − 𝐵 ⋅ e−j𝜔 1−𝑑 𝐻 ej𝜔 = ⋅ (30) 1 − 𝐵 ⋅ e−j𝜔 1 − 𝑑 ⋅ e−j𝜔 √ (1 − 𝑑)𝑚 ⋅ 𝐴2 + 2𝐴𝐵 ⋅ cos 𝜔2 + 𝐵 2 | ( j𝜔 )| (31) |𝐻 e | = (√ )𝑚 √ | | 1 − 2𝑑 ⋅ cos 𝜔2 + 𝑑 2 ⋅ 1 + 2𝐵 ⋅ cos 𝜔2 + 𝐵 2

3.4. Pole-zero cancellation A PZC circuit, as shown in Fig. 4, is implemented in [8] to solve the problem of the undershoot of the CR–RCm shaping filter. The output and input signals of this circuit can be related by following equation:

As shown in Table 2, detailed algorithms of improved digital CRPZC − RCm shapers,CR–RCm shapers with PZC, can be obtained through (29). It can be concluded from Tables 1 and 2 that the digital CRPZC − RCm shaper proposed in this paper is much simpler than the shaper obtained through bilinear transformation. And the proposed shaper is also simpler than the shaper introduced in [5]. The frequency response, as shown in Fig. 5, of the filters mentioned above can be plotted in MATLAB according to (15), (16), (19) and (31). It can be observed from Fig. 5 that the digital CR–RCm filter is a low-pass filter. The upper cut-off frequency decreases with the increase of the filter’s shaping time and order. As the filter’s order increases, the filter’s performance in high-frequency noise suppression is significantly

(20)

The relationship of the input and output signals of the digital CR differentiator with a PZC function can be obtained as (21), with a method similar to that proposed in Section 3.1. 𝑉𝑜 [𝑛] 𝑉 [𝑛] 𝑉𝑜 [𝑛] 𝑉 [𝑛] − 𝑉𝑖𝑛 [𝑛 − 1] = 𝑖𝑛 + + 𝐶 ⋅ 𝑖𝑛 𝑉𝑖𝑛 [𝑛] 𝑘⋅𝑅 𝑘⋅𝑅 𝑇 𝑉 [𝑛] − 𝑉𝑜 [𝑛 − 1] −𝐶 ⋅ 𝑜 𝑇

(25)

Obviously, 𝜏 is the decay time constant of the output signal of preamplifier. 𝑉𝑚 is the amplitude of 𝑉𝑝𝑟𝑒 . The value of 𝑘 should be 𝜏∕RC to completely cancel the undershoot of the pulse [2]. The mathematical model of exponential decay signal in the 𝑧-domain (27) can be obtained by taking 𝑧-transforms for both sides of digital signal 𝑉𝑝𝑟𝑒 [𝑛], which is obtained by sampling and quantizing (26).

All characteristics of the digital CR–RCm shaper are described by the three formulas provided above. However, this digital shaper has a rather obvious drawback that a pulse undershoot will appear at the output of the shaper [2]. This shortcoming is not conducive to pile-up reject processing. As a result, a PZC function must be introduced into this shaper.

𝑉𝑜 (𝑡) 𝑉 (𝑡) 𝑉𝑜 (𝑡) 𝑑𝑉𝑖𝑛 (𝑡) 𝑑𝑉𝑜 (𝑡) = 𝑖𝑛 − +𝐶 ⋅ −𝐶 ⋅ 𝑅 𝑘⋅𝑅 𝑘⋅𝑅 𝑑𝑡 𝑑𝑡

𝑉𝑜 (𝑧) 𝐴 − 𝐵 ⋅ 𝑧−1 = 𝑉𝑖𝑛 (𝑧) 1 − 𝐵 ⋅ 𝑧−1

Eq. (25) is the transfer function of the digital CR filter with PZC. It is assumed that the output signal of the preamplifier is an exponential decay signal, for which the mathematical model is presented in (26).

filter

⋅ (1 − 𝑧−1 )

(24)

And solving the ratio for (24):

As mentioned at the beginning of Section 2, the digital CR–RCm shaping filter can be constructed with the digital CR differentiator and RC integrator. So the transfer function 𝐻(𝑧), frequency response 𝐻(ej𝜔 ), ( ) and magnitude response |𝐻 ej𝜔 | of the digital CR–RCm shaper can be easily obtained as follows: ⋅ (1 − 𝑑)𝑚

(23)

(21)

3

Y. Liu et al.

Nuclear Inst. and Methods in Physics Research, A 906 (2018) 1–9

Fig. 5. (a) Frequency response of digital CR, RC, and CRPZC filters. (b) Frequency response of digital CR–RCm and CRPZC − RCm filters with different orders, where 𝑑 = 0.90. (c) Frequency response of digital CRPZC − RCm filters with different orders and shaping times. Table 2 Algorithm details obtained through (29) of CRPZC − RCm shapers for orders 1–4. 𝑚

Algorithm details

1

𝑉𝑜 [𝑛] = 𝐴 (1 − 𝑑) ⋅ 𝑉𝑖𝑛 [𝑛] − 𝐵 (1 − 𝑑) ⋅ 𝑉𝑖𝑛 [𝑛 − 1] + (𝑑 + 𝐵) ⋅ 𝑉𝑜 [𝑛 − 1] − 𝐵𝑑 ⋅ 𝑉𝑜 [𝑛 − 2]

2

𝑉𝑜 [𝑛] = 𝐴 (1 − 𝑑)2 ⋅ 𝑉𝑖𝑛 [𝑛] − 𝐵 (1 − 𝑑)2 ⋅ 𝑉𝑖𝑛 [𝑛 − 1] ( ) + (2𝑑 + 𝐵) ⋅ 𝑉𝑜 [𝑛 − 1] − 𝑑 2 − 2𝑑𝐵 ⋅ 𝑉𝑜 [𝑛 − 2] +𝐵𝑑 2 ⋅ 𝑉𝑜 [𝑛 − 3]

3

𝑉𝑜 [𝑛] = 𝐴 (1 − 𝑑)3 ⋅ 𝑉𝑖𝑛 [𝑛] − 𝐵 (1 − 𝑑)3 ⋅ 𝑉𝑖𝑛 [𝑛 − 1] + (3𝑑 + 𝐵) ⋅ 𝑉𝑜 [𝑛 − 1] − 3𝑑 (𝐵 + 𝑑) ⋅ 𝑉𝑜 [𝑛 − 2] + (3𝐵 + 𝑑) 𝑑 2 ⋅ 𝑉𝑜 [𝑛 − 3] − 𝐵𝑑 3 ⋅ 𝑉𝑜 [𝑛 − 4]

4

𝑉𝑜 [𝑛] = 𝐴 (1 − 𝑑)4 ⋅ 𝑉𝑖𝑛 [𝑛] − 𝐵 (1 − 𝑑)4 ⋅ 𝑉𝑖𝑛 [𝑛 − 1] + (4𝑑 + 𝐵) ⋅ 𝑉𝑜 [𝑛 − 1] − 2𝑑 (𝐵 + 3𝑑) ⋅ 𝑉𝑜 [𝑛 − 2] +2𝑑 2 (3𝐵 + 2𝑑) ⋅ 𝑉𝑜 [𝑛 − 3] −𝑑 3 (4𝐵 + 𝑑) ⋅ 𝑉𝑜 [𝑛 − 4] + 𝐵𝑑 4 ⋅ 𝑉𝑜 [𝑛 − 5]

improved. When the shaping time remains the same, there is not much difference in frequency response between the CR–RCm shaper and CRPZC − RCm shaper.

Fig. 6. Simulation of different digital CR–RCm and CRPZC –RCm shapers’ process preamplifier output signals. Here, 𝑅𝐶 = 0.5 μs, 𝑇 = 10 nS, and the decay time constant of the preamplifier is 2 μs. The preamplifier’s output signal, which is similar to that in Fig. 6(a) in [9], is an exponential decay signal of 1000 mV.

4. Simulation 4.1. Shaping simulation

This digital CRPZC –RCm shaper also has the same relationship between the peaking time and the filter’s parameters. The results shown in Fig. 7 illustrate that the width of CRPZC –RCm shapers’ output signal decreases as the shapers’ order 𝑚 increases, when the peaking time of shaper remains the same.

It is necessary to explore the shaping performance of the digital CR–RCm and CRPZC − RCm shapers proposed in Section 3. For this purpose, digital shapers with different orders are realized in MATLAB. Then, the simulated output signal of the preamplifier, which is usually an exponential decay signal [9], is processed with those shapers in MATLAB. The shaping simulation results are shown in Fig. 6. The simulation results in Fig. 6 reveal that the digital CRPZC –RCm shaper eliminates the undershoot, which is not conducive to the pile-up process, of the digital CR–RCm shaper’s output. The amplitude of the output decreases as the shaper’s order increases, and the rising time of the shaper’s output signal increases with the shaper’s order. The difference between the amplitude and rise time of the output pulse of shapers with adjacent orders decreases as the shaper’s order increases. Note that, as is proposed in [5], the peaking time of a CR–RCm filter is equal to the product of the filter’s order 𝑚 and the time constant RC.

4.2. Ballistic deficit and pile-up The phenomenon of fluctuation appearing in rising time and the amplitude occurring in the output of the pre-amplifier caused by fluctuations in the charge collection time, called the ballistic deficit [10], demonstrates that the structure of multiple shapers is very tolerant to ballistic deficit [9,10]; the CRPZC –RCm shaper is one of these. Two groups of simulation experiments, which simulate the outputs of different CRPZC –RCm shaping filters with two different signals as the shapers’ input, are conducted to find the CRPZC –RCm shapers’ immunity 4

Y. Liu et al.

Nuclear Inst. and Methods in Physics Research, A 906 (2018) 1–9 Table 3 Simulation results of immunity to ballistic deficit of shapers with different shaping times. 𝑅𝐶 = 0.2 μs

Preamplifier Out CRPZC − RC1 Out CRPZC − RC2 Out CRPZC − RC3 Out CRPZC − RC4 Out

𝑅𝐶 = 0.5 μs

𝐴𝑚𝑝1

𝐴𝑚𝑝2

𝐿𝑜𝑠𝑠

𝐴𝑚𝑝1

𝐴𝑚𝑝2

𝐿𝑜𝑠𝑠

995.01 mV 341.56 mV 247.42 mV 203.21 mV 176.39 mV

696.83 mV 225.11 mV 184.49 mV 159.93 mV 143.08 mV

29.97% 34.09% 25.44% 21.30% 18.88%

995.01 mV 324.00 mV 229.45 mV 186.45 mV 160.86 mV

696.83 mV 262.88 mV 197.08 mV 163.10 mV 141.92 mV

29.97% 18.87% 14.11% 12.52% 11.77%

Table 4 Simulation results of immunity to ballistic deficit of shapers with different peaking times.

Preamplifier Out CRPZC − RC1 Out CRPZC − RC2 Out CRPZC − RC3 Out CRPZC − RC4 Out Fig. 7. Output signals, which have the same peaking time of 0.5 μs, of different CRPZC –RCm shaping filters.

𝑃 𝑒𝑎𝑘𝑖𝑛𝑔𝑇 𝑖𝑚𝑒 = 0.2 μs 𝐴𝑚𝑝1 𝐴𝑚𝑝2

𝐿𝑜𝑠𝑠

𝑃 𝑒𝑎𝑘𝑖𝑛𝑔𝑇 𝑖𝑚𝑒 = 0.5 μs 𝐴𝑚𝑝1 𝐴𝑚𝑝2

𝐿𝑜𝑠𝑠

995.01 mV 341.56 mV 249.58 mV 203.68 mV 174.71 mV

29.97% 34.09% 39.84% 43.58% 46.28%

995.01 mV 324.00 mV 244.76 mV 204.62 mV 178.93 mV

29.97% 18.87% 21.75% 24.23% 26.30%

696.83 mV 255.11 mV 150.14 mV 114.91 mV 93.84 mV

696.83 mV 262.88 mV 191.52 mV 155.05 mV 131.87 mV

The simulation results are shown in Table 3, Table 4, Figs. 8 and 9. 𝐴𝑚𝑝1 represents the amplitude of Signal 1 and the output of CRPZC –RCm shapers with Signal 1 as input. 𝐴𝑚𝑝2 is the amplitude of the output of CRPZC –RCm shapers with Signal 2 as input. And 𝐿𝑜𝑠𝑠 = (𝐴𝑚𝑝1 − 𝐴𝑚𝑝2 )∕𝐴𝑚𝑝1 is the amplitude loss caused by the fluctuations in rising time. It can be concluded from the simulation results that amplitude loss is reduced by the CRPZC −RCm shaper with the proper order and shaping or

to ballistic deficit. One input, Signal 1, is a preamplifier output with 0 ns rising time. Another input, Signal 2, is a preamplifier output with 200 ns rising time. The immunity to ballistic deficit of the shaper with different shaping times and peak times was simulated in experiment Groups 1 and 2.

Fig. 8. (a) Simulated output of CRPZC − RCm shaper with 𝑅𝐶 = 0.2 μs; (b) simulated output of CRPZC − RCm shaper with 𝑅𝐶 = 0.5 μs.

Fig. 9. (a) Output of CRPZC − RCm shaper with 𝑃 𝑒𝑎𝑘𝑖𝑛𝑔𝑇 𝑖𝑚𝑒 = 0.2 μs; (b) output of CRPZC − RCm shaper with 𝑃 𝑒𝑎𝑘𝑖𝑛𝑔𝑇 𝑖𝑚𝑒 = 0.5 μs.

5

Y. Liu et al.

Nuclear Inst. and Methods in Physics Research, A 906 (2018) 1–9

Fig. 10. Performance of the CRPZC − RC𝑚 shaper against different sources of noise.

Fig. 12. Improved implementation block diagram of the digital CRPZC − RCm shaper for FPGA. Here, ‘M’ in a triangle represents a multiplier with one clock latency of FPGA [15], ‘P’ in a triangle is a pipelined multiplier as in [16].

Fig. 11. Block diagram of digital CR–RCm shaping filter.

peaking time. Additionally, the loss decreases as the shapers’ order and shaping time increase. And the loss gap among shapers with different orders decreases as the shaping time increases. With the same peaking time, maximum resistivity to ballistic deficit effect is achieved with the CRPZC −RC shaper; this is because the CRPZC −RC shaper has a maximum curvature [10–12]. These results demonstrate that the CRPZC − RCm shaper has excellent immunity to ballistic deficit. Results shown in Figs. 8 and 9 also reveal that, with the proper order and d, the width of the output of the CRPZC − RCm shaper can be effectively narrowed. This reduces the probability of pile-up.

Table 5 Resource utilization of CRPZC − RCm filter with different orders in XC6SLX100T FPGA. m

Slice registers

Slice LUTs

MUXCYs

1 2 3 4

1776 2347 2918 3489

2125 2892 3661 4448

1744 2412 3080 3748

5.1. Block diagram of the 𝐶𝑅 − 𝑅𝐶 𝑚 filter Through the transfer function (29), a block diagram of the digital CRPZC − RCm shaper can be easily obtained, as in Fig. 11. The digital CRPZC − RCm shaper can be directly realized on varieties of DSP platforms with Fig. 11 as a guide. However, it is not recommended that the digital CRPZC −RCm shaper be realized directly in FPGA, especially for Altera’s FPGA, with the diagram shown in Fig. 11, for the following reasons. (I) The stability of the multiplier without clock latency in FPGA is not guaranteed, especially in high-speed operation mode. (II) The implementation shown in Fig. 11 consumes a large amount of DSP multipliers of FPGA, and this is especially expensive for Altera’s Cyclone FPGA.

4.3. Noise performance Since the signal-to-noise ratio of the shaper’s output is an important performance indicator of the shaper [13], for the sake of assessing the shaper’s noise suppression ability, a MATLAB program with mathematical models from [14] is designed to generate pure series noise, 1/f noise and parallel noise, which are added to a noiseless pulse. As a result, 10,000 noisy pulses are produced for each type of noise. The noisy pulses are processed by the digital CRPZC − RCm shaper with different parameters, and the full width at half maximum (FWHM) of the pulse height spectra is calculated. The simulation results are shown in Fig. 10. It can be easily concluded from Fig. 10 that the performance of shapers against series noise and 1/f noise improves as the shapers’ order increases. The shapers’ performance against parallel noise decreases rapidly as the shapers’ order and shaping time increases. The shaper’s shaping time has virtually no effect on the shaper’s performance against 1/f noise.

5.2. Schematic for FPGA implementation As shown in Fig. 12, according to the character of the multiplier and adder of FPGA, a novel implementation is proposed to eliminate the abovementioned shortcomings. With the implementation shown in Fig. 12, the digital CRPZC − RCm shaper consumes only 𝑚 + 1 DSP multipliers in Altera’s Cyclone FPGA. For the Xilinx Spartan-6 FPGA chip (XC6SLX100T), the resource utilization of digital CRPZC − RCm shapers with different orders is shown in Table 5. With this novel implementation, a balance between the digital shaper’s performance in maximum operating clock frequency and the consumption of logic and DSP resources of FPGA can be achieved.

5. Implementation guide Realizing the digital CRPZC − RCm shaper on varieties of DSP platforms is of great significance for the shaper’s engineering application. 6

Y. Liu et al.

Nuclear Inst. and Methods in Physics Research, A 906 (2018) 1–9 Table 6 Specification parameters of detectors used in experiments. Detector

Crystal diameter (mm)

Crystal height (mm)

CH280 SG1122 BE3830

50 38 70

50 38 30

requirements of ADC input. The anti-aliasing filter is a passive lowpass filter, and ADA4938 is a single-ended to differential amplifier with adjustable gain of ADI. Then, an ADI 16-bit ADC chip (AD9268) with a 125MSPS sample rate is used to sample and quantize the analog signal from Adapter Circuit. Finally, a Xilinx Spartan-6 FPGA (XC6SLX100T) is applied to perform all DSP operations. During shaping and peak detection, a narrowing shaper, usually a CRPZC shaper, is used to shape the input signal into a narrow pulse. Then, the time interval between adjacent signals is obtained by the Timing module. Finally, a pile-up rejecter is used to handle pile-up events according to the time interval. Baseline correction is conducted in the Peak Detection module. The meantime baseline value can be obtained with 𝑁 (in this paper, N=8) points before the pulse. Then the corrected amplitude value can be obtained with the un-corrected peak value minus baseline value. Furthermore, edge triggering is used in this digital system to replace over-threshold triggering in the Peak Detection module.

Fig. 13. Digital spectroscopy detection board (DSDB).

6.2. Experiments of digital system performance testing A series of experiments are performed with the setup shown in Fig. 14 to assess the digital CRPZC −RCm shapers’ performance in energy resolution improvement. As listed in Table 6, three different detectors, the NaI (TI) detector (CH280) from Hamamatsu, LaBr3 detector (SG1122) from CNN Beijing Nuclear Instrument Factory, and HighPurity Germanium Detector (BE3830) from CANBERRA, are utilized for experiments. As shown in Figs. 15–17, the resolution of 137 Cs and 60 Co of all experiments is computed and compared. A conclusion can be drawn from the results shown in Figs. 15 and 16 that the best performance for the scintillator detector is achieved with the CRPZC − RC4 shaper. This is because the CRPZC − RC4 shaper has the best immunity to ballistic deficit. Moreover, the performance of the shaper improves as the shaping time increases, and the performance gap between shapers with different orders decreases. This is consistent with the experimental results in Section 4.2. The experimental results shown in Fig. 17 reveal that as the shaping time increases, the energy resolution of the semiconductor detector first increases and then decreases. The performance of shapers against series

Fig. 14. Block diagram of signal processing of this digital system.

6. Experiments 6.1. Digital spectroscopy system As shown in Fig. 13, a compact digital spectroscopy detection system is designed with the guide shown in Fig. 1. In this system, Adapter Circuit, ADC and DSP are integrated on a printed circuit board (PCB), the size of which is 120 mm × 80 mm. As depicted in Fig. 14, the detector’s output signal is first processed by adapter circuit to fulfill the Nyquist criteria and meet the

Fig. 15. Resolution of 137 Cs (left) and 60 Co (center and right) lines measured by CH280 detector and processed by digital CRPZC − RCm shapers with different orders and shaping times. Here, 420 V high voltage power was supplied.

7

Y. Liu et al.

Nuclear Inst. and Methods in Physics Research, A 906 (2018) 1–9

Fig. 16. Resolution of 137 Cs (left) and 60 Co (center and right) lines measured by the SG1122 detector and processed by digital CRPZC − RCm shapers with different orders and shaping times. Here, 360 V high voltage power was supplied.

Fig. 17. Resolution of 137 Cs (left) and 60 Co (center and right) lines measured by the BE3830 detector and processed by digital CRPZC − RCm shapers with different orders and shaping times. Here, 5010 V high voltage power was supplied. Table 7 Resolution results of comparative experiments. Here, the shaping time of the two systems is 1.0 μs.

Fig. 18. Schematic block diagram of comparative experiments. Block diagram (a) is the setup of the digital spectroscopy system with DPSB. Block diagram (b) is the setup of the conventional spectroscopy system from CANBERRA with Amplifier 2026 and Multiport II.

Energy (keV)

FWHM (keV) of analog system shown in Fig. 17 (b)

FWHM (keV) of digital system shown in Fig. 17 (a)

661.7 1173.2 1332.5

2.780 ± 0.090 3.752 ± 0.098 4.130 ± 0.086

2.646 ± 0.080 2.933 ± 0.078 3.065 ± 0.069

in Section 6.1 and the conventional analog system shown in Fig. 18(b). The experimental results are shown in Table 7. In contrast with Adapter Circuits in DSDB, Amplifier 2026, which is responsible for the detector output signal’s amplification, shaping and PZC, is an analog amplifier with an analog shaper. Multiport II is a highanalog-performance, low-cost multichannel analyzer, which is used to combine Amplifier 2026 and PC [17]. As per the results shown in Table 7, the digital system obtains the same excellent performance as the referenced conventional spectroscopy system from CANBERRA.

noise increases with shaping time and order; however, the performance of shapers against parallel noise degrades with increasing shaping time and order. Meanwhile, the CRPZC −RC4 shaper has the best performance when the shaping time is short and the worst performance when the shaping time is long. These results are in line with the experimental results in Section Section 4.2. All the experimental results shown in Figs. 15–17 reveal that the semiconductor detector requires a shaper with better noise suppression performance, while the scintillation detector requires a shaper with better immunity to ballistic deficit.

7. Conclusions In this study, a novel implementation of the digital CR–RCm shaper is presented. The optimized digital CR–RCm shaper has a simple structure and is easy to realize on DSP chips, and it consumes fewer multipliers than the conventional digital CR–RCm shaper. More importantly, this digital shaper also overcomes the shortcoming of the conventional

6.3. Comparative experiments As shown in Fig. 18, a group of comparative experiments is conducted to test the performance gap between the digital system designed 8

Y. Liu et al.

Nuclear Inst. and Methods in Physics Research, A 906 (2018) 1–9

digital CR–RCm shaper, which lacks the function of PZC. Furthermore, this digital shaper produces less clock latency than the trapezoidal shaper and has a higher speed on computer. A series of experiments are performed to assess the performance in noise suppression and resolution improvement with different shaping times and orders. The experimental results show that the digital system with the optimized digital shaper achieves slightly better performance than the conventional spectroscopy system from CANBERRA. Above all, the proposed digital system with this digital shaper has immense potential to replace the conventional system with further optimization. The digitization methods for analog circuits presented in this paper can be a reference for the digitization of other complex analog circuits.

[4] C.H. Zeng, et al., Application of the Gaussian Shaping Filter Technique on SoPC, in: Applied Mechanics and Materials, vol. 416, Trans Tech Publications, 2013. [5] M. Nakhostin, Recursive algorithms for real-time digital CR − (RC)n pulse shaping, IEEE Trans. Nucl. Sci. 58 (5) (2011) 2378–2381. [6] S.J. Orfanidis, Introduction to Signal Processing, Prentice-Hall, Inc., 1995. [7] Rowell, D. 2.161 signal processing: continuous and discrete, fall 2008. (2008). [8] C.H. Nowlin, J.L. Blankenship, Elimination of undesirable undershoot in the operation and testing of nuclear pulse amplifiers, Rev. Sci. Instrum. 36 (12) (1965) 1830–1839. [9] V.T. Jordanov, G.F. Knoll, Digital synthesis of pulse shapes in real time for high resolution radiation spectroscopy, Nucl. Instrum. Methods Phys. Res. A 345 (2) (1994) 337–345. [10] L. Fabris, et al., Simultaneous ballistic deficit immunity and resilience to parallel noise sources: A new pulse shaping technique, IEEE Trans. Nucl. Sci. 48 (3) (2001) 450–454. [11] E. Fairstein, Linear unipolar pulse-shaping networks; Current technology, IEEE Trans. Nucl. Sci. 37 (2) (1990) 382–397. [12] B.W. Loo, F.S. Goulding, D. Gao, Ballistic deficits in pulse shaping amplifiers, IEEE Trans. Nucl. Sci. 35 (1) (1987) 114–118. [13] F.S. Goulding, Pulse-shaping in low-noise nuclear amplifiers: A physical approach to noise analysis, Nucl. Instrum. Methods 100 (3) (1972) 493–504. [14] A. Pullia, S. Riboldi, Time-domain simulation of electronic noises, IEEE Trans. Nucl. Sci. 51 (4) (2004) 1817–1823. [15] https://www.altera.com/en_US/pdfs/literature/an/an306.pdf. [16] M.A. Ashour, H.I. Saleh, An fpga implementation guide for some different types of serial–parallel multiplier structures, Microelectron. J. 31 (3) (2000) 161–168. [17] http://www.canberra.com/products/radiochemistry_lab/pdf/Multiport-II-SSC10142.pdf.

Acknowledgments This work was supported by funding from the National Natural Science Foundation of China (No. 11205108 and No. 11475121) and the Excellent Youth Fund of Sichuan University, China (No. 2016SCU04A13). References [1] A. Regadío, et al., Implementation of a real-time adaptive digital shaping for nuclear spectroscopy, Nucl. Instrum. Methods Phys. Res. 735 (1) (2014) 297–303. [2] G.F. Knoll, Radiation Detection and Measurement, John Wiley & Sons, 2010. [3] G. Garcia-Belmonte, et al., Digital implementation of filters for nuclear applications using the discrete wavelet transform, Nucl. Instrum. Methods Phys. Res. A 380 (1–2) (1996) 376–380.

9