Top Banner
Digital Filters in Radiation Detection and Spectroscopy NE/RHP 537, Spring 2012 Digital Radiation Measurement and Spectroscopy, Oregon State University, Abi Farsoni
22

Digital Filters in Radiation Detection and Spectroscopyweb.engr.oregonstate.edu/~tavakola/Lab_Works/L2_Filters.pdf · Moving Average Filter: Noise Reduction • Consider a digital

Aug 23, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Digital Filters in Radiation Detection and Spectroscopyweb.engr.oregonstate.edu/~tavakola/Lab_Works/L2_Filters.pdf · Moving Average Filter: Noise Reduction • Consider a digital

Digital Filters in Radiation Detection and Spectroscopy

NE/RHP 537, Spring 2012

Digital Radiation Measurement and Spectroscopy, Oregon State University, Abi Farsoni

Page 2: Digital Filters in Radiation Detection and Spectroscopyweb.engr.oregonstate.edu/~tavakola/Lab_Works/L2_Filters.pdf · Moving Average Filter: Noise Reduction • Consider a digital

Detector PreamplifierHigh-Speed

ADCHistogram Memory

Digital Pulse Processing

•Digital Spectrometer

Detector PreamplifierAnalog Shaping

AmplifierMultichannel

AnalyzerHistogram Memory

•Classical Spectrometer

Classical and Digital Spectrometers

Page 3: Digital Filters in Radiation Detection and Spectroscopyweb.engr.oregonstate.edu/~tavakola/Lab_Works/L2_Filters.pdf · Moving Average Filter: Noise Reduction • Consider a digital

A NaI

Integrating Preamp

PMT

Rf Cf

2

Anode output

Preamp output

1 Scintillation Detector

Vmax

Page 4: Digital Filters in Radiation Detection and Spectroscopyweb.engr.oregonstate.edu/~tavakola/Lab_Works/L2_Filters.pdf · Moving Average Filter: Noise Reduction • Consider a digital
Page 5: Digital Filters in Radiation Detection and Spectroscopyweb.engr.oregonstate.edu/~tavakola/Lab_Works/L2_Filters.pdf · Moving Average Filter: Noise Reduction • Consider a digital

Digital Radiation Measurement and Spectroscopy, Oregon State University, Abi Farsoni

Trigger

Control Unit

Threshold

Trigger

Start/Stop

Memory Update

Energy Measurement

Histogram Memory

ADC Detector

FPGA How to implement Trigger functionality or energy measurements?

Page 6: Digital Filters in Radiation Detection and Spectroscopyweb.engr.oregonstate.edu/~tavakola/Lab_Works/L2_Filters.pdf · Moving Average Filter: Noise Reduction • Consider a digital

Digital Radiation Measurement and Spectroscopy, Oregon State University, Abi Farsoni

convolution x[n] y[n]

• For FIR digital filters, the input-output relation involves a finite sum of products

• Convolution operation defines how the input signal is related to the output signal

h[n]

Digital Filters: Finite Impulse Response (FIR) Convolution Operation

Page 7: Digital Filters in Radiation Detection and Spectroscopyweb.engr.oregonstate.edu/~tavakola/Lab_Works/L2_Filters.pdf · Moving Average Filter: Noise Reduction • Consider a digital

Digital Radiation Measurement and Spectroscopy, Oregon State University, Abi Farsoni

• x[n] is the input signal

• y[n] is the output signal

• h[n] is impulse response (filter coefficients)

• n is the sample number

• N+1 is the filter size

0[ ] [ ] . [ ]

N

ky n h k x n k

=

= −∑

[ ] [0]. [ ] [1]. [ 1] ... [ ]. [ ]y n h x n h x n h N x n N= + − + + −

Digital Filters: Finite Impulse Response (FIR) Convolution Operation (Sum of Products)

Page 8: Digital Filters in Radiation Detection and Spectroscopyweb.engr.oregonstate.edu/~tavakola/Lab_Works/L2_Filters.pdf · Moving Average Filter: Noise Reduction • Consider a digital

Digital Radiation Measurement and Spectroscopy, Oregon State University, Abi Farsoni

[4] [0]. [4] [1]. [3] [2]. [2] [3]. [1]y h x h x h x h x= + + +

x[0] x[1] x[2] x[3] x[4] x[5] x[6] x[7] x[8] x[9]

h[3] h[2] h[1] h[0]

4

x[0] x[1] x[2] x[3] x[4] x[5] x[6] x[7] x[8] x[9]

h[3] h[2] h[1] h[0]

5

[6] [0]. [6] [1]. [5] [2]. [4] [3]. [3]y h x h x h x h x= + + +

x[0] x[1] x[2] x[3] x[4] x[5] x[6] x[7] x[8] x[9]

h[3] h[2] h[1] h[0]

6

[5] [0]. [5] [1]. [4] [2]. [3] [3]. [2]y h x h x h x h x= + + +

... ...

...

Digital Filters: Finite Impulse Response (FIR) Convolution Operation

Clock #

Filter Output:

Filter Output:

Filter Output:

Page 9: Digital Filters in Radiation Detection and Spectroscopyweb.engr.oregonstate.edu/~tavakola/Lab_Works/L2_Filters.pdf · Moving Average Filter: Noise Reduction • Consider a digital

Reg Reg Reg x[n-1] x[n-2] x[n-3]

x[n]

y[n]

Digital Filters (FIR), Realization

h[0] h[1] h[2] h[3]

[ ] [0]. [ ] [1]. [ 1] [2]. [ 2] [3]. [ 3]y n h x n h x n h x n h x n= + − + − + −

Digital Filters: Finite Impulse Response (FIR) Convolution in Hardware (Realization)

Page 10: Digital Filters in Radiation Detection and Spectroscopyweb.engr.oregonstate.edu/~tavakola/Lab_Works/L2_Filters.pdf · Moving Average Filter: Noise Reduction • Consider a digital

Digital Radiation Measurement and Spectroscopy, Oregon State University, Abi Farsoni

Digital Filters: Finite Impulse Response (FIR) Moving Average Filter: Noise Reduction

• Consider a digital filter whose output signal y[n] is the average of the four

most recent values of the input signal x[n]:

y[n] = ¼ ( x[n] + x[n-1] + x[n-2] + x[n-3] )

• Such a filter is referred to as a Moving Average Filter and is commonly used

for noise reduction.

• The amount of noise reduction is equal to the square-root of the number of

points in the average. For example, a 100 point moving average filter

reduces the noise by a factor of 10.

Page 11: Digital Filters in Radiation Detection and Spectroscopyweb.engr.oregonstate.edu/~tavakola/Lab_Works/L2_Filters.pdf · Moving Average Filter: Noise Reduction • Consider a digital

Digital Radiation Measurement and Spectroscopy, Oregon State University, Abi Farsoni

Digital Filters: Finite Impulse Response (FIR) Moving Average Filter: Noise Reduction

Example of a moving average filter. In (a),

a rectangular pulse is buried in random

noise. In (b) and (c), this signal is filtered

with 11 and 51 point moving average

filters, respectively. As the number of

points in the filter increases, the noise

becomes lower; however, the edges

becoming less sharp.

Page 12: Digital Filters in Radiation Detection and Spectroscopyweb.engr.oregonstate.edu/~tavakola/Lab_Works/L2_Filters.pdf · Moving Average Filter: Noise Reduction • Consider a digital

Digital Radiation Measurement and Spectroscopy, Oregon State University, Abi Farsoni

Digital Filters: Finite Impulse Response (FIR) Moving Average Filter: Noise Reduction

But how to implement a Moving Average Filter? Recall the convolution operation (sum of products)

y[n] = ¼ ( x[n] + x[n-1] + x[n-2] + x[n-3] )

In this example, h[n] should be:

h = [ ¼ , ¼ , ¼ , ¼ ]

OR

h = [ 1/N , 1/N , 1/N , 1/N ] , where N is the number of coefficients in the filter

[ ] [0]. [ ] [1]. [ 1] [2]. [ 2] [3]. [ 3]y n h x n h x n h x n h x n= + − + − + −

Page 13: Digital Filters in Radiation Detection and Spectroscopyweb.engr.oregonstate.edu/~tavakola/Lab_Works/L2_Filters.pdf · Moving Average Filter: Noise Reduction • Consider a digital

Digital Radiation Measurement and Spectroscopy, Oregon State University, Abi Farsoni

Digital Filters: Finite Impulse Response (FIR) Trapezoidal Filter: Pulse Shaping (for Pre-Amp pulses

190 195 200 205 210 215 220 225 230 2350

5

10

15

20

25

h = [ .1, .1, .1, .1, .1, .1, .1, .1, .1, .1, 0, 0, 0, 0, 0, -.1, -.1, -.1, -.1, -.1, -.1, -.1, -.1, -.1, -.1 ]

Amplitude Measurement

Positive Averaging over L samples

Baseline Correction

Negative Averaging over L samples Gap

Length (L) = 10

Gap (G) = 5

Signal Input Filter Output

Peaking Time > Charge Collection Time

Page 14: Digital Filters in Radiation Detection and Spectroscopyweb.engr.oregonstate.edu/~tavakola/Lab_Works/L2_Filters.pdf · Moving Average Filter: Noise Reduction • Consider a digital

Digital Filters: Finite Impulse Response (FIR) Triangular Filter: Trigger

Triangular filter with peaking time of 25 nsec (5x5 nsec):

F1 = [ -1, -1, -1, -1, -1, 1, 1, 1, 1, 1 ]

Triangular filter with peaking time of 50 nsec (10x5 nsec):

F2 = [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, 1, 1, 1, 1 , 1, 1, 1, 1, 1]

Page 15: Digital Filters in Radiation Detection and Spectroscopyweb.engr.oregonstate.edu/~tavakola/Lab_Works/L2_Filters.pdf · Moving Average Filter: Noise Reduction • Consider a digital

Digital Radiation Measurement and Spectroscopy, Oregon State University, Abi Farsoni

Digital Filters: Finite Impulse Response (FIR) Triangular Filter: Pulse Integration (for Anode pulses)

… -1 … … 1 …

L L

For pulses with negative polarity

For pulses with positive polarity

Pulse Integration Baseline Correction

… 1 … … -1 …

Anode output

Preamp output

Integration Time = L . Sampling Period ;

(The time over which scintillator emits most of its light ~ 99% ~ 4.6 decay time)

NaI: 230 * 4.6 = 1058 nsec

•G=0 (Triangle Filter)

•Unity Coefficients (no normalization)

Page 16: Digital Filters in Radiation Detection and Spectroscopyweb.engr.oregonstate.edu/~tavakola/Lab_Works/L2_Filters.pdf · Moving Average Filter: Noise Reduction • Consider a digital

900 950 1000 1050 1100 1150 1200 1250 1300 1350 1400 1450-15

-10

-5

0

5

10

15

20

25

30

35

40

L G Energy Filter (Trapezoidal), L=100,G=20

Trigger Filter (Triangular), L=5,G=0

L

… -1/L … … 1/L … ..0..

Triggering Threshold

Time (nsec)

AD

C U

nits

Trapezoidal and Triangular Filters

Preamp Output

Filter Response

Page 17: Digital Filters in Radiation Detection and Spectroscopyweb.engr.oregonstate.edu/~tavakola/Lab_Works/L2_Filters.pdf · Moving Average Filter: Noise Reduction • Consider a digital

900 950 1000 1050 1100 1150 1200 1250 1300 1350 1400 1450-15

-10

-5

0

5

10

15

20

25

30

35

40

Time (nsec)

AD

C U

nits

V1(max)

V2 (max)

Peak value is sampled

Pile-up is OK if (t2 - t1) > L+G

t2 – t1

Trapezoidal Filters, Pile-up Inspection and Correction

Preamp Output

Filter Response

Peak value is sampled

V1(max)

V2 (max)

Page 18: Digital Filters in Radiation Detection and Spectroscopyweb.engr.oregonstate.edu/~tavakola/Lab_Works/L2_Filters.pdf · Moving Average Filter: Noise Reduction • Consider a digital

Digital Filters: Finite Impulse Response (FIR) Trapezoidal and Triangular Filter: Response to Step Function

Page 19: Digital Filters in Radiation Detection and Spectroscopyweb.engr.oregonstate.edu/~tavakola/Lab_Works/L2_Filters.pdf · Moving Average Filter: Noise Reduction • Consider a digital

Digital Radiation Measurement and Spectroscopy, Oregon State University, Abi Farsoni

Digital Filters: Finite Impulse Response (FIR) Some Convolution Practices (with pen and paper!)

0[ ] [ ] . [ ]

N

ky n h k x n k

=

= −∑

Pre-Amp Pulse: x = [1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3] Digital Filter: h = [ ½, ½, 0, 0, -½, -½ ]

Using the Convolution equation, find y[5-11].

convolution x[n] y[n]

h[n]

Page 20: Digital Filters in Radiation Detection and Spectroscopyweb.engr.oregonstate.edu/~tavakola/Lab_Works/L2_Filters.pdf · Moving Average Filter: Noise Reduction • Consider a digital

Digital Radiation Measurement and Spectroscopy, Oregon State University, Abi Farsoni

Digital Filters: Finite Impulse Response (FIR) Some Convolution Practices (with pen and paper!)

Y[5] = (h[0].x[5-0]) + (h[1].x[5-1]) + (h[2].x[5-2]) + (h[3].x[5-3]) + (h[4].x[5-4]) + (h[5].x[5-5]) Y[5] = (h[0].x[5]) + (h[1].x[4]) + (h[2].x[3]) + (h[3].x[2]) + (h[4].x[1]) + (h[5].x[0]) Y[5] = (0.5 * 1) + (0.5 * 1) + (0 * 1) + (0 * 1) + (-0.5 * 1) + (-0.5 * 1) = 0

Y[6] = (h[0].x[6-0]) + (h[1].x[6-1]) + (h[2].x[6-2]) + (h[3].x[6-3]) + (h[4].x[6-4]) + (h[5].x[6-5]) Y[6] = (h[0].x[6]) + (h[1].x[5]) + (h[2].x[4]) + (h[3].x[3]) + (h[4].x[2]) + (h[5].x[1]) Y[6] = (0.5 * 3) + (0.5 * 1) + (0 * 1) + (0 * 1) + (-0.5 * 1) + (-0.5 * 1) = 1

Y[7] = (h[0].x[7-0]) + (h[1].x[7-1]) + (h[2].x[7-2]) + (h[3].x[7-3]) + (h[4].x[7-4]) + (h[5].x[7-5]) Y[7] = (h[0].x[7]) + (h[1].x[6]) + (h[2].x[5]) + (h[3].x[4]) + (h[4].x[3]) + (h[5].x[2]) Y[7] = (0.5 * 3) + (0.5 * 3) + (0 * 1) + (0 * 1) + (-0.5 * 1) + (-0.5 * 1) = 2

Page 21: Digital Filters in Radiation Detection and Spectroscopyweb.engr.oregonstate.edu/~tavakola/Lab_Works/L2_Filters.pdf · Moving Average Filter: Noise Reduction • Consider a digital

Digital Radiation Measurement and Spectroscopy, Oregon State University, Abi Farsoni

Digital Filters: Finite Impulse Response (FIR) Some Convolution Practices (with pen and paper!)

Y[8] = (h[0].x[8-0]) + (h[1].x[8-1]) + (h[2].x[8-2]) + (h[3].x[8-3]) + (h[4].x[8-4]) + (h[5].x[8-5]) Y[8] = (h[0].x[8]) + (h[1].x[7]) + (h[2].x[6]) + (h[3].x[5]) + (h[4].x[4]) + (h[5].x[3]) Y[8] = (0.5 * 3) + (0.5 * 3) + (0 * 3) + (0 * 1) + (-0.5 * 1) + (-0.5 * 1) = 2

Y[9] = (h[0].x[9-0]) + (h[1].x[9-1]) + (h[2].x[9-2]) + (h[3].x[9-3]) + (h[4].x[9-4]) + (h[5].x[9-5]) Y[9] = (h[0].x[9]) + (h[1].x[8]) + (h[2].x[7]) + (h[3].x[6]) + (h[4].x[5]) + (h[5].x[4]) Y[9] = (0.5 * 3) + (0.5 * 3) + (0 * 3) + (0 * 3) + (-0.5 * 1) + (-0.5 * 1) = 2

Y[10] =(h[0].x[10-0]) + (h[1].x[10-1]) + (h[2].x[10-2]) + (h[3].x[10-3]) + (h[4].x[10-4]) + (h[5].x[10-5]) Y[10] = (h[0].x[10]) + (h[1].x[9]) + (h[2].x[8]) + (h[3].x[7]) + (h[4].x[6]) + (h[5].x[5]) Y[10] = (0.5 * 3) + (0.5 * 3) + (0 * 3) + (0 * 3) + (-0.5 * 3) + (-0.5 * 1) = 1

Page 22: Digital Filters in Radiation Detection and Spectroscopyweb.engr.oregonstate.edu/~tavakola/Lab_Works/L2_Filters.pdf · Moving Average Filter: Noise Reduction • Consider a digital

Digital Radiation Measurement and Spectroscopy, Oregon State University, Abi Farsoni

Digital Filters: Finite Impulse Response (FIR) Some Convolution Practices (with pen and paper!)

Y[11] =(h[0].x[11-0]) + (h[1].x[11-1]) + (h[2].x[11-2]) + (h[3].x[11-3]) + (h[4].x[11-4]) + (h[5].x[11-5]) Y[11] = (h[0].x[11]) + (h[1].x[10]) + (h[2].x[9]) + (h[3].x[8]) + (h[4].x[7]) + (h[5].x[6]) Y[11] = (0.5 * 3) + (0.5 * 3) + (0 * 3) + (0 * 3) + (-0.5 * 3) + (-0.5 * 3) = 0