# Patent

## Title
Digital pulse shaper with variable weighting function

## Abstract

A method of providing real time digital pulse shaping includes: receiving a digital pulse input signal (31); applying the digital pulse input signal to first (33, 34, 35) and second (32, 36, 37) processing channels, the first processing channel including a CONCAVE shaper (34) and the second processing channel including a CONVEX shaper (36); applying selected digital control parameters to the CONCAVE shaper (34) and the CONVEX shaper (36) to produce desired first and second weigthing functions, and superposing the first and second weighting functions to produce a desired overall weighting function.

## Background
TECHNICAL FIELD
The present invention relates to digital pulse shapers generally and, more particularly to a real time digital pulse shaper with variable weighting function.
BACKGROUND ART
Real time digital pulse shaping techniques allow synthesis of pulse shapes that have been difficult to realize using the traditional analog methods. Using real time digital shapers, triangular/trapezoidal filters can be synthesized in real time, as described in V. T. Jordanov et al., Nucl. Instr. and Meth., A353, pg. 261 (1994), or in quasi real time, as described in G. Ripamonti et al., Nucl. Instr. and Meth., A340, pg. 584 (1994). These filters exhibit digital control on the rise time, fall time, and flattop of the trapezoidal shape. Thus, the trapezoidal shape can be adjusted for optimum performance at different distributions of the series and parallel noise.
The trapezoidal weighting function (WF) represents the optimum time-limited pulse shape when only parallel and series noises are present in the detector system. See, V. Radeka, IEEE Trans. Nucl. Sci., NS-15, pg. 455 (1968); F. S. Goulding, Nucl. Instr. and Meth., A100, pg. 493 (1972); and E. Gatti and M. Sampeitro, Nucl. Instr. and Meth., A287, pg 513 (1990). In the presence of 1/f noise, the optimum WF changes depending on the 1/f noise contribution. Optimum pulse shapes have been derived, as described in E. Gatti and M Sampietro, ibid., and E. Gatti, et al., Nucl. Instr. and Meth., A394, pg. 268 (1997), for both cases of 1/f voltage and 1/f current noise sources. These shapes can be synthesized using intensive off-line computational techniques that reduce significantly the throughput of the spectroscopy system.
Accordingly, it is a principal object of the invention to provide a method of real time digital pulse shaping with variable weighting function.
It is a further object of the invention to provide such a method that can be used for both cases of 1/f voltage and 1/f current noise sources.
Other objects of the invention, as well as particular features and advantages thereof, will be apparent or be elucidated in the following description and the accompanying drawing figures.
DISCLOSURE OF INVENTION
The present invention achieves the above objects, among others, by providing, in a preferred embodiment, a method of providing real time digital pulse shaping, comprising: receiving a digital pulse input signal; applying said digital pulse input signal to first and second processing channels, said first processing channel including a CONCAVE shaper and said second processing channel including a CONVEX shaper; applying selected digital control parameters to said CONCAVE shape and said CONVEX shaper to produce desired first and second weighting functions; and superposing said first and second weighting functions to produce a desired overall weighting function.



BRIEF DESCRIPTION OF DRAWINGS
Understanding of the present invention and the various aspects thereof will be facilitated by reference to the accompanying drawing figures, submitted for purposes of illustration only and not intended to define the scope of the invention, on which:
FIG. 1 is a block diagram of a radiation spectrometer that can employ the present invention.
FIG. 2 is a block diagram of a digital pulse shaper according to the present invention, with variable weighting function.
FIG. 3 shows the unit impulse responses of the CONCAVE shaper.
FIG. 4 shows the unit impulse responses of the CONVEX shaper.
FIG. 5 combines the impulse responses of FIGS. 3 and 4.
FIG. 6 shows the impulse responses of FIGS. 3 and 4 and their first, second, and third derivatives.
FIG. 7 is a block diagram of the CONCAVE shaper.
FIG. 8 is a block diagram of the CONVEX shaper.
FIG. 9 is a block diagram of the real time shaper with variable weighting function.
FIGS. 10-15 shows responses of the real time digital pulse shaper with variable weighting function, with specified weighting function control parameters, with and without flattop that can be synthesized using CONCAVE and CONVEX shapers.
FIG. 16 is block diagram of the real time digital shaper using only three types of delay lines.
FIG. 17 shows unit responses of the CONCAVE shaper and associated derivatives.
FIG. 18 shows unit responses of the CONVEX shaper and associated derivatives.
FIG. 19 is a block diagram of the CONCAVE shaper using linear interpolation.
FIG. 20 is a block diagram of the CONVEX shaper using linear interpolation.
FIG. 21 is a block diagram of a real time digital shaper with variable weighting function and linear interpolation.
FIG. 22 is a block diagram of a real time digital shaper, where the discrete input signal represents a sampled exponential signal with a time constant.



BEST MODE FOR CARRYING OUT THE INVENTION
The present invention provides a real time digital pulse shaper that allows varying the weighting function of the shaper by means of digital control. Shapes can be synthesized that are optimum or near optimum when 1/f noise sources are present. The trapezoidal shape can be also obtained. The synthesized pulse shapes are symmetric with digitally controlled flattop and rise(fall) time.
Weighting Function Synthesis
Real time digital pulse shapers are used to process signals from radiation detectors. A typical block diagram of radiation spectrometer with real time digital shaper is shown in FIG. 1. The signal from radiation detector 22 passes through an analog pulse processor 24 that normally includes a charge sensitive preamplifier (not separately shown). Additional analog preprocessing functions such as low pass and high pass filters can be included in the analog pulse processor. It is important that the main components of the analog preprocessor response are known or can be determined experimentally. The analog signal is then digitized using a fast analog-to-digital converter (ADC) 26. The digital samples are then passed through a digital shaper 28 that produces a pulse shape that includes the detector, analog pulse processor, and digital shaper responses. In other words, this shape is a representation of the WF of the detector signal processing chain. Finally, the pulse height spectrum is accumulated by a pulse height analyzer 29.
The present invention is directed to the digital pulse shaper. A block diagram of the inventive digital pulse shaper is shown in FIG. 2. The configuration depicted represents a linear, time invariant digital filter. Therefore, the filter can be synthesized using two filter modules connected in series. The first module (Analog Response Deconvolution) 31 unfolds the known response of the analog pulse processor. For example, this could be a simple differentiator if the analog pulse processor response is a step function or this could be an exponential cancellation function, as described in V. T. Jordanov, Nucl. Instr. and Meth., A351, pg. 592 (1994), if an exponential pulse is sampled.
If the analog response is removed (reduced to a very short pulse), then the digital pulse shaper can be synthesized by simply finding an impulse response that produces the weighting function (WF) shape. In other words, the main goal is to determine a filter with impulse response equal to the desired WF. Note that once the WF filter is constructed, it is possible to combine the analog response deconvolution function with the WF filter response in order to achieve more efficient algorithms.
The WF filter consists of two parallel chains. The first chain (chain “A”) consists of a programmable digital delay line (DELAY-A) 33, a digital filter with adjustable rise/fall time and flattop (CONCAVE SHAPER) 34, and a digital multiplier MUL-A) 35. The second chain has functionally the same delay line (DELAY-B) 32 and a multiplier MUL-B) 37. The digital filter in CONVEX SHAPER 36 has similar controls as that in CONCAVE SHAPER 34, but differs in the impulse response. Both chains are fed by the output of the analog deconvolution unit (ADD) 39. The multipliers function as gain units while the delay lines provide means to align (relative delay) impulse responses of the filter chains. The order of the blocks in each of the chains has no influence on the overall response of the WF filter because each chain represents a linear, time-invariant filter. The output signals of the chains are summed together by the digital adder (ADD).
The key elements of the digital filter are the CONCAVE and CONVEX shapers. The CONCAVE and CONVEX shapers are characterized by their first and second derivatives of the pulse shape in the intervals of the rising and falling edge of the pulse shapes. For positive pulse shapes first derivatives are positive during the rising edge and negative during the falling edge of the pulse shape in both cases of CONCAVE and CONVEX shapers. The difference between the CONCAVE and CONVEX shapers is in the sign of the second derivative during the rising and falling edges of the pulse shape. For positive pulse shape the second derivative of the CONCAVE shaper is positive during both the rising and falling edges, while the second derivative of the CONVEX shaper is negative during the rising and falling edges. For negative pulse shapes the signs of the first and second derivative are inverted. Thus, CONCAVE and CONVEX shapers are defined as shapers that produce pulse shapes such that:
1) The sign of the first derivative of the CONCAVE pulse shape is the same as the sign of the first derivative of the CONVEX pulse shape during the interval of the rising edge of the pulse shapes—positive for positive pulse shapes and negative for negative pulse shapes.
2) The sign of the first derivative of the CONCAVE pulse shape is the same as the sign of the first derivative of the CONVEX pulse shape during the interval of the falling edge of the pulse shapes—negative for positive pulse shapes and positive for negative pulse shapes.
3) The sign of the second derivative of the CONCAVE pulse shape is opposite to the sign of the first derivative of the CONVEX pulse shape during the intervals of the rising and falling edges of the pulse shapes. The sign of the CONCAVE second derivative pulse shape is positive for positive pulse shapes and negative for negative pulse shapes for both the rising and failing edges of the pulse shapes.
FIG. 3 and FIG. 4 depict typical unit impulse responses of these shapers. The responses of the CONCAVE and CONVEX shapers are symmetrical with rise/fall time equal to ka and kb respectively. The adjustable flattop portions of the waveforms have durations of ma and mb respectively. Applying appropriate delays da and db (see FIG. 2), rise time and flattop settings and using a linear combination of these two shapes, various values of WF can be synthesized.
Consider the CONCAVE and CONVEX unit impulse responses (ha(j) and hb(j)) to have a finite duration with rise and fall time that is described by a polynomial function. That is, in the discrete time domain, the impulse responses ha(j) and hb(j) can be expressed as:

Concave Shaper 



  
    
      
        
          
            h
            a
          
          ⁡
          
            (
            j
            )
          
        
        =
        
          {
          
            
              
                0
              
              
                for
              
              
                
                  j
                  ≤
                  0
                
              
            
            
              
                
                  
                    ∑
                    
                      K
                      =
                      0
                    
                    N
                  
                  ⁢
                  
                    
                      a
                      K
                    
                    ·
                    
                      j
                      K
                    
                  
                
              
              
                for
              
              
                
                  0
                  <
                  j
                  <
                  
                    k
                    a
                  
                
              
            
            
              
                
                  
                    ∑
                    
                      K
                      =
                      0
                    
                    N
                  
                  ⁢
                  
                    
                      a
                      K
                    
                    ·
                    
                      k
                      a
                      K
                    
                  
                
              
              
                for
              
              
                
                  
                    k
                    a
                  
                  ≤
                  j
                  ≤
                  
                    
                      k
                      a
                    
                    +
                    
                      m
                      a
                    
                  
                
              
            
            
              
                
                  
                    ∑
                    
                      K
                      =
                      0
                    
                    N
                  
                  ⁢
                  
                    
                      a
                      K
                    
                    ·
                    
                      
                        (
                        
                          
                            2
                            ·
                            
                              k
                              a
                            
                          
                          +
                          
                            m
                            a
                          
                          -
                          j
                        
                        )
                      
                      K
                    
                  
                
              
              
                for
              
              
                
                  
                    
                      k
                      a
                    
                    +
                    
                      m
                      a
                    
                  
                  <
                  j
                  <
                  
                    
                      2
                      ·
                      
                        k
                        a
                      
                    
                    +
                    
                      m
                      a
                    
                  
                
              
            
            
              
                0
              
              
                for
              
              
                
                  j
                  ≥
                  
                    
                      2
                      ·
                      
                        k
                        a
                      
                    
                    +
                    
                      m
                      a
                    
                  
                
              
            
          
        
      
    
    
      
        (
        1
        )
      
    
  




Convex Shaper 



  
    
      
        
          
            h
            b
          
          ⁡
          
            (
            j
            )
          
        
        =
        
          {
          
            
              
                0
              
              
                for
              
              
                
                  j
                  ≤
                  0
                
              
            
            
              
                
                  
                    ∑
                    
                      K
                      =
                      0
                    
                    N
                  
                  ⁢
                  
                    
                      b
                      K
                    
                    ·
                    
                      j
                      K
                    
                  
                
              
              
                for
              
              
                
                  0
                  <
                  j
                  <
                  
                    k
                    b
                  
                
              
            
            
              
                
                  
                    ∑
                    
                      K
                      =
                      0
                    
                    N
                  
                  ⁢
                  
                    
                      b
                      K
                    
                    ·
                    
                      k
                      b
                      K
                    
                  
                
              
              
                for
              
              
                
                  
                    k
                    b
                  
                  ≤
                  j
                  ≤
                  
                    
                      k
                      b
                    
                    +
                    
                      m
                      b
                    
                  
                
              
            
            
              
                
                  
                    ∑
                    
                      K
                      =
                      0
                    
                    N
                  
                  ⁢
                  
                    
                      b
                      K
                    
                    ·
                    
                      
                        (
                        
                          
                            2
                            ·
                            
                              k
                              b
                            
                          
                          +
                          
                            m
                            b
                          
                          -
                          j
                        
                        )
                      
                      K
                    
                  
                
              
              
                for
              
              
                
                  
                    
                      k
                      b
                    
                    +
                    
                      m
                      b
                    
                  
                  <
                  j
                  <
                  
                    
                      2
                      ·
                      
                        k
                        b
                      
                    
                    +
                    
                      m
                      b
                    
                  
                
              
            
            
              
                0
              
              
                for
              
              
                
                  j
                  ≥
                  
                    
                      2
                      ·
                      
                        k
                        b
                      
                    
                    +
                    
                      m
                      b
                    
                  
                
              
            
          
        
      
    
    
      
        (
        2
        )
      
    
  




It is also necessary that the first (1ha(j) and 1hb(j)) and second (2ha(j) and 2hb(j)) derivatives meet the following criteria: 



  
    
      
        
          
            
              
                
                  h
                  a
                  
                  
                    
                    1
                
                ⁡
                
                  (
                  j
                  )
                
              
              =
              
                {
                
                  
                    
                      
                        >
                        0
                      
                    
                    
                      for
                    
                    
                      
                        0
                        <
                        j
                        <
                        
                          k
                          a
                        
                      
                    
                  
                  
                    
                      
                        <
                        0
                      
                    
                    
                      for
                    
                    
                      
                        
                          
                            k
                            a
                          
                          +
                          
                            m
                            a
                          
                        
                        <
                        j
                        <
                        
                          
                            2
                            ·
                            
                              k
                              a
                            
                          
                          +
                          
                            m
                            a
                          
                        
                      
                    
                  
                
              
            
          
        
        
          
            
              
                
                  h
                  a
                  
                  
                    
                    2
                
                ⁡
                
                  (
                  j
                  )
                
              
              =
              
                {
                
                  
                    
                      
                        >
                        0
                      
                    
                    
                      for
                    
                    
                      
                        0
                        <
                        j
                        <
                        
                          k
                          a
                        
                      
                    
                  
                  
                    
                      
                        >
                        0
                      
                    
                    
                      for
                    
                    
                      
                        
                          
                            k
                            a
                          
                          +
                          
                            m
                            a
                          
                        
                        <
                        j
                        <
                        
                          
                            2
                            ·
                            
                              k
                              a
                            
                          
                          +
                          
                            m
                            a
                          
                        
                      
                    
                  
                
              
            
          
        
      
    
    
      
        (
        3
        )
      
    
  
  
    
      
        
          
            
              
                
                  h
                  b
                  
                  
                    
                    1
                
                ⁡
                
                  (
                  j
                  )
                
              
              =
              
                {
                
                  
                    
                      
                        >
                        0
                      
                    
                    
                      for
                    
                    
                      
                        0
                        <
                        j
                        <
                        
                          k
                          b
                        
                      
                    
                  
                  
                    
                      
                        <
                        0
                      
                    
                    
                      for
                    
                    
                      
                        
                          
                            k
                            b
                          
                          +
                          
                            m
                            b
                          
                        
                        <
                        j
                        <
                        
                          
                            2
                            ·
                            
                              k
                              b
                            
                          
                          +
                          
                            m
                            b
                          
                        
                      
                    
                  
                
              
            
          
        
        
          
            
              
                
                  h
                  b
                  
                  
                    
                    2
                
                ⁡
                
                  (
                  j
                  )
                
              
              =
              
                {
                
                  
                    
                      
                        <
                        0
                      
                    
                    
                      for
                    
                    
                      
                        0
                        <
                        j
                        <
                        
                          k
                          a
                        
                      
                    
                  
                  
                    
                      
                        <
                        0
                      
                    
                    
                      for
                    
                    
                      
                        
                          
                            k
                            b
                          
                          +
                          
                            m
                            b
                          
                        
                        <
                        j
                        <
                        
                          
                            2
                            ·
                            
                              k
                              b
                            
                          
                          +
                          
                            m
                            b
                          
                        
                      
                    
                  
                
              
            
          
        
      
    
    
      
        (
        4
        )
      
    
  




Equations 1 to 4 are generalized descriptions of the waveforms of FIG. 3 and FIG. 4. Second or third order polynomial functions may result in efficient, real time algorithms. These filters can be easily synthesized if first the desired impulse responses are differentiated numerically N+1 times. From equations (1) and (2) it can be found that the N+1ha(j) and N+1hb(j) are zero in the rising and falling portions of the impulse response. Therefore, the impulse responses N+1ha(j) and N+1hb(j) can be expressed as sum of unit impulse, delayed unit impulse, unit impulse derivatives and delayed unit impulse derivatives.
To illustrate the synthesis of CONCAVE and CONVEX impulse responses, consider a second order polynomial rise and fall time for both WFs: 



  
    
      
        
          
            h
            a
          
          ⁡
          
            (
            j
            )
          
        
        =
        
          {
          
            
              
                0
              
              
                for
              
              
                
                  j
                  ≤
                  0
                
              
            
            
              
                
                  
                    
                      j
                      2
                    
                    +
                    j
                  
                  2
                
              
              
                for
              
              
                
                  0
                  <
                  j
                  <
                  
                    k
                    a
                  
                
              
            
            
              
                
                  
                    
                      k
                      a
                    
                    ·
                    
                      (
                      
                        
                          k
                          a
                        
                        +
                        1
                      
                      )
                    
                  
                  2
                
              
              
                for
              
              
                
                  
                    k
                    a
                  
                  ≤
                  j
                  ≤
                  
                    
                      k
                      a
                    
                    +
                    
                      m
                      a
                    
                  
                
              
            
            
              
                
                  
                    
                      
                        (
                        
                          
                            2
                            ·
                            
                              k
                              a
                            
                          
                          +
                          
                            m
                            a
                          
                          -
                          j
                        
                        )
                      
                      2
                    
                    +
                    
                      (
                      
                        
                          2
                          ·
                          
                            k
                            a
                          
                        
                        +
                        
                          m
                          a
                        
                        -
                        j
                      
                      )
                    
                  
                  2
                
              
              
                for
              
              
                
                  
                    
                      k
                      a
                    
                    +
                    
                      m
                      a
                    
                  
                  <
                  j
                  <
                  
                    
                      2
                      ·
                      
                        k
                        a
                      
                    
                    +
                    
                      m
                      a
                    
                  
                
              
            
            
              
                0
              
              
                for
              
              
                
                  j
                  ≥
                  
                    
                      2
                      ·
                      
                        k
                        a
                      
                    
                    +
                    
                      m
                      a
                    
                  
                
              
            
          
        
      
    
    
      
        (
        5
        )
      
    
  
  
    
      
        
          
            h
            b
          
          ⁡
          
            (
            j
            )
          
        
        =
        
          {
          
            
              
                0
              
              
                for
              
              
                
                  j
                  ≤
                  0
                
              
            
            
              
                
                  
                    
                      
                        (
                        
                          
                            2
                            ·
                            
                              k
                              b
                            
                          
                          +
                          1
                        
                        )
                      
                      ·
                      j
                    
                    -
                    
                      j
                      2
                    
                  
                  2
                
              
              
                for
              
              
                
                  0
                  <
                  j
                  <
                  
                    k
                    b
                  
                
              
            
            
              
                
                  
                    
                      k
                      b
                    
                    ·
                    
                      (
                      
                        
                          k
                          b
                        
                        +
                        1
                      
                      )
                    
                  
                  2
                
              
              
                for
              
              
                
                  
                    k
                    b
                  
                  ≤
                  j
                  ≤
                  
                    
                      k
                      b
                    
                    +
                    
                      m
                      b
                    
                  
                
              
            
            
              
                
                  
                    
                      (
                      
                        
                          2
                          ·
                          
                            k
                            b
                          
                        
                        +
                        1
                      
                      )
                    
                    +
                    
                      
                        (
                        
                          
                            2
                            ·
                            
                              k
                              b
                            
                          
                          +
                          
                            m
                            b
                          
                          -
                          j
                        
                        )
                      
                      ⁢
                      
                        
                          (
                          
                            
                              2
                              ·
                              
                                k
                                b
                              
                            
                            +
                            
                              m
                              b
                            
                            -
                            j
                          
                          )
                        
                        2
                      
                    
                  
                  2
                
              
              
                for
              
              
                
                  
                    
                      k
                      b
                    
                    +
                    
                      m
                      b
                    
                  
                  <
                  j
                  <
                  
                    
                      2
                      ·
                      
                        k
                        b
                      
                    
                    +
                    
                      m
                      b
                    
                  
                
              
            
            
              
                0
              
              
                for
              
              
                
                  j
                  ≥
                  
                    
                      2
                      ·
                      
                        k
                        b
                      
                    
                    +
                    
                      m
                      b
                    
                  
                
              
            
          
        
      
    
    
      
        (
        6
        )
      
    
  




FIG. 5 shows the unit impulse responses ha(j) and hb(j) for the case of ka=kb and ma=mb. Both WFs reach the same maximum 



  
    
      
        
          k
          a
        
        ·
        
          (
          
            
              k
              a
            
            +
            1
          
          )
        
      
      2
    
    =
    
      
        
          k
          b
        
        ·
        
          (
          
            
              k
              b
            
            +
            1
          
          )
        
      
      2
    
  
  ,




and the CONCAVE and CONVEX WFs have 2ka+ma−1 and 2kb+mb−1 nonzero values, respectively. Note also that the superposition of the responses depicted in FIG. 1 will result in trapezoidal WFs. The areas under the CONCAVE and CONVEX WF are: 



  
    
      
        
        ⁢
        
          
            AREA
            a
          
          =
          
            
              
                
                  k
                  a
                
                ·
                
                  (
                  
                    
                      k
                      a
                    
                    +
                    1
                  
                  )
                
                ·
                
                  (
                  
                    
                      k
                      a
                    
                    +
                    2
                  
                  )
                
              
              3
            
            +
            
              
                
                  k
                  a
                
                ·
                
                  (
                  
                    
                      k
                      a
                    
                    +
                    1
                  
                  )
                
                ·
                
                  (
                  
                    
                      m
                      a
                    
                    -
                    1
                  
                  )
                
              
              2
            
          
        
      
    
  
  
    
      
        
        ⁢
        
          
            AREA
            b
          
          =
          
            
              
                k
                b
                2
              
              ·
              
                (
                
                  
                    k
                    b
                  
                  +
                  1
                
                )
              
            
            -
            
              
                
                  k
                  b
                
                ·
                
                  (
                  
                    
                      k
                      b
                    
                    +
                    1
                  
                  )
                
                ·
                
                  (
                  
                    
                      k
                      b
                    
                    -
                    1
                  
                  )
                
              
              3
            
            +
            
              
                
                  k
                  b
                
                ·
                
                  (
                  
                    
                      k
                      b
                    
                    +
                    1
                  
                  )
                
                ·
                
                  (
                  
                    
                      m
                      b
                    
                    -
                    1
                  
                  )
                
              
              2
            
          
        
      
    
  




In order to synthesize these filters, find the first, second, and third numerical derivatives of the impulse responses ha(j) and hb(j).

1ha(j)=ha(j)−ha(j−1); 2ha(j)=1ha(j)−1ha(j−1); 3ha(j)=2ha(j)−2ha(j−1);

1hb(j)=hb(j)−hb(j−1); 2hb(j)=1hb(j)−1hb(j−1); 3hb(j)=2hb(j)−2hb(j−1);   (7)

FIG. 6 depicts ha(j) and hb(j) and the derivatives thereof as obtained from equation 7. It is important to notice that the third derivatives 3ha(j) and 3hb(j) have only 6 nonzero values at the points where the derivatives are not continuous. Table 1 and Table 2 summarize the weights of 3ha(j) and 3hb(j) respectively. Therefore, 3ha(j) and 3hb(j) can be expressed as sum of delayed and scaled unit impulses δ(j): 



  
    
      
        
          
            
              h
              a
              
              
                
                3
            
            ⁡
            
              (
              j
              )
            
          
          =
          
            
              δ
              ⁡
              
                (
                j
                )
              
            
            -
            
              
                δ
                ⁡
                
                  (
                  
                    j
                    -
                    
                      k
                      a
                    
                  
                  )
                
              
              ⁢
              
                (
                
                  
                    k
                    a
                  
                  +
                  1
                
                )
              
            
            +
            
              
                δ
                ⁡
                
                  (
                  
                    j
                    -
                    
                      k
                      a
                    
                    -
                    1
                  
                  )
                
              
              ⁢
              
                k
                a
              
            
            -
            
              
                δ
                ⁡
                
                  (
                  
                    j
                    -
                    
                      k
                      a
                    
                    -
                    
                      m
                      a
                    
                  
                  )
                
              
              ⁢
              
                k
                a
              
            
            +
            
              
                δ
                ⁡
                
                  (
                  
                    j
                    -
                    
                      k
                      a
                    
                    -
                    
                      m
                      a
                    
                    -
                    1
                  
                  )
                
              
              ⁢
              
                (
                
                  
                    k
                    a
                  
                  +
                  1
                
                )
              
            
            -
            
              δ
              ⁡
              
                (
                
                  j
                  -
                  
                    2
                    ⁢
                    
                      k
                      a
                    
                  
                  -
                  
                    m
                    a
                  
                  -
                  1
                
                )
              
            
          
        
        ⁢
        
          

        
        ⁢
        
          
            
              h
              a
              
              
                
                3
            
            ⁡
            
              (
              j
              )
            
          
          =
          
            
              
                δ
                ⁡
                
                  (
                  j
                  )
                
              
              ⁢
              
                k
                b
              
            
            -
            
              
                δ
                ⁡
                
                  (
                  
                    j
                    -
                    1
                  
                  )
                
              
              ⁢
              
                (
                
                  
                    k
                    b
                  
                  +
                  1
                
                )
              
            
            +
            
              δ
              ⁡
              
                (
                
                  j
                  -
                  
                    k
                    b
                  
                  -
                  1
                
                )
              
            
            -
            
              δ
              ⁡
              
                (
                
                  j
                  -
                  
                    k
                    b
                  
                  -
                  
                    m
                    b
                  
                
                )
              
            
            +
            
              
                δ
                ⁡
                
                  (
                  
                    j
                    -
                    
                      2
                      ⁢
                      
                        k
                        b
                      
                    
                    -
                    
                      m
                      b
                    
                  
                  )
                
              
              ⁢
              
                (
                
                  
                    k
                    b
                  
                  +
                  1
                
                )
              
            
            -
            
              
                δ
                ⁡
                
                  (
                  
                    j
                    -
                    
                      2
                      ⁢
                      
                        k
                        b
                      
                    
                    -
                    
                      m
                      b
                    
                    -
                    1
                  
                  )
                
              
              ⁢
              
                k
                b
              
            
          
        
      
    
    
      
        (
        8
        )
      
    
  




Equations 8 can be simplified in order to reduce the number of operations necessary to realize the CONCAVE and CONVEX WFs. The next step is to obtain the desired responses of the CONCAVE and CONVEX shapers. This is achieved by integrating numerically the impulse responses 3ha(j) and 3hb(j). Thus, the programmable CONCAVE and CONVEX shapers can be realized using three programmable delay lines (delay is a function of ka and kb), one constant multiplier with programmable constant (ka and kb), eight adder/subtractor units, and four or five registers (single clock delay). Block diagram realizations of the CONCAVE and CONVEX shapers are shown in FIG. 7 and FIG. 8, respectively.
Referring to FIG. 7, a real time digital CONCAVE shaper is illustrated generally by the reference numeral 100. Input samples δ(j) are applied to three units: DELAY LINE 101 with delay equal to (ka+ma) samples; DELAY LINE 102 with delay equal to ka samples and to the summing input of SUBTRACTOR 104. The output of DELAY LINE 101 is applied to one of the inputs of ADDER 103. The output of the DELAY LINE 102 is connected to the other input of ADDER 103 and to the subtracting input of SUBTRACTOR 104. The result of ADDER 103 is connected to the input of unit DELAY LINE 105 and to the summing input of SUBTRACTOR 107. The output of unit DELAY LINE 105 is applied to the subtracting input of SUBTRACTOR 107. The result of SUBTRACTOR 104 is connected to one of the inputs of ADDER 108 and to the input of DELAY LINE 106 with delay equal to (ka+ma+1) samples. The output of DELAY LINE 106 is connected to the other input of ADDER 108. The result of ADDER 108 is applied to the summing input of SUBTRACTOR 110. The result of SUBTRACTOR 107 is connected to the input of CONSTANT MULTIPLIER 109 with multiplication constant equal to ka. The output of CONSTANT MULTIPLIER 109 is applied to the subtracting input of SUBTRACTOR 110. The output of SUBTRACTOR 110, 3ha(j) is the output of THIRD DERIVATIVE CONCAVE SHAPER 150.
The output of the THIRD DERIVATIVE CONCAVE SHAPER 150 is applied to the input of TRIPLE ACCUMULATION UNIT 180. The TRIPLE ACCUMULATION UNIT 180 incorporates three accumulators. The first accumulator consists of ADDER 111 and UNIT DELAY LINE 114. The input signal of TRIPLE ACCUMULATION UNIT 180 is applied to one of the inputs of ADDER 111, while the other input of ADDER 111 is connected to the output of UNIT DELAY LINE 114. The result node of ADDER 111 is connected to the input of UNIT DELAY LINE 114 and to the input of ADDER 112 that is a part of the second accumulator. The other input of ADDER 112 is connected to the output of UNIT DELAY LINE 115. The output of ADDER 112 is applied to the input of UNIT DELAY LINE 115 and one of the inputs of ADDER 113 that is a part of the third accumulator. The other input of ADDER 113 is connected to the output of UNIT DELAY LINE 116. The result of ADDER 113 is applied to the input of UNIT DELAY LINE 116 and the output of triple accumulation unit 180 that is the output ha(j) of the CONCAVE shaper 100.
CONCAVE shaper 100 operates by accepting the input samples δ(j) and passing them to DELAY LINE 101, DELAY LINE 102, and SUBTRACTOR 104. The delayed samples from DELAY LINE 101 and DELAY LINE 102 are summed by ADDER 103. The delayed samples from DELAY LINE 102 are subtracted from the input samples δ(j) by SUBTRACTOR 104. Further, the result from ADDER 103 is delayed one sample by UNIT DELAY LINE 105 and is subtracted from ADDER 103 result by the SUBTRACTOR 107. DELAY LINE 106 delays the result of SUBTRACTOR 104. The output of DELAY LINE 106 is added to the result from SUBTRACTOR 104. The result from the SUBTRACTOR 107 is multiplied by the CONSTANT MULTIPLIER 109 and then subtracted from the result of ADDER 108 by the SUBTRACTOR 110 resulting in the third derivative response 3ha(j). The third derivative is accumulated consecutively three times by the TRIPLE ACCUMULATION UNIT 180, resulting in the CONCAVE shaper unit impulse response ha(j).
Referring to FIG. 8, a real time digital CONVEX shaper is illustrated generally by the reference numeral 200. Input samples δ(j) are applied to DELAY LINE 201 with delay equal to (2kb+mb) samples and DELAY LINE 202 with delay equal to kb samples. The input samples δ(j) are also applied to the summing input of SUBTRACTOR 204 and one of the inputs of ADDER 203. The output of DELAY LINE 201 is applied to the other input of ADDER 203. The output of DELAY LINE 202 is connected to the subtracting input of SUBTRACTOR 204. The result of ADDER 203 is connected to the input of UNIT DELAY LINE 205 and to the summing input of SUBTRACTOR 207. The output of UNIT DELAY LINE 205 is applied to the subtracting input of SUBTRACTOR 207. The result of SUBTRACTOR 204 is connected to the input of DELAY LINE 219 with delay equal to (kb+mb) samples, and to the input of UNIT DELAY LINE 206. The output of DELAY LINE 219 is connected to one of the inputs of ADDER 208. The output of UNIT DELAY LINE 206 is connected to the other input of ADDER 208. The result of ADDER 208 is applied to the subtracting input of SUBTRACTOR 210. The result of SUBTRACTOR 207 is connected to the input of CONSTANT MULTIPLIER 209 with multiplication constant equal to kb. The output of CONSTANT MULTIPLIER 209 is applied to the summing input of SUBTRACTOR 210. The output of SUBTRACTOR 210, 3hb(j), is the output of THIRD DERIVATIVE CONVEX SHAPER 250.
The output of THIRD DERIVATIVE CONVEX SHAPER 250 is applied to the input of TRIPLE ACCUMULATION UNIT 280. The output of TRIPLE ACCUMULATION UNIT 280 is the output hb(j) of the CONVEX shaper 200.
Shaper 200 operates by accepting input samples δ(j) and passing them to DELAY LINE 201, DELAY LINE 202, SUBTRACTOR 204, and ADDER 203. The delayed samples from DELAY LINE 201 and input samples δ(j) are summed by the ADDER 203. The delayed samples from DELAY LINE 202 are subtracted from the input samples δ(j) by SUBTRACTOR 204. The result from ADDER 203 is delayed one sample by UNIT DELAY LINE 205 and is subtracted from ADDER 203 result by the SUBTRACTOR 207. DELAY LINE 219 and UNIT DELAY LINE 206 delay the result of SUBTRACTOR 204. The output of UNIT DELAY LINE 206 is added to the output of DELAY LINE 219 by the ADDER 208. The result from the SUBTRACTOR 207 is multiplied by the CONSTANT MULTIPLIER 209. The result of the ADDER 208 is subtracted from the result of the CONSTANT MULTIPLIER 209 by the SUBTRACTOR 210, resulting in the third derivative response 3hb(j). The third derivative is accumulated consecutively three times by the TRIPLE ACCUMULATION UNIT 280 resulting in the shaper unit impulse response hb(j).
FIG. 9 illustrates a real time digital shaper with variable weighting function (WF), generally indicated by the reference numeral 1000. Input samples x(j) are applied to DELAY LINE 1001 with delay equal to da samples and DELAY LINE 1002 with delay equal to db samples. The output of DELAY LINE 1001 is applied to the input of THIRD DERIVATIVE CONCAVE SHAPER 1100. The output of DELAY LINE 1002 is applied to the input of THIRD DERIVATIVE CONVEX SHAPER 1200. The output of THIRD DERIVATIVE CONCAVE SHAPER 1100 is applied to CONSTANT MULTIPLIER 1150. The output of THIRD DERIVATIVE CONVEX SHAPER 1200 is applied to CONSTANT MULTIPLIER 1250. The output of CONSTANT MULTIPLIER 1150 is connected to one input of ADDER 1300. The output of CONSTANT MULTIPLIER 1250 is connected to the other input of ADDER 1300. The output of ADDER 1300 is applied to the input of TRIPLE ACCUMULATION UNIT 1500. The output of TRIPLE ACCUMULATION UNIT 1500 is the output y(j) of the real time digital shaper with variable weighting function.
The input samples are delayed by two delay lines 1001 and 1002. These delay lines are used to align the pulse shapes in order to achieve the desired weighting function (symmetrical or asymmetrical). Typically one of these delays, corresponding to the longer pulse shape, will be set to zero, while the other will align the shorter pulse shape in order to achieve a symmetrical weighting function. THIRD DERIVATIVE CONCAVE SHAPER and THIRD DERIVATIVE CONVEX SHAPER process the output samples of the delay lines 1001 and 1002 respectively. Two scaling CONSTANT MULTIPLIERS 1150 and 1250 follow the THIRD DERIVATIVE CONCAVE SHAPER and the THIRD DERIVATIVE CONVEX SHAPER, respectively. The multiplication constants A and B can be positive or negative. By choosing appropriate multiplication constants, one can adjust the shape of the weighting function. ADDER 1300 sums the results of the two multiplications. The TRIPLE ACCUMULATION UNIT is a common function in both CONCAVE and CONVEX shapers and was moved at the end as a single unit after the addition of the scaled third derivative responses.
When either of the DELAY LINES 1001 and 1002 is always set to zero, the practical realization of FIG. 9 may substitute one delay line and a multiplexer for both delay lines. In this case, the delayed discrete signal will be redirected either to the CONCAVE or to the CONVEX shaper, while the shaper that is not connected to the delay line will receive the non-delayed discrete signal. In order to achieve a symmetrical response it is necessary that: 



  
    
      
        
          
            
              d
              a
            
            =
            0
          
          ,
          
            
              if
              ⁢
              
                 
              
              ⁢
              
                (
                
                  
                    2
                    ⁢
                    
                      k
                      a
                    
                  
                  +
                  
                    m
                    a
                  
                
                )
              
            
            ≥
            
              (
              
                
                  2
                  ⁢
                  
                    k
                    b
                  
                
                +
                
                  m
                  b
                
              
              )
            
          
        
        ⁢
        
          

        
        ⁢
        
          
            
              d
              b
            
            =
            0
          
          ,
          
            
              if
              ⁢
              
                 
              
              ⁢
              
                (
                
                  
                    2
                    ⁢
                    
                      k
                      a
                    
                  
                  +
                  
                    m
                    a
                  
                
                )
              
            
            ≤
            
              (
              
                
                  2
                  ⁢
                  
                    k
                    b
                  
                
                +
                
                  m
                  b
                
              
              )
            
          
        
        ⁢
        
          

        
        ⁢
        
          
            
              d
              b
            
            -
            
              d
              a
            
          
          =
          
            
              
                (
                
                  
                    2
                    ⁢
                    
                      k
                      a
                    
                  
                  +
                  
                    m
                    a
                  
                
                )
              
              -
              
                (
                
                  
                    2
                    ⁢
                    
                      k
                      b
                    
                  
                  +
                  
                    m
                    b
                  
                
                )
              
            
            2
          
        
      
    
    
      
        (
        9
        )
      
    
  




One important feature of these shapers is the ability to adjust the flattop of the shaper. The flattop of the variable WF shaper depends only on the values ma and mb. The duration of the flattop is the minimum of ma and mb. FIGS. 10 through 15 illustrate some examples of various weighting functions with and without flattop that can be synthesized using CONCAVE and CONVEX shapers. The weighting functions are normalized to their maximal values. The responses illustrated in FIGS. 10 and 13 are similar to those described in E. Gatti and M. Smapietro, Nucl. Inst. and Meth., A287, pg. 513 (1990) and the responses illustrated in FIG. 14 are similar to those described in E. Gatti et al., Nucl. Instr. and Meth., A394, 268 (1997).
Weighting Function Synthesis Using Linear Interpolation
Equation 8 can be realized using a number of different arrangements. Depending on the available computational resources, one may choose to minimize the number of the adders or to minimize the number of delay units. For instance, the shaper of FIG. 9 can be rearranged so that only three types of delay lines are used −z−k, z−(k+m), and z−1, where k and m are the number of samples corresponding to the rise/fall time and the flattop. FIG. 16 depicts a block diagram realization using three types of delay lines.
Equations 5 and 6 indicate that the maximum of the unit impulse response of the CONCAVE and CONVEX shapers is proportional to the square of the rise/fall time of the WF. This filter gain may require significant computational resources (width of adders, accumulators, multipliers) when long rise time is selected. Besides, the complexity the power consumption also increases, which may be a limitation in portable instrumentation. In order to reduce the amplitude gain of the CONCAVE and CONVEX shapers a simple approach can be used, as described below.
Express the rise time and the fall time of the CONCAVE and CONVEX SHAPERS as:

ka=Na·D

kb=Nb·D  (10)

where Na, Nb and D are integer numbers greater than zero. The rise/fall time can be divided into Na, Nb regions each containing D samples. We may now approximate the response given by Equations 1 and 2 with a function that is linear in each of the regions. As an illustration we will apply this technique to the shapes described by Equation 5 and 6. The slope of the approximation line element increases/decreases linearly. For instance, the rise time of the CONCAVE shaper for the nth segment of D samples (han(j)) can be expressed as: 



  
    
      
        
          
            
              h
              a
              n
            
            ⁡
            
              (
              j
              )
            
          
          =
          
            
              
                
                  n
                  ·
                  
                    (
                    
                      n
                      -
                      1
                    
                    )
                  
                  ·
                  D
                
                2
              
              +
              
                
                  n
                  ·
                  j
                
                ⁢
                
                   
                
                ⁢
                for
                ⁢
                
                   
                
                ⁢
                
                  
                    (
                    
                      n
                      -
                      1
                    
                    )
                  
                  ·
                  D
                
              
            
            <
            j
            ≤
            
              n
              ·
              D
            
          
        
        ;
        
          0
          <
          n
          ≤
          
            N
            a
          
        
      
    
    
      
        (
        11
        )
      
    
  




Using Equation 7 and the procedure described in the previous section, the impulse responses of both shapers can be obtained. Left columns of FIG. 17 and FIG. 18 show the result of applying Equation 7 for the case of N=10 and D=5. It is seen that the third derivative has quite a few non-zero weights. In order to reduce the number of the non-zero weights, a modified difference equation is used instead of the third derivative. Equation 7 can be modified as:

 1ha(j)=ha(j)−ha(j−1); 2ha(j)=1ha(j)−1ha(j−1); 3Dha(j)=2ha(j−D);  (12)

1hb(j)=hb(j)−hb(j−1); 2hb(j)=1hb(j)−1hb(j−1); 3Dhb(j)=2hb(j−D);

The result of applying Equation 12 is shown in the right columns of FIG. 17 and FIG. 18. As a result only six non zero values have to be combined in order to obtain 3Dha(j) and 3Dhb(j). Table 3 and Table 4 summarize the non-zero values of these responses. Note that the maximal values of the CONCAVE and CONVEX shapers are 



  
    
      k
      a
    
    ·
    
      (
      
        
          N
          a
        
        +
        1
      
      )
    
  
  2




and 



  
    
      
        k
        b
      
      ·
      
        (
        
          
            N
            b
          
          +
          1
        
        )
      
    
    2
  
  .




Block diagrams of realizations of CONCAVE, CONVEX, and variable WF shapers are shown in FIG. 19, FIG. 20 and FIG. 21.
Note that shaper 300 in FIG. 19 is similar to shaper 100 (FIG. 7), except that: (1) delay line 305 has delay equal to D (unit delay line 105 in FIG. 7), (2) added delay line 316 with delay equal to D and changed the delay of 306 to ka+ma (only one delay line 106 in FIG. 7), and (3) first accumulator in the triple accumulator unit has delay equal to D (delay of 1 in FIG. 7). Shaper 400 in FIG. 20 is similar to shaper 200 (FIG. 8), except that: (1) delay lines 401 and 402 have a different arrangement, (2) delay lines 405 and 406 have delays equal to D, and (3) first accumulator in the triple accumulator unit has delay equal to D. Shaper 2000 in FIG. 21 is similar to shaper 1000 (FIG. 9), except that: (1) the third derivative shapers are from shapers 300 (FIG. 19) and 400 (FIG. 20) and (2) the triple accumulator unit has delar equal to D. Shaper 2000 is more general because it reduces to shapers 100 (FIG. 7), 200 (FIG. 8), and 1000 (FIG. 9) when the delay value D=1.
Note also that the shaper in FIG. 21 is equivalent to the shaper of FIG. 16 when D=1. FIG. 22 shows a case when the analog response deconvolution is part of the integration chain of the shaper. The CONCAVE and CONVEX shapers directly process the input sampled signal. The deconvolution of the exponential component is actually embedded in an integration block that converts exponential pulse to a step function (see V. T. Jordanov et al., Nucl. Instr. and Meth., A353, pg. 261 (1994) and V. T. Jordanov, Nucl. Instr. and Meth., A351, pg. 592 (1994). By combining these responses, an efficient arrangement of the variable WF shaper is achieved.







TABLE 1







Non-zero values of the third derivative 3ha(j)


of the CONCAVE impulse response ha(j).










j
3ha(j)







0
  1



ka
−(ka + 1)



ka + 1
  ka



ka + ma
−ka



 ka + ma + 1
ka + 1



2ka + ma + 1
−1

















TABLE 2







Non-zero values of the third derivative 3hb(j)


of the CONVEX impulse response hb(j)










j
3hb(j)







0
  kb



1
−(kb + 1)



kb + 1
  1



 kb + mb
−1



2kb + mb
kb + 1



2kb + mb + 1
−kb

















TABLE 3







Non-zero values of the third derivative 3ha(j)


of the CONCAVE impulse response ha(j) of interpolating


shaper with interpolating segment length equal to D samples.










j
3ha(j)







0
  1



ka
−(Na + 1)



ka + D
  Na



ka + ma
−Na



  ka + ma + D
Na + 1



2ka + ma + D
−1

















TABLE 4







Non-zero values of the third derivative 3hb(j)


of the CONVEX impulse response hb(j) of interpolating


shaper with interpolating segment length equal to D samples.










j
3hb(j)







0
  Nb



D
−(Nb + 1)



kb + D
  1



 kb + mb
−1



2kb + mb
Nb + 1



2kb + mb + D
−Nb

## Claims

1. A method of providing real time digital pulse shaping, comprising:
(a) receiving a digitized pulse signal from a radiation detector; 
(b) applying said digitized pulse signal to first and second processing channels, said first processing channel including a digitally synthesizing CONCAVE shaper and said second processing channel including a digitally synthesizing CONVEX shaper; 
(c) applying selected digital control parameters to said digitally synthesizing CONCAVE shaper and said digitally synthesizing CONVEX shaper to produce desired first and second weighting functions; and 
(d) superposing said first and second weighting functions to produce a desired overall weighting function.