WO2020042888A1 - Method and apparatus for digitizing scintillation pulse - Google Patents

Method and apparatus for digitizing scintillation pulse Download PDF

Info

Publication number
WO2020042888A1
WO2020042888A1 PCT/CN2019/099904 CN2019099904W WO2020042888A1 WO 2020042888 A1 WO2020042888 A1 WO 2020042888A1 CN 2019099904 W CN2019099904 W CN 2019099904W WO 2020042888 A1 WO2020042888 A1 WO 2020042888A1
Authority
WO
WIPO (PCT)
Prior art keywords
signal
threshold voltage
time
pulse
flicker
Prior art date
Application number
PCT/CN2019/099904
Other languages
French (fr)
Chinese (zh)
Inventor
陈瑞
奚道明
刘苇
曾晨
Original Assignee
苏州瑞迈斯医疗科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 苏州瑞迈斯医疗科技有限公司 filed Critical 苏州瑞迈斯医疗科技有限公司
Publication of WO2020042888A1 publication Critical patent/WO2020042888A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03LAUTOMATIC CONTROL, STARTING, SYNCHRONISATION OR STABILISATION OF GENERATORS OF ELECTRONIC OSCILLATIONS OR PULSES
    • H03L7/00Automatic control of frequency or phase; Synchronisation
    • H03L7/06Automatic control of frequency or phase; Synchronisation using a reference signal applied to a frequency- or phase-locked loop
    • H03L7/16Indirect frequency synthesis, i.e. generating a desired one of a number of predetermined frequencies using a frequency- or phase-locked loop
    • H03L7/18Indirect frequency synthesis, i.e. generating a desired one of a number of predetermined frequencies using a frequency- or phase-locked loop using a frequency divider or counter in the loop
    • GPHYSICS
    • G04HOROLOGY
    • G04FTIME-INTERVAL MEASURING
    • G04F10/00Apparatus for measuring unknown time intervals by electric means
    • G04F10/005Time-to-digital converters [TDC]

Definitions

  • the present application relates to the field of signal processing, and more particularly, to a method and a device for digitizing a flicker pulse.
  • MVT Multi-Voltage Threshold, multi-threshold voltage sampling method is a method of digitizing flicker pulses that is different from time interval sampling. It sets n threshold voltages Vth according to the characteristics of flicker pulses. It uses n low-voltage differential signal receiving ports. Voltage comparator, when the flicker pulse to be sampled crosses any threshold voltage Vth, the voltage comparator outputs a state transition and the threshold voltage Vth corresponding to the state transition; and then uses a time-to-digital converter (ie, TDC) to check the state The transition time is digitally sampled; at the same time, the threshold voltage Vth corresponding to the state transition is identified, and the flicker pulse voltage time pair is obtained to complete the digital sampling of the flicker pulse.
  • TDC time-to-digital converter
  • a field programmable gate array ie, FPGA
  • DAC digital analog converter
  • DAC digital analog converter
  • the LVDS port acts as a voltage comparator, and uses the FPGA internal resources to build a TDC to record the state transition time of the LVDS port.
  • the threshold voltage time pair is obtained through the above steps, and the digital sampling of the flicker pulse is completed.
  • the overall structure of the traditional MVT sampling application circuit includes at least important components such as DAC chips and peripheral configuration circuits, voltage reference sources, FPGAs, etc. There are many components in the system, and analog circuits and digital circuits are intermixed, and the overall circuit structure is complex .
  • the channel of a single 6 ⁇ 6 probe module is usually 36, and the number of flicker pulse signals generated is 36.
  • the cost of the entire MVT sampling circuit will be extremely high.
  • the cost of the DAC chip part will also rise sharply. For a PET system, the number of signal channels usually reaches tens of thousands, so this will make the cost of the PET system increase sharply.
  • the purpose of this application is to provide a method and a device for digitizing a flicker pulse, thereby solving the problem that the cost of flicker pulse signal sampling in the prior art is too high.
  • the technical solution of the present application is to provide a method for digitizing a flicker pulse, which includes the following steps:
  • Step S1 Set n theoretical threshold voltages according to the requirements of multi-threshold voltage sampling, where n is a natural number;
  • Step S2 Calculate a pulse width modulation characteristic according to the value of the theoretical threshold voltage, and use an input / output port of the FPGA to generate n pulse width modulation signals corresponding to the theoretical threshold voltage according to the pulse width modulation characteristic;
  • Step S3 input n pulse-width modulation signals into a filter circuit to generate corresponding n threshold voltages
  • Step S4 input the flicker pulse signal to be sampled and n threshold voltage signals into n comparators of the FPGA and perform voltage comparison;
  • Step S5 Use a time-to-digital conversion unit inside the FPGA to collect threshold voltage-time pairs according to the comparison results of n comparators.
  • the multi-threshold voltage sampling requirement includes one and / or several of spatial resolution, temporal resolution, and energy resolution.
  • the multi-threshold voltage sampling requirement is obtained by the following method: establishing a database according to the acquired threshold voltage-time pairs, and performing waveform reconstruction to extract the spatial resolution, temporal resolution, and Energy resolution.
  • the setting of the theoretical threshold voltage may be performed by the following method: determining a voltage amplitude range of the flicker pulse signal to be sampled, and at least one of the theoretical threshold voltages is located in the flicker pulse to be sampled Within the voltage amplitude of the signal.
  • a specific method for calculating the pulse width modulation characteristic includes:
  • Step S21 Determine the level of the output port corresponding to the pulse width modulation signal to be generated according to the theoretical threshold voltage
  • Step S22 Calculate the duty cycle D of the pulse width modulation signal according to the following formula.
  • the duty ratio D represents the percentage of the duration of the high level of the pulse width modulation signal output by the output port in a period to the entire signal time
  • step S23 it is determined that the pulse width modulation characteristic of the pulse width modulation signal to be generated is: the duty ratio D, and the maximum amplitude value is the level of the corresponding output port.
  • the specific method for the FPGA to generate a pulse width modulation signal is: according to the duty ratio D, using a timer unit inside the FPGA to control the period and high level of a single pulse width modulation signal duration.
  • a specific method for inputting n channels of the pulse width modulation signal into a filter circuit is: directly accessing the filter circuit at the back end of the pulse width modulation signal, or in the pulse width modulation signal After filtering, the filter circuit is connected.
  • the filter circuit is a 4-order filter circuit.
  • the fourth-order filter circuit includes four resistors R1, R2, R3, and R4 connected in series, and the pulse width modulation signal generated is connected to the filter circuit through the resistor R1, where The resistor R1 and the resistor R2 are connected to the ground through a capacitor C1, the resistor R2 and the resistor R3 are connected to the ground through a capacitor C2, and the resistor R3 and the resistor R4 are connected to each other through a capacitor C3.
  • the terminal of the resistor R4 is connected to the ground through a capacitor C4, and the terminal of the resistor R4 is also responsible for outputting the filtered threshold voltage.
  • a voltage comparison is performed between the flicker pulse signals to be sampled and n threshold voltage signals through a low-voltage differential signal comparator.
  • the time-to-digital conversion unit includes a first counter and a second counter, and the first time value output by the first counter and the second time value output by the second counter are combined to The edge arrival time of the flicker pulse signal is obtained.
  • the time-digital conversion unit compares the edge arrival time of the flicker pulse signal with the threshold voltage signal, and records the time information corresponding to the high and low level state transitions and the time information. Threshold voltage information.
  • the method further includes step S6: repeating the above steps S1 to S5 to obtain threshold voltage time pairs of multiple sets of flicker pulse signals, and digitize the flicker pulse signals.
  • the threshold voltage time pair includes a threshold voltage and time corresponding to a flicker pulse signal at each sampling point, or a threshold voltage and time corresponding to each sampling point after several samplings. average value.
  • the present application also provides a device for digitizing a flicker pulse according to the above method.
  • the device includes: an FPGA configured to set n theoretical threshold voltages according to a multi-threshold voltage sampling requirement.
  • the FPGA has input / output. Port, the input / output port is configured to generate a pulse width modulation signal according to the theoretical threshold voltage; a filter circuit is configured to convert the pulse width modulation signal to a threshold voltage signal; the FPGA also
  • the comparator includes a comparator and a time-to-digital conversion unit.
  • the comparator is configured to receive a flicker pulse signal to be sampled and compare with the threshold voltage signal.
  • the time-to-digital conversion unit is configured to be based on a comparison result of the comparator. Acquisition threshold voltage-time pairs.
  • At least one of the theoretical threshold voltages is within a voltage amplitude range of the flicker pulse signal to be sampled.
  • the input / output port of the FPGA is a low-voltage differential signal port.
  • the filter circuit is a 4-order filter circuit.
  • the fourth-order filter circuit includes four resistors R1, R2, R3, and R4 connected in series, wherein the resistor R1 and the resistor R2 are connected to each other through a capacitor C1 and grounded.
  • the resistor R2 and the resistor R3 are connected to the ground through a capacitor C2
  • the resistor R3 and the resistor R4 are connected to the ground through a capacitor C3, and the end of the resistor R4 is connected to the ground through the capacitor C4.
  • the pulse width modulation signal is connected to a filter circuit through the resistor R1, and the filtered threshold voltage is output through an end of the resistor R4.
  • the comparator is a low-voltage differential signal comparator.
  • the time-to-digital conversion unit includes a first counter and a second counter, and the first time value output by the first counter and the second time value output by the second counter are combined to The edge arrival time of the flicker pulse signal is obtained.
  • the time-digital conversion unit compares the edge arrival time of the flicker pulse signal with the threshold voltage signal, and records the time information corresponding to the high and low level state transitions and the time information. Threshold voltage information.
  • the method and device for digitizing the flicker pulse provided in the present application generate a PWM signal through an FPGA and generate a DC threshold voltage signal after a multi-stage RC filter circuit constructed by a resistor and a capacitor, thereby replacing the circuit function of the DAC part and completing the MVT sampling.
  • a multi-stage RC filter circuit constructed by a resistor and a capacitor, thereby replacing the circuit function of the DAC part and completing the MVT sampling.
  • the multi-stage RC filter circuit is built by the back-end FPGA and a small number of resistors and capacitors to generate the threshold voltage signal, the DAC and voltage reference circuit are eliminated, and the flicker pulse can be digitized by using the FPGA alone Sampling makes the whole circuit structure simple.
  • the quality of the DC threshold voltage signal generated by the PWM signal through a 4th-order RC low-pass filter circuit (which is composed of 4 resistors and 4 capacitors) is equivalent to the output of a 12-bit precision DAC.
  • FIG. 1 is a schematic structural diagram of a multi-threshold voltage sampling application circuit according to the prior art
  • FIG. 2 is a schematic diagram of steps of a method for digitizing a flicker pulse according to a preferred embodiment of the present application
  • FIG. 3 is a schematic diagram of a fourth-order RC filter circuit used in a device for digitizing a flicker pulse according to an embodiment of the present application
  • FIG. 4 is a schematic structural diagram of a device for digitizing a flicker pulse according to FIG. 2.
  • input terminal and “output terminal” may also be referred to as “input interface” and “output interface”, respectively.
  • FIG. 2 is a schematic diagram of steps of a method for digitizing a flicker pulse according to a preferred embodiment of the present application. As can be seen from FIG. 2, the method for digitizing a flicker pulse provided by the present application includes the following steps:
  • Step S1 Set n theoretical threshold voltages according to the MVT sampling requirements, and record the n theoretical threshold voltages as V1, V2, V3, ..., Vn, where n is a natural number;
  • the MVT sampling requirement generally refers to one and / or several requirements for achieving spatial resolution, temporal resolution, and energy resolution. For different MVT sampling requirements, you can set them during MVT sampling. Different theoretical threshold voltage size, theoretical threshold voltage number, sampling time and other parameters are implemented.
  • those skilled in the art may establish a database based on data of a large number of threshold voltage-time pairs that have been collected, and perform waveform reconstruction based on the collected data of the threshold voltage-time pairs, to obtain a reconstructed waveform, thereby extracting the spatial resolution of the flicker pulse, Information such as time resolution and energy resolution.
  • Information such as time resolution and energy resolution.
  • those skilled in the art can reasonably set the theoretical threshold voltage and theoretical threshold voltage of MVT sampling based on the empirical information obtained from the database. , Sampling time and other parameters to meet different energy, time resolution and energy resolution requirements.
  • the setting of the theoretical threshold voltage may be completed by determining the voltage amplitude range of the flicker pulse signal to be sampled, and selecting a theoretical threshold voltage of different amplitude according to the voltage amplitude of the flicker pulse signal to be sampled, so that All theoretical threshold voltages are within the amplitude range of the flicker pulse signal to be sampled; or different theoretical threshold voltages of different amplitudes are selected according to the voltage amplitude of the flicker pulse signal to be sampled, so that at least one of the set theoretical threshold voltages is set Within the amplitude range of the flicker pulse signal to be sampled.
  • Step S2 Calculate the pulse width modulation (PWM) characteristics according to the theoretical threshold voltage value set in step S1, and use the input / output ports (also known as I / O ports) of the FPGA according to the PWM characteristics. Generate n PWM signals corresponding to the theoretical threshold voltage, and record them as P1, P2, P3, ..., Pn, respectively;
  • PWM pulse width modulation
  • step S2 the specific method for calculating the PWM characteristic according to the value of the theoretical threshold voltage set in step S1 includes:
  • Step S21 Determine the level Vpwm of the output port corresponding to the PWM signal to be generated according to the theoretical threshold voltage
  • Step S22 Calculate the duty cycle D of the PWM signal according to the following formula.
  • the duty ratio D indicates the duration of the high level of the signal output by the output port in one cycle as a percentage of the total signal time
  • step S23 it is determined that the PWM characteristics of the PWM signal to be generated are: the duty ratio D and the maximum amplitude Vpwm (that is, the level of the output port).
  • the following illustrates the calculation method of the PWM characteristics.
  • the theoretical threshold voltage set in step S1 is 1.65V, that is, the theoretical threshold voltage generated by the FPGA in step S2 is 1.65V.
  • the I of the FPGA can be known.
  • the PWM characteristics of the PWM signal corresponding to the theoretical threshold voltage are: a duty cycle of 50% and a maximum amplitude of 3.3V.
  • step S2 a specific method for generating a PWM signal by using the I / O port of the FPGA is: According to the level Vpwm of the output port of the FPGA, the theoretical threshold voltage Vn, the calculated duty cycle D of the PWM signal is used.
  • the timer unit controls the period and high-level duration of a single signal. At this time, the output signal is a PWM signal that meets the duty cycle requirements.
  • Step S3 input the n PWM signals generated in step S2 to the n filter circuits, generate corresponding n threshold voltage signals and record them as Vt1, Vt2, Vt3, ..., Vtn;
  • step S3 the specific method for inputting the n-channel PWM signals generated in step S2 into the m-order filter circuit may be directly connected to the filter circuit at the back end of the PWM signal, or after the PWM signal is passed through other filtering processes. Then access the filter circuit.
  • the 4-order filter circuit includes four resistors R1, R2, R3, and R4 connected in series.
  • the PWM signal is connected to the filter circuit through the resistor R1.
  • the resistor R1 and the resistor R2 are connected to the ground through the capacitor C1
  • the resistor R2 and the resistor R3 are connected to the ground through the capacitor C2
  • the resistor R3 and the resistor R4 are connected through the capacitor C3. After connecting, it is grounded.
  • the end of resistor R4 is connected to ground through capacitor C4.
  • the end of resistor R4 is also responsible for outputting the filtered threshold voltage.
  • the filter circuit filters the PWM signal and filters the high-frequency signal in the PWM signal to make the ripple smaller and the output smooth.
  • Step S4 input the flicker pulse signal to be sampled and the n threshold voltage signals Vt1, Vt2, Vt3, ..., Vtn to the n comparators of the FPGA respectively for voltage comparison;
  • the comparator can be any voltage comparator that meets the requirements, preferably an LVDS comparator.
  • the LVDS comparator has the advantages of low cost, high integration, and low power consumption.
  • conventional FPGA chips have LVDS ports, and the number is large.
  • Step S5 use a time-to-digital conversion unit inside the FPGA to collect threshold voltage-time pairs according to the comparison results of the n comparators;
  • the time-to-digital conversion unit may be formed by a logic unit inside the FPGA.
  • the function of the time-to-digital conversion unit is to measure the edge arrival time (including rising and falling edges) of the flicker pulse signal and determine when the flicker pulse signal is high. Level and when it is low to control the collected data.
  • the time-to-digital conversion unit may include a coarse counter (first counter) and a fine counter (second counter). The coarse time value (first time value) output by the coarse counter and the fine time value (second time value) output by the fine counter. ) According to a certain relationship, the edge arrival time of the flicker pulse signal can be obtained.
  • the time-digital conversion unit compares the edge arrival time of the flicker pulse signal with the threshold voltage signal, and records the corresponding response when the high and low state transitions.
  • the time information and the threshold voltage information corresponding to the time information form a threshold voltage-time pair of the flicker pulse signal.
  • the coarse counter is driven by a clock signal, and after each clock cycle, the count value output by the coarse counter is increased by 1, and the current coarse value is obtained by multiplying the current count value by one clock cycle.
  • the time-to-digital converter records the count value of the coarse counter output at this moment, and records it as N. If the clock period is recorded as Tc, the coarse time of the edge arrival of the trigger signal s can be expressed as N * Tc.
  • the time measurement accuracy of the coarse counter is based on the clock cycle, but for FPGAs, the frequency of the clock signal cannot be increased without limit. To further improve the time measurement accuracy, a fine counter needs to be introduced.
  • the implementation of the fine counter is based on a delay line that outputs a temperature code.
  • the temperature code includes several 0s and 1.
  • the temperature code on the delay line is characterized by all 0s on one side and 1,0 and 1 on the other side.
  • the relationship between the elimination of each other, and the sum of the number of 0s and the number of 1s is equal to the total length of the temperature code.
  • 1110000 is a piece of temperature code composed of 3 1s and 5 0s.
  • the clock distribution device uses logic units on the FPGA to form a delay line.
  • the essence of a delay line is a serial adder composed of several full adders. Each full adder has ports for carry inputs and outputs. These The ports are connected end to end, and the carry output of the full adder in the upper stage is connected to the carry input of the full adder in the next stage.
  • the bit width of the serial adder is 8 bits.
  • the serial adder has two inputs, one of which is set to an 8-bit binary constant 11111111, and the other is a digitized signal to be tested ( For example, the trigger signal s), the part less than 8 bits is filled with 0.
  • the digital level of the signal to be measured changes from 0 to 1
  • the calculation result of the serial adder does not immediately become all 0, the calculation of the full adder closest to the signal to be measured first
  • the result becomes 0, and then the carry signal of this full adder changes from 0 to 1 and is passed to the next stage; the calculation result of the full adder in the second stage then becomes 0, and its carry signal changes from 0 to 1. Then pass to the next level, and so on.
  • the transfer of the carry signal takes time.
  • the time from the n-th full adder to the carry signal to the n + 1 th full adder to generate the carry signal is usually less than 100 picoseconds, and the temperature code contains 0 for each level of the carry signal. Add 1 to the number.
  • the time-to-digital conversion unit uses a clock signal (same as the clock signal of the coarse counter) to sample the temperature code output from the delay line.
  • a clock signal (same as the clock signal of the coarse counter) to sample the temperature code output from the delay line.
  • MSB most significant bit
  • LSB least significant bit
  • the number of 1 or 0 contained in the temperature code is 0 to 8, which can be represented by a 4-bit binary number, but in the actual implementation process of this application, the time-to-digital converter uses a 128-bit temperature Code, the temperature code contains 1 or 0, the number is 0 to 128, expressed by an 8-bit binary number.
  • the above conversion process of temperature code to fine count is completed by the encoder.
  • the time-to-digital conversion unit For each edge of the trigger signal s, the time-to-digital conversion unit will give a coarse count and a fine count.
  • Step S6 Repeat the above steps S1-S5 to obtain the threshold voltage time pair of the flicker pulse signal, and complete the digitization of the flicker pulse signal.
  • the threshold voltage time pair of the flicker pulse may include the threshold voltage and time corresponding to the flicker pulse signal at each sampling point, and may also include the threshold voltage and time corresponding to each sampling point after several samplings. average of.
  • FIG. 4 is a schematic structural diagram of a device for digitizing a flicker pulse using the above method.
  • the device includes FPGA 10, and the FPGA 10 has a comparator 11 and a time-to-digital conversion unit 12 formed by using its own logic unit.
  • the comparator 11 and time The digital conversion unit 12 is communicatively connected.
  • the flicker pulse signal to be sampled externally is input to the comparator 11 through the interface.
  • the FPGA 10 sends a PWM signal to the filter circuit 20 connected to the FPGA 11 through the I / O port 13.
  • the filter circuit 20 and the other of the comparator 11 are PWM signals.
  • the port is communicatively connected and sends a threshold voltage signal to the comparator 11.
  • the FPGA 10 is configured to set n theoretical threshold voltages according to MVT sampling requirements, and the n theoretical threshold voltages are respectively denoted as V1, V2, V3, ..., Vn, where: n is a natural number.
  • MVT sampling requirements generally refer to one and / or several of the requirements of spatial resolution, time resolution, and energy resolution.
  • different theoretical threshold voltages can be set during MVT sampling Size, theoretical threshold voltage, sampling time and other parameters.
  • a person skilled in the art may establish a database based on data of a large number of threshold voltage time pairs that have been collected, and perform waveform reconstruction based on the collected data of the threshold voltage time pairs, to obtain a reconstructed waveform, thereby extracting the spatial resolution and time of the flicker pulse.
  • Information such as resolution and energy resolution.
  • those skilled in the art can reasonably set the theoretical threshold voltage magnitude, theoretical threshold voltage number, Sampling time and other parameters to meet different energy, time resolution and energy resolution requirements.
  • the determination of the theoretical threshold voltage can be accomplished by: determining the voltage amplitude range of the flicker pulse signal to be sampled, and selecting the theoretical threshold voltage of different amplitudes according to the voltage amplitude of the flicker pulse signal to be sampled, so that all the theoretical threshold voltages are equal; Is located within the amplitude range of the flicker pulse signal to be sampled; or a theoretical threshold voltage of different amplitude is selected according to the voltage amplitude of the flicker pulse signal to be sampled, so that at least one of the set theoretical threshold voltages is located in the flicker to be sampled Within the amplitude of the pulse signal.
  • the performance parameters of the FPGA 10 can be configured to have 114480 logic units, the number of user-available I / O ports is 528, and the number of LVDS ports is up to 230 pairs.
  • the FPGA 10 may be configured to calculate a PWM characteristic of a pulse signal according to the value of the theoretical threshold voltage Vn, and the I / O port 13 of the FPGA 10 is configured to generate a signal corresponding to a different theoretical threshold voltage.
  • the n-channel PWM signals are denoted as P1, P2, P3, ..., Pn, respectively, and the I / O port 13 sends a PWM signal to the filter circuit 20.
  • the duty cycle D indicates that the duration of the high level of the signal output by the output port in a period accounts for the entire signal.
  • the specific process of the FPGA I / O port generating a PWM signal is: According to the calculated duty cycle D of the PWM signal, the FPGA uses the internal timer unit to control the period and high-level duration of a single signal.
  • the signal output from the O port is a PWM signal that meets the duty cycle requirements.
  • the filter circuit 20 is configured to generate corresponding n DC-shaped threshold voltages Vt1, Vt2, Vt3,..., Vtn according to n PWM signals, and the filter circuit 20 sends the threshold to the comparator 11 at the same time. Voltage signal.
  • the filter circuit 20 uses RC filter circuits (resistance-capacitance circuits) constructed by fourth-order resistors and capacitors.
  • the fourth-order filter circuit includes four resistors R1, R2, which are connected in series in order. R3 and R4.
  • the generated PWM signal is connected to the filter circuit through resistor R1.
  • resistor R1 and resistor R2 are connected to ground through capacitor C1
  • resistor R2 and resistor R3 are connected to ground through capacitor C2.
  • Resistor R3 and resistor R4 is connected to ground through capacitor C3, and the end of resistor R4 is connected to ground through capacitor C4.
  • the end of resistor R4 is also responsible for outputting the filtered threshold voltage.
  • the filter circuit filters the PWM signal and filters the high-frequency signal in the PWM signal to make the ripple smaller and the output smooth.
  • the RC filter circuit also has many advantages such as simple structure, low price, excellent performance and easy implementation.
  • the FPGA 10 can input n-channel PWM signals to the m-order filter circuit through the port 13 or use other filtering processing between the port 13 and the filter circuit 20 and then access the filter circuit 20. This will not be repeated here.
  • the comparator 11 in the FPGA 10 can use any voltage comparator that meets the requirements, preferably an LVDS comparator.
  • the LVDS comparator has the advantages of low cost, high integration, and low power consumption.
  • conventional FPGA chips have LVDS ports, and the number is large.
  • the time-to-digital conversion unit 12 in FGPA can be formed by a logic unit inside the FPGA.
  • the time-to-digital conversion unit 12 is configured to measure the edge arrival time (including rising and falling edges) of the flicker pulse signal and determine when the flicker pulse signal is high. Level and when it is low to control the collected data.
  • the time-to-digital conversion unit 12 may include a coarse counter (first counter, not shown in the figure) and a fine counter (second counter, not shown in the figure). The coarse time value (first time value) and fine The fine time value (second time value) output by the counter is combined according to a certain relationship to obtain the edge arrival time of the flicker pulse signal.
  • the time-digital conversion unit compares the edge arrival time of the flicker pulse signal with the threshold voltage signal and records it.
  • the time information corresponding to the high and low state transitions and the threshold voltage information corresponding to the time information form a threshold voltage-time pair of the flicker pulse signal.
  • the coarse counter is driven by a clock signal, and after each clock cycle, the count value output by the coarse counter is increased by 1, and the current coarse value is obtained by multiplying the current count value by one clock cycle.
  • the time-to-digital converter records the count value of the coarse counter output at this moment, and records it as N. If the clock period is recorded as Tc, the coarse time of the edge arrival of the trigger signal s can be expressed as N * Tc.
  • the time measurement accuracy of the coarse counter is based on the clock cycle, but for FPGAs, the frequency of the clock signal cannot be increased without limit. To further improve the time measurement accuracy, a fine counter needs to be introduced.
  • the implementation of the fine counter is based on a delay line that outputs a temperature code.
  • the temperature code includes several 0s and 1.
  • the temperature code on the delay line is characterized by all 0s on one side and 1,0 and 1 on the other side.
  • the relationship between the elimination of each other, and the sum of the number of 0 and the number of 1 is equal to the total length of the temperature code.
  • 1110000 is a piece of temperature code composed of 3 1s and 5 0s.
  • the boundary between 0 and 1 represents the signal to be measured.
  • the fine time of the edge of the signal to be measured on the delay line can be calculated. Therefore, the edge arrival time of the trigger signal s is equal to the sum of the coarse time and the fine time.
  • the time measurement accuracy of the time-to-digital converter can be improved to better than 100 picoseconds.
  • the clock distribution device uses logic units on the FPGA to form a delay line.
  • the essence of a delay line is a serial adder composed of several full adders. Each full adder has ports for carry inputs and outputs. These The ports are connected end to end, and the carry output of the full adder in the upper stage is connected to the carry input of the full adder in the next stage.
  • the bit width of the serial adder is 8 bits.
  • the serial adder has two inputs, one of which is set to an 8-bit binary constant 11111111, and the other is a digitized signal to be tested ( For example, the trigger signal s), the part less than 8 bits is filled with 0.
  • the digital level of the signal to be measured changes from 0 to 1
  • the calculation result of the serial adder does not immediately become all 0, the calculation of the full adder closest to the signal to be measured first
  • the result becomes 0, and then the carry signal of this full adder changes from 0 to 1 and is passed to the next stage; the calculation result of the full adder in the second stage then becomes 0, and its carry signal changes from 0 to 1. Then pass to the next level, and so on.
  • the transfer of the carry signal takes time.
  • the time from the n-th full adder to the carry signal to the n + 1 th full adder to generate the carry signal is usually less than 100 picoseconds, and the temperature code contains 0 for each level of the carry signal. Add 1 to the number.
  • the time-to-digital conversion unit uses a clock signal (same as the clock signal of the coarse counter) to sample the temperature code output from the delay line.
  • a clock signal (same as the clock signal of the coarse counter) to sample the temperature code output from the delay line.
  • MSB most significant bit
  • LSB least significant bit
  • the number of 1 or 0 contained in the temperature code is 0 to 8, which can be represented by a 4-bit binary number, but in the actual implementation process of this application, the time-to-digital converter uses a 128-bit temperature Code, the temperature code contains 1 or 0, the number is 0 to 128, expressed by an 8-bit binary number.
  • the above conversion process of temperature code to fine count is completed by the encoder.
  • the time-to-digital conversion unit For each edge of the trigger signal s, the time-to-digital conversion unit will give a coarse count and a fine count.
  • the threshold voltage-time pair of the flicker pulse may include the threshold voltage information and time information corresponding to the flicker pulse signal at each sampling point, and may also include the threshold voltage information and time information corresponding to each sampling point after several samplings. average of.
  • the method and device for digitizing the flicker pulse provided in the present application generate a PWM signal through an FPGA and generate a DC threshold voltage signal after a filter circuit constructed by a resistor and a capacitor, thereby replacing the circuit function of the DAC part and completing the MVT sampling.
  • the multi-stage RC filter circuit is built by the back-end FPGA and a small number of resistors and capacitors to generate the threshold voltage signal, the DAC and voltage reference circuit are eliminated, and the flicker pulse can be digitized by using the FPGA alone Sampling makes the whole circuit structure simple.

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Analogue/Digital Conversion (AREA)
  • Measurement Of Radiation (AREA)

Abstract

A method and apparatus for digitizing a scintillation pulse. The method comprises: step S1: setting n theoretical threshold voltages according to a multiple-voltage threshold sampling requirement; step S2: calculating pulse width modulation characteristics according to the value of the theoretical threshold voltages, and using an I/O port of an FPGA to respectively generate, according to the pulse width modulation characteristics, n paths of pulse width modulation signals corresponding to different theoretical threshold voltages; step S3: inputting the n paths of pulse width modulation signals to filtering circuits, and generating n corresponding threshold voltage signals; step S4: respectively inputting a scintillation pulse signal to be sampled and n threshold voltage signals into n comparators of the FPGA and performing voltage comparison; and step S5: using a time-to-digital conversion unit inside the FPGA to collect threshold voltage-time pairs according to the comparison results of the n comparators. A filtering circuit constructed by resistors and capacitors is used to replace a DAC to complete MVT sampling, and the structure is simple, so that costs can be reduced greatly and system power consumption and the area of a PCB circuit can be reduced.

Description

一种闪烁脉冲数字化的方法及装置Method and device for digitizing flicker pulse 技术领域Technical field
本申请涉及信号处理领域,更具体地涉及一种闪烁脉冲数字化的方法及装置。The present application relates to the field of signal processing, and more particularly, to a method and a device for digitizing a flicker pulse.
背景技术Background technique
MVT(Multi-Voltage Threshold,多阈值电压)采样方法是一种区别于时间间隔采样的闪烁脉冲数字化的方法,其根据闪烁脉冲特点设置n个阈值电压Vth;采用包括n个低压差分信号接收端口的电压比较器,当待采样的闪烁脉冲越过任意一个阈值电压Vth时,电压比较器输出一状态跳变以及该状态跳变所对应的阈值电压Vth;然后利用时间数字转换器(即TDC)对状态跳变的时间进行数字化采样;同时识别该状态跳变对应的阈值电压Vth,获得闪烁脉冲电压时间对,完成闪烁脉冲的数字化采样。MVT (Multi-Voltage Threshold, multi-threshold voltage) sampling method is a method of digitizing flicker pulses that is different from time interval sampling. It sets n threshold voltages Vth according to the characteristics of flicker pulses. It uses n low-voltage differential signal receiving ports. Voltage comparator, when the flicker pulse to be sampled crosses any threshold voltage Vth, the voltage comparator outputs a state transition and the threshold voltage Vth corresponding to the state transition; and then uses a time-to-digital converter (ie, TDC) to check the state The transition time is digitally sampled; at the same time, the threshold voltage Vth corresponding to the state transition is identified, and the flicker pulse voltage time pair is obtained to complete the digital sampling of the flicker pulse.
在传统的MVT采样应用电路中,通过现场可编程门阵列(即FPGA)产生控制信号来配置数字模拟转换器(digital to analog converter,简称DAC)芯片以产生直流的阈值电压信号。通常为保证DAC芯片的性能,需要通过外部高稳定性的电压基准源为DAC芯片提供参考电压;然后将闪烁脉冲和阈值电压信号同时输入到FPGA的低压差分信号端口(low-voltage differential signaling,即LVDS端口),由LVDS端口充当电压比较器,使用FPGA内部资源搭建TDC来记录LVDS端口的状态跳变时间。通过上述步骤获取到阈值电压时间对,完成对闪烁脉冲的数字化采样,其整体结构如图1所示。In a traditional MVT sampling application circuit, a field programmable gate array (ie, FPGA) is used to generate control signals to configure a digital analog converter (DAC) chip to generate a DC threshold voltage signal. Generally, in order to ensure the performance of the DAC chip, it is necessary to provide a reference voltage for the DAC chip through an external highly stable voltage reference source; and then input the flicker pulse and the threshold voltage signal to the low-voltage differential signal port of the FPGA at the same time, that is, LVDS port), the LVDS port acts as a voltage comparator, and uses the FPGA internal resources to build a TDC to record the state transition time of the LVDS port. The threshold voltage time pair is obtained through the above steps, and the digital sampling of the flicker pulse is completed. The overall structure is shown in FIG. 1.
从图1可知,传统MVT采样应用电路的整体结构至少包括DAC芯片及外围配置电路、电压基准源、FPGA等重要部件,系统中组件较多,且模拟电路和数字电路交叉混合,整体电路结构复杂。同时,以PET系统探测器模块为例,通常单个6×6探头模组的通道为36,产生的闪烁脉冲信号路数为36,为保证采样性能,每一路闪烁脉冲信号设定对应4个阈值电压,因此需要DAC芯片的输出通道总数量为36×4=144路。然而目前现有技术中通 用12位精度以上的DAC芯片的输出路数绝大部分为8个通道,因此完成36路闪烁脉冲数字化采样需要8通道DAC芯片的数量为144÷8=18片,而单片12位8通道的DAC芯片官方售价通常最低需要4.75美元,因此仅产生电压阈值这一部分电路的成本至少为4.75×18=85.5美元,平均每个通道的成本为2.375美元。另外,加上外部电压基准源和FPGA的成本,将导致整个MVT采样电路的成本极高。同时随着DAC芯片的精度提升及集成通道数量的增加,DAC芯片部分的成本还会急剧上升。而对于一台PET系统而言,信号通道的数量通常会达到上万个,因此这将使得PET系统的成本随之急剧增加。As can be seen from Figure 1, the overall structure of the traditional MVT sampling application circuit includes at least important components such as DAC chips and peripheral configuration circuits, voltage reference sources, FPGAs, etc. There are many components in the system, and analog circuits and digital circuits are intermixed, and the overall circuit structure is complex . At the same time, taking the PET system detector module as an example, the channel of a single 6 × 6 probe module is usually 36, and the number of flicker pulse signals generated is 36. In order to ensure the sampling performance, each threshold of the flicker pulse signal is set to correspond to 4 thresholds. Voltage, so the total number of output channels of the DAC chip is required to be 36 × 4 = 144. However, in the prior art, the number of output channels of DAC chips with a general accuracy of more than 12 bits is mostly 8 channels. Therefore, the number of 8-channel DAC chips required to complete the 36-channel flicker pulse digital sampling is 144 ÷ 8 = 18. The official selling price of a single 12-bit 8-channel DAC chip usually requires a minimum of $ 4.75, so the cost of the circuit that generates only the voltage threshold is at least $ 4.75 x 18 = $ 85.5, and the average cost of each channel is $ 2.375. In addition, plus the cost of external voltage reference and FPGA, the cost of the entire MVT sampling circuit will be extremely high. At the same time, as the accuracy of the DAC chip increases and the number of integrated channels increases, the cost of the DAC chip part will also rise sharply. For a PET system, the number of signal channels usually reaches tens of thousands, so this will make the cost of the PET system increase sharply.
申请内容Application content
本申请的目的是提供一种闪烁脉冲数字化的方法及装置,从而解决现有技术中闪烁脉冲信号采样的成本过高的问题。The purpose of this application is to provide a method and a device for digitizing a flicker pulse, thereby solving the problem that the cost of flicker pulse signal sampling in the prior art is too high.
为了解决上述技术问题,本申请的技术方案是提供一种闪烁脉冲数字化的方法,所述方法包括以下步骤:In order to solve the above technical problem, the technical solution of the present application is to provide a method for digitizing a flicker pulse, which includes the following steps:
步骤S1:根据多阈值电压采样的需求,设置n个理论阈值电压,其中,n为自然数;Step S1: Set n theoretical threshold voltages according to the requirements of multi-threshold voltage sampling, where n is a natural number;
步骤S2:根据所述理论阈值电压的值计算脉冲宽度调制特性,利用FPGA的输入/输出端口分别根据所述脉冲宽度调制特性来产生与所述理论阈值电压对应的n路脉冲宽度调制信号;Step S2: Calculate a pulse width modulation characteristic according to the value of the theoretical threshold voltage, and use an input / output port of the FPGA to generate n pulse width modulation signals corresponding to the theoretical threshold voltage according to the pulse width modulation characteristic;
步骤S3:将n路所述脉冲宽度调制信号输入滤波电路,产生对应的n个阈值电压;Step S3: input n pulse-width modulation signals into a filter circuit to generate corresponding n threshold voltages;
步骤S4:将待采样的闪烁脉冲信号和n个所述阈值电压信号分别输入到所述FPGA的n个比较器中并进行电压比较;Step S4: input the flicker pulse signal to be sampled and n threshold voltage signals into n comparators of the FPGA and perform voltage comparison;
步骤S5:利用所述FPGA内部的时间数字转换单元并根据n个所述比较器的比较结果来采集阈值电压-时间对。Step S5: Use a time-to-digital conversion unit inside the FPGA to collect threshold voltage-time pairs according to the comparison results of n comparators.
根据本申请的一个实施例,所述多阈值电压采样需求包括空间分辨率、时间分辨率和能量分辨率中的一种和/或几种。According to an embodiment of the present application, the multi-threshold voltage sampling requirement includes one and / or several of spatial resolution, temporal resolution, and energy resolution.
根据本申请的一个实施例,所述多阈值电压采样需求通过以下方法获 得:根据已经采集的阈值电压-时间对建立数据库,并进行波形重建以提取闪烁脉冲信号的空间分辨率、时间分辨率和能量分辨率。According to an embodiment of the present application, the multi-threshold voltage sampling requirement is obtained by the following method: establishing a database according to the acquired threshold voltage-time pairs, and performing waveform reconstruction to extract the spatial resolution, temporal resolution, and Energy resolution.
根据本申请的一个实施例,所述理论阈值电压的设置可以通过下述方法完成:确定待采样的闪烁脉冲信号的电压幅值范围,所述理论阈值电压中至少有一个位于待采样的闪烁脉冲信号的电压幅值范围之内。According to an embodiment of the present application, the setting of the theoretical threshold voltage may be performed by the following method: determining a voltage amplitude range of the flicker pulse signal to be sampled, and at least one of the theoretical threshold voltages is located in the flicker pulse to be sampled Within the voltage amplitude of the signal.
根据本申请的一个实施例,计算所述脉冲宽度调制特性的具体方法包括:According to an embodiment of the present application, a specific method for calculating the pulse width modulation characteristic includes:
步骤S21:根据所述理论阈值电压确定待产生脉冲宽度调制信号对应的输出端口的电平;Step S21: Determine the level of the output port corresponding to the pulse width modulation signal to be generated according to the theoretical threshold voltage;
步骤S22:按照下述公式计算出脉冲宽度调制信号的占空比D,Step S22: Calculate the duty cycle D of the pulse width modulation signal according to the following formula.
D=理论阈值电压/对应的输出端口的电平,D = theoretical threshold voltage / level of the corresponding output port,
其中,该占空比D表示输出端口输出的脉冲宽度调制信号在一个周期内高电平的持续时间占整个信号时间的百分比;Wherein, the duty ratio D represents the percentage of the duration of the high level of the pulse width modulation signal output by the output port in a period to the entire signal time;
步骤S23,确定待产生的脉冲宽度调制信号的脉冲宽度调制特性为:占空比D,最大幅值为对应的输出端口的电平。In step S23, it is determined that the pulse width modulation characteristic of the pulse width modulation signal to be generated is: the duty ratio D, and the maximum amplitude value is the level of the corresponding output port.
根据本申请的一个实施例,所述FPGA产生脉冲宽度调制信号的具体方法为:根据所述占空比D,利用所述FPGA内部的定时器单元控制单个脉冲宽度调制信号的周期和高电平持续时间。According to an embodiment of the present application, the specific method for the FPGA to generate a pulse width modulation signal is: according to the duty ratio D, using a timer unit inside the FPGA to control the period and high level of a single pulse width modulation signal duration.
根据本申请的一个实施例,将n路所述脉冲宽度调制信号输入滤波电路的具体方法为:在所述脉冲宽度调制信号后端直接接入所述滤波电路,或者在所述脉冲宽度调制信号后通过滤波处理后再接入所述滤波电路。According to an embodiment of the present application, a specific method for inputting n channels of the pulse width modulation signal into a filter circuit is: directly accessing the filter circuit at the back end of the pulse width modulation signal, or in the pulse width modulation signal After filtering, the filter circuit is connected.
根据本申请的一个实施例,所述滤波电路为4阶滤波电路。According to an embodiment of the present application, the filter circuit is a 4-order filter circuit.
根据本申请的一个实施例,所述4阶滤波电路包括依次串联的四个电阻R1、R2、R3和R4,产生的所述脉冲宽度调制信号通过所述电阻R1接入滤波电路,其中,所述电阻R1和所述电阻R2之间通过电容C1连接后接地,所述电阻R2和所述电阻R3之间通过电容C2连接后接地,所述电阻R3和所述电阻R4之间通过电容C3连接后接地,所述电阻R4的末端通过电容C4连接后接地,所述电阻R4的末端还负责输出滤波后的阈值电压。According to an embodiment of the present application, the fourth-order filter circuit includes four resistors R1, R2, R3, and R4 connected in series, and the pulse width modulation signal generated is connected to the filter circuit through the resistor R1, where The resistor R1 and the resistor R2 are connected to the ground through a capacitor C1, the resistor R2 and the resistor R3 are connected to the ground through a capacitor C2, and the resistor R3 and the resistor R4 are connected to each other through a capacitor C3. The terminal of the resistor R4 is connected to the ground through a capacitor C4, and the terminal of the resistor R4 is also responsible for outputting the filtered threshold voltage.
根据本申请的一个实施例,在所述步骤S4中,通过低压差分信号比较器对待采样的所述闪烁脉冲信号和n个所述阈值电压信号进行电压比较。According to an embodiment of the present application, in the step S4, a voltage comparison is performed between the flicker pulse signals to be sampled and n threshold voltage signals through a low-voltage differential signal comparator.
根据本申请的一个实施例,所述时间数字转换单元包括一个第一计数器和一个第二计数器,所述第一计数器输出的第一时间值和所述第二计数器输出的第二时间值合并以得到闪烁脉冲信号的边沿到达时间,所述时间数字转换单元根据闪烁脉冲信号的边沿到达时间和阈值电压信号进行比较,记录下高、低电平状态跳变时对应的时间信息和该时间信息对应的阈值电压信息。According to an embodiment of the present application, the time-to-digital conversion unit includes a first counter and a second counter, and the first time value output by the first counter and the second time value output by the second counter are combined to The edge arrival time of the flicker pulse signal is obtained. The time-digital conversion unit compares the edge arrival time of the flicker pulse signal with the threshold voltage signal, and records the time information corresponding to the high and low level state transitions and the time information. Threshold voltage information.
根据本申请的一个实施例,所述方法还包括步骤S6:反复进行上述步骤S1-步骤S5以获得多组闪烁脉冲信号的阈值电压时间对,完成闪烁脉冲信号的数字化。According to an embodiment of the present application, the method further includes step S6: repeating the above steps S1 to S5 to obtain threshold voltage time pairs of multiple sets of flicker pulse signals, and digitize the flicker pulse signals.
根据本申请的一个实施例,所述阈值电压时间对包括闪烁脉冲信号分别在各个采样点处所对应的阈值电压和时间,或者包括经过数次采样后在各个采样点处所对应的阈值电压和时间的平均值。According to an embodiment of the present application, the threshold voltage time pair includes a threshold voltage and time corresponding to a flicker pulse signal at each sampling point, or a threshold voltage and time corresponding to each sampling point after several samplings. average value.
本申请还提供一种根据上述方法的闪烁脉冲数字化的装置,所述装置包括:FPGA,所述FPGA被配置为根据多阈值电压采样需求,设置n个理论阈值电压,所述FPGA具有输入/输出端口,所述输入/输出端口被配置为根据所述理论阈值电压产生脉冲宽度调制信号;滤波电路,所述滤波电路被配置为将所述脉冲宽度调制信号转换为阈值电压信号;所述FPGA还包括比较器和时间数字转换单元,所述比较器被配置为接收待采样的闪烁脉冲信号和所述阈值电压信号并进行比较;所述时间数字转换单元被配置为根据所述比较器的比较结果采集阈值电压-时间对。The present application also provides a device for digitizing a flicker pulse according to the above method. The device includes: an FPGA configured to set n theoretical threshold voltages according to a multi-threshold voltage sampling requirement. The FPGA has input / output. Port, the input / output port is configured to generate a pulse width modulation signal according to the theoretical threshold voltage; a filter circuit is configured to convert the pulse width modulation signal to a threshold voltage signal; the FPGA also The comparator includes a comparator and a time-to-digital conversion unit. The comparator is configured to receive a flicker pulse signal to be sampled and compare with the threshold voltage signal. The time-to-digital conversion unit is configured to be based on a comparison result of the comparator. Acquisition threshold voltage-time pairs.
根据本申请的一个实施例,所述理论阈值电压中至少有一个位于待采样的闪烁脉冲信号的电压幅值范围之内。According to an embodiment of the present application, at least one of the theoretical threshold voltages is within a voltage amplitude range of the flicker pulse signal to be sampled.
根据本申请的一个实施例,所述FPGA的输入/输出端口为低压差分信号端口。According to an embodiment of the present application, the input / output port of the FPGA is a low-voltage differential signal port.
根据本申请的一个实施例,所述滤波电路为4阶滤波电路。According to an embodiment of the present application, the filter circuit is a 4-order filter circuit.
根据本申请的一个实施例,所述4阶滤波电路包括依次串联的四个电阻 R1、R2、R3和R4,其中,所述电阻R1和所述电阻R2之间通过电容C1连接后接地,所述电阻R2和所述电阻R3之间通过电容C2连接后接地,所述电阻R3和所述电阻R4之间通过电容C3连接后接地,所述电阻R4的末端通过电容C4连接后接地,产生的所述脉冲宽度调制信号通过所述电阻R1接入滤波电路,滤波后的所述阈值电压通过所述电阻R4的末端输出。According to an embodiment of the present application, the fourth-order filter circuit includes four resistors R1, R2, R3, and R4 connected in series, wherein the resistor R1 and the resistor R2 are connected to each other through a capacitor C1 and grounded. The resistor R2 and the resistor R3 are connected to the ground through a capacitor C2, the resistor R3 and the resistor R4 are connected to the ground through a capacitor C3, and the end of the resistor R4 is connected to the ground through the capacitor C4. The pulse width modulation signal is connected to a filter circuit through the resistor R1, and the filtered threshold voltage is output through an end of the resistor R4.
根据本申请的一个实施例,所述比较器为低压差分信号比较器。According to an embodiment of the present application, the comparator is a low-voltage differential signal comparator.
根据本申请的一个实施例,所述时间数字转换单元包括一个第一计数器和一个第二计数器,所述第一计数器输出的第一时间值和所述第二计数器输出的第二时间值合并以得到闪烁脉冲信号的边沿到达时间,所述时间数字转换单元根据闪烁脉冲信号的边沿到达时间和阈值电压信号进行比较,记录下高、低电平状态跳变时对应的时间信息和该时间信息对应的阈值电压信息。According to an embodiment of the present application, the time-to-digital conversion unit includes a first counter and a second counter, and the first time value output by the first counter and the second time value output by the second counter are combined to The edge arrival time of the flicker pulse signal is obtained. The time-digital conversion unit compares the edge arrival time of the flicker pulse signal with the threshold voltage signal, and records the time information corresponding to the high and low level state transitions and the time information. Threshold voltage information.
本申请提供的闪烁脉冲数字化的方法及装置,通过FPGA产生PWM信号,经过电阻电容搭建的多阶RC滤波电路后产生直流阈值电压信号,以此替代DAC部分的电路功能,完成MVT采样。相对于传统MVT采样电路,因为通过后端的FPGA和少数的电阻电容搭建多阶RC滤波电路来产生阈值电压信号,省去了DAC和电压基准源电路,从而仅依靠FPGA就可完成闪烁脉冲的数字化采样,使得整个电路结构变得精简。同时从性能上而言,PWM信号经过一个4阶RC低通滤波电路(其组成为4个电阻和4个电容)产生的直流阈值电压信号的质量和12位精度的DAC的输出相当,而电阻电容为非常常见的基本电子元器件且价格低廉,通常1颗电阻或者电容的售价0.001美元左右,因此其单通道成本为0.001*8*4=0.032美元左右,相对于单通道DAC而言成本可大幅度降低成本,同时降低系统功耗和PCB电路面积。The method and device for digitizing the flicker pulse provided in the present application generate a PWM signal through an FPGA and generate a DC threshold voltage signal after a multi-stage RC filter circuit constructed by a resistor and a capacitor, thereby replacing the circuit function of the DAC part and completing the MVT sampling. Compared with the traditional MVT sampling circuit, because the multi-stage RC filter circuit is built by the back-end FPGA and a small number of resistors and capacitors to generate the threshold voltage signal, the DAC and voltage reference circuit are eliminated, and the flicker pulse can be digitized by using the FPGA alone Sampling makes the whole circuit structure simple. At the same time, in terms of performance, the quality of the DC threshold voltage signal generated by the PWM signal through a 4th-order RC low-pass filter circuit (which is composed of 4 resistors and 4 capacitors) is equivalent to the output of a 12-bit precision DAC. Capacitors are very common basic electronic components and are inexpensive. Usually a resistor or capacitor is priced at about 0.001 USD, so its single channel cost is about 0.001 * 8 * 4 = 0.032 USD, which is relative to the cost of a single channel DAC. Can greatly reduce costs, while reducing system power consumption and PCB circuit area.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the technical solutions in the embodiments of the present application or the prior art more clearly, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings in the following description are merely These are some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained according to these drawings without paying creative labor.
图1是根据现有技术的多阈值电压采样应用电路的结构示意图;1 is a schematic structural diagram of a multi-threshold voltage sampling application circuit according to the prior art;
图2是根据本申请的一个优选实施例的闪烁脉冲数字化的方法的步骤示意图;2 is a schematic diagram of steps of a method for digitizing a flicker pulse according to a preferred embodiment of the present application;
图3为根据本申请的一个实施例的闪烁脉冲数字化的装置中采用的四阶RC滤波电路示意图;3 is a schematic diagram of a fourth-order RC filter circuit used in a device for digitizing a flicker pulse according to an embodiment of the present application;
图4是根据图2的闪烁脉冲数字化的装置的结构示意图。FIG. 4 is a schematic structural diagram of a device for digitizing a flicker pulse according to FIG. 2.
具体实施方式detailed description
以下结合具体实施例,对本申请做进一步说明。应理解,以下实施例仅用于说明本申请而非用于限制本申请的范围。The following further describes this application with reference to specific embodiments. It should be understood that the following examples are only used to illustrate the present application and not to limit the scope of the present application.
需要说明的是,当元件被称为“设置在”另一个元件上,它可以直接设置在另一个元件上或者也可以存在居中的元件。当元件被称为“连接/联接”至另一个元件,它可以是直接连接/联接至另一个元件或者可能同时存在居中元件。本文所使用的术语“连接/联接”可以包括电气和/或机械物理连接/联接。本文所使用的术语“包括/包含”指特征、步骤或元件的存在,但并不排除一个或更多个其它特征、步骤或元件的存在或添加。本文所使用的术语“和/或”包括一个或多个相关所列项目的任意的和所有的组合。It should be noted that when an element is referred to as being “disposed on” another element, it may be directly disposed on another element or a centered element may exist. When an element is referred to as being "connected / coupled" to another element, it can be directly connected / coupled to the other element or intervening elements may be concurrently present. The term "connected / coupled" as used herein may include electrical and / or mechanical physical connections / couplings. The term "including / comprising" as used herein refers to the presence of a feature, step, or element, but does not exclude the presence or addition of one or more other features, steps, or elements. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.
除非另有定义,本文所使用的所有的技术和科学术语与属于本申请的技术领域的技术人员通常理解的含义相同。本文中所使用的术语只是为了描述具体实施例的目的,而并不是旨在限制本申请。Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the application.
需要说明的是,在本申请中,术语“输入端”和“输出端”也可以分别称为“输入接口”和“输出接口”。It should be noted that, in this application, the terms “input terminal” and “output terminal” may also be referred to as “input interface” and “output interface”, respectively.
图2为根据本申请的一个优选实施例的闪烁脉冲数字化的方法的步骤示意图,由图2可知,本申请提供的闪烁脉冲数字化的方法包括以下步骤:FIG. 2 is a schematic diagram of steps of a method for digitizing a flicker pulse according to a preferred embodiment of the present application. As can be seen from FIG. 2, the method for digitizing a flicker pulse provided by the present application includes the following steps:
步骤S1:根据MVT采样需求,设置n个理论阈值电压,将n个理论阈值电压分别记为V1、V2、V3、……、Vn,其中,n为自然数;Step S1: Set n theoretical threshold voltages according to the MVT sampling requirements, and record the n theoretical threshold voltages as V1, V2, V3, ..., Vn, where n is a natural number;
在步骤S1中,MVT采样需求通常是指为了实现空间分辨率、时间分辨率和能量分辨率等需求中的一种和/或几种,对于不同的MVT采样需求,可以通过在MVT采样时设置不同的理论阈值电压大小、理论阈值电压数量、采样时间等参数而实现。In step S1, the MVT sampling requirement generally refers to one and / or several requirements for achieving spatial resolution, temporal resolution, and energy resolution. For different MVT sampling requirements, you can set them during MVT sampling. Different theoretical threshold voltage size, theoretical threshold voltage number, sampling time and other parameters are implemented.
进一步地,本领域技术人员可以根据已经采集的大量阈值电压时间对的数据建立数据库,并根据采集的阈值电压-时间对的数据进行波形重建,获 取重建波形,从而提取闪烁脉冲的空间分辨率、时间分辨率和能量分辨率等信息,在数据库的基础上,本领域技术人员为了获得更准确的信息,可以根据从数据库获取的经验信息合理的设置MVT采样的理论阈值电压大小、理论阈值电压数量、采样时间等参数,以满足不同的能量、时间分辨率和能量分辨率等需求。Further, those skilled in the art may establish a database based on data of a large number of threshold voltage-time pairs that have been collected, and perform waveform reconstruction based on the collected data of the threshold voltage-time pairs, to obtain a reconstructed waveform, thereby extracting the spatial resolution of the flicker pulse, Information such as time resolution and energy resolution. On the basis of the database, in order to obtain more accurate information, those skilled in the art can reasonably set the theoretical threshold voltage and theoretical threshold voltage of MVT sampling based on the empirical information obtained from the database. , Sampling time and other parameters to meet different energy, time resolution and energy resolution requirements.
在步骤S1中,理论阈值电压的设置可以通过下述方法完成:确定待采样的闪烁脉冲信号的电压幅值范围,根据待采样闪烁脉冲信号的电压幅值选择不同幅值的理论阈值电压,使得所有理论阈值电压均位于待采样的闪烁脉冲信号的幅值范围之内;或者根据待采样闪烁脉冲信号的电压幅值选择不同幅值的理论阈值电压,使得所设置的理论阈值电压中至少有一个位于待采样的闪烁脉冲信号的幅值范围之内。In step S1, the setting of the theoretical threshold voltage may be completed by determining the voltage amplitude range of the flicker pulse signal to be sampled, and selecting a theoretical threshold voltage of different amplitude according to the voltage amplitude of the flicker pulse signal to be sampled, so that All theoretical threshold voltages are within the amplitude range of the flicker pulse signal to be sampled; or different theoretical threshold voltages of different amplitudes are selected according to the voltage amplitude of the flicker pulse signal to be sampled, so that at least one of the set theoretical threshold voltages is set Within the amplitude range of the flicker pulse signal to be sampled.
步骤S2:根据步骤S1中设置的理论阈值电压的值计算出脉冲宽度调制(pulse width modulation,简称PWM)特性,利用FPGA的输入/输出端口(又称为I/O端口)分别根据PWM特性来产生与理论阈值电压对应的n路PWM信号,分别记为P1、P2、P3、……、Pn;Step S2: Calculate the pulse width modulation (PWM) characteristics according to the theoretical threshold voltage value set in step S1, and use the input / output ports (also known as I / O ports) of the FPGA according to the PWM characteristics. Generate n PWM signals corresponding to the theoretical threshold voltage, and record them as P1, P2, P3, ..., Pn, respectively;
在步骤S2中,根据步骤S1中设置的理论阈值电压的值计算PWM特性的具体方法包括:In step S2, the specific method for calculating the PWM characteristic according to the value of the theoretical threshold voltage set in step S1 includes:
步骤S21:根据理论阈值电压确定待产生PWM信号对应的输出端口的电平Vpwm;Step S21: Determine the level Vpwm of the output port corresponding to the PWM signal to be generated according to the theoretical threshold voltage;
步骤S22:按照下述公式计算出PWM信号的占空比D,Step S22: Calculate the duty cycle D of the PWM signal according to the following formula.
D=Vn/Vpwm,D = Vn / Vpwm,
该占空比D表示输出端口输出的信号在1个周期内高电平的持续时间占整个信号时间的百分比;The duty ratio D indicates the duration of the high level of the signal output by the output port in one cycle as a percentage of the total signal time;
步骤S23,确定待产生的PWM信号的PWM特性为:占空比D,最大幅值Vpwm(即输出端口的电平)。In step S23, it is determined that the PWM characteristics of the PWM signal to be generated are: the duty ratio D and the maximum amplitude Vpwm (that is, the level of the output port).
进一步地,以下举例说明PWM特性的计算方法:若步骤S1中设置的理论阈值电压为1.65V,即步骤S2中需要利用FPGA产生的理论阈值电压为1.65V,根据FPGA的自身特性可知FPGA的I/O端口的电平为3.3V,即待产生PWM信号对应的输出端口的电平为3.3V,则经过计算后的占空比D=1.65V/3.3V=50%,此时1.65V的理论阈值电压对应的PWM信号的PWM特性为:占空比50%,最大幅值3.3V。Further, the following illustrates the calculation method of the PWM characteristics. If the theoretical threshold voltage set in step S1 is 1.65V, that is, the theoretical threshold voltage generated by the FPGA in step S2 is 1.65V. According to the characteristics of the FPGA, the I of the FPGA can be known. The level of the / O port is 3.3V, that is, the level of the output port corresponding to the PWM signal to be generated is 3.3V, then the calculated duty cycle D = 1.65V / 3.3V = 50%, at this time the 1.65V The PWM characteristics of the PWM signal corresponding to the theoretical threshold voltage are: a duty cycle of 50% and a maximum amplitude of 3.3V.
在步骤S2中,利用FPGA的I/O端口产生PWM信号的具体方法为:根据FPGA的输出端口的电平Vpwm,理论阈值电压Vn,计算出的PWM信号的占空比D,利用FPGA内部的定时器单元控制单个信号的周期和高电平持续时间,此时输出的信号即为满足占空比需求的PWM信号。In step S2, a specific method for generating a PWM signal by using the I / O port of the FPGA is: According to the level Vpwm of the output port of the FPGA, the theoretical threshold voltage Vn, the calculated duty cycle D of the PWM signal is used. The timer unit controls the period and high-level duration of a single signal. At this time, the output signal is a PWM signal that meets the duty cycle requirements.
进一步地,以下举例说明PWM信号的产生方法:假设FPGAN内部使用12位的定时器单元,每个定时器单元的周期为T,则一个PWM信号的周期为212×T=4096T,产生高电平的时间设置为TH=4096T×D,产生低电平的时间为TL=4096T×(1-D)。Further, the following example illustrates the method of generating a PWM signal: assuming that 12-bit timer units are used internally in FPGAN, and the period of each timer unit is T, then the period of a PWM signal is 212 × T = 4096T, which generates a high level The time is set to TH = 4096T × D, and the time to generate a low level is TL = 4096T × (1-D).
步骤S3:将步骤S2中产生的n路PWM信号输入n路滤波电路,产生对应的n个阈值电压信号并分别记为Vt1、Vt2、Vt3、……、Vtn;Step S3: input the n PWM signals generated in step S2 to the n filter circuits, generate corresponding n threshold voltage signals and record them as Vt1, Vt2, Vt3, ..., Vtn;
在上述步骤S3中,将步骤S2中产生的n路PWM信号输入m阶滤波电路的具体方法可以是在PWM信号后端直接接入滤波电路,也可以是在PWM信号后通过其它的滤波处理后再接入滤波电路。In the above step S3, the specific method for inputting the n-channel PWM signals generated in step S2 into the m-order filter circuit may be directly connected to the filter circuit at the back end of the PWM signal, or after the PWM signal is passed through other filtering processes. Then access the filter circuit.
图3为根据本申请的一个实施例的m阶滤波电路的示意图,其中m=4,由图3可知,该4阶滤波电路包括依次串联的四个电阻R1、R2、R3和R4,产生的PWM信号通过电阻R1接入滤波电路,其中,电阻R1和电阻R2之间通过电容C1连接后接地,电阻R2和电阻R3之间通过电容C2连接后接地,电阻R3和电阻R4之间通过电容C3连接后接地,电阻R4的末端通过电容C4连接后接地,电阻R4的末端还负责输出滤波后的阈值电压。滤波电路对PWM信号进行滤波,过滤到PWM信号中的高频信号,使纹波变小,输出变得平稳。FIG. 3 is a schematic diagram of an m-order filter circuit according to an embodiment of the present application, where m = 4. As can be seen from FIG. 3, the 4-order filter circuit includes four resistors R1, R2, R3, and R4 connected in series. The PWM signal is connected to the filter circuit through the resistor R1. Among them, the resistor R1 and the resistor R2 are connected to the ground through the capacitor C1, the resistor R2 and the resistor R3 are connected to the ground through the capacitor C2, and the resistor R3 and the resistor R4 are connected through the capacitor C3. After connecting, it is grounded. The end of resistor R4 is connected to ground through capacitor C4. The end of resistor R4 is also responsible for outputting the filtered threshold voltage. The filter circuit filters the PWM signal and filters the high-frequency signal in the PWM signal to make the ripple smaller and the output smooth.
步骤S4:将待采样的闪烁脉冲信号和n个阈值电压信号Vt1、Vt2、Vt3、……、Vtn分别输入到FPGA的n个比较器进行电压比较;Step S4: input the flicker pulse signal to be sampled and the n threshold voltage signals Vt1, Vt2, Vt3, ..., Vtn to the n comparators of the FPGA respectively for voltage comparison;
在步骤S4中,比较器可以采用任何满足要求的电压比较器,优选地采用LVDS比较器,LVDS比较器相比常规的电压比较器芯片,具有低成本,高集成度,低功耗等优点。比如,常规的FPGA芯片均具备LVDS端口,且数量较多。In step S4, the comparator can be any voltage comparator that meets the requirements, preferably an LVDS comparator. Compared with a conventional voltage comparator chip, the LVDS comparator has the advantages of low cost, high integration, and low power consumption. For example, conventional FPGA chips have LVDS ports, and the number is large.
步骤S5:利用FPGA内部的时间数字转换单元并根据n个所述比较器的比较结果来采集阈值电压-时间对;Step S5: use a time-to-digital conversion unit inside the FPGA to collect threshold voltage-time pairs according to the comparison results of the n comparators;
在步骤S5中,时间数字转换单元可通过FPGA内部的逻辑单元形成,时间数字转换单元的功能是测量闪烁脉冲信号的边沿到达时间(包括上升沿 和下降沿)并且判断闪烁脉冲信号何时为高电平,何时为低电平,进而控制采集数据。时间数字转换单元可以包括一个粗计数器(第一计数器)和一个细计数器(第二计数器),粗计数器输出的粗时间值(第一时间值)和细计数器输出的细时间值(第二时间值)按一定的关系合并,即可得到闪烁脉冲信号的边沿到达时间,时间数字转换单元将闪烁脉冲信号的边沿到达时间和阈值电压信号进行比较,记录下高、低电平状态跳变时对应的时间信息和该时间信息对应的阈值电压信息,从而形成闪烁脉冲信号的阈值电压-时间对。In step S5, the time-to-digital conversion unit may be formed by a logic unit inside the FPGA. The function of the time-to-digital conversion unit is to measure the edge arrival time (including rising and falling edges) of the flicker pulse signal and determine when the flicker pulse signal is high. Level and when it is low to control the collected data. The time-to-digital conversion unit may include a coarse counter (first counter) and a fine counter (second counter). The coarse time value (first time value) output by the coarse counter and the fine time value (second time value) output by the fine counter. ) According to a certain relationship, the edge arrival time of the flicker pulse signal can be obtained. The time-digital conversion unit compares the edge arrival time of the flicker pulse signal with the threshold voltage signal, and records the corresponding response when the high and low state transitions. The time information and the threshold voltage information corresponding to the time information form a threshold voltage-time pair of the flicker pulse signal.
具体地,粗计数器由一个时钟信号驱动,每过一个时钟周期,粗计数器输出的计数值加1,将当前的计数值乘以一个时钟周期可得到当前的粗时间。当触发信号s的边沿到来时,时间-数字转换器记录下此刻粗计数器输出的计数值,并记为N。若时钟周期记为Tc,那么触发信号s的边沿到达的粗时间可以表示为N*Tc。粗计数器的时间测量精度是以时钟周期为单位的,但对于FPGA而言,时钟信号的频率不能无限制提高,若要进一步提高时间测量精度,就需要引入细计数器。细计数器的实现基于一条输出温度码的延迟线,温度码包括若干个0和1,延迟线上的温度码的特点是一侧全是0,另一侧全是1,0和1的数目存在此消彼长的关系,并且0的数目和1的数目之和等于温度码的总长,比如,1110000为由3个1和5个0组成的一段温度码,0和1的交界代表待测信号的边沿,通过数0或1的个数,再乘以每个0或1代表的时间长度,就能计算出待测信号的边沿在延迟线上传输的细时间。因此,触发信号s的边沿到达时间就等于粗时间与细时间之和。借助延迟线,时间-数字转换器的时间测量精度可以提高到优于100皮秒。Specifically, the coarse counter is driven by a clock signal, and after each clock cycle, the count value output by the coarse counter is increased by 1, and the current coarse value is obtained by multiplying the current count value by one clock cycle. When the edge of the trigger signal s comes, the time-to-digital converter records the count value of the coarse counter output at this moment, and records it as N. If the clock period is recorded as Tc, the coarse time of the edge arrival of the trigger signal s can be expressed as N * Tc. The time measurement accuracy of the coarse counter is based on the clock cycle, but for FPGAs, the frequency of the clock signal cannot be increased without limit. To further improve the time measurement accuracy, a fine counter needs to be introduced. The implementation of the fine counter is based on a delay line that outputs a temperature code. The temperature code includes several 0s and 1. The temperature code on the delay line is characterized by all 0s on one side and 1,0 and 1 on the other side. The relationship between the elimination of each other, and the sum of the number of 0s and the number of 1s is equal to the total length of the temperature code. For example, 1110000 is a piece of temperature code composed of 3 1s and 5 0s. By counting the number of 0 or 1, and multiplying the length of time represented by each 0 or 1, the fine time of the edge of the signal to be measured on the delay line can be calculated. Therefore, the edge arrival time of the trigger signal s is equal to the sum of the coarse time and the fine time. With the help of a delay line, the time measurement accuracy of the time-to-digital converter can be improved to better than 100 picoseconds.
更具体地,时钟分配装置使用FPGA上的逻辑单元组成延迟线,延迟线的本质是由若干个全加器组成的串行加法器,每个全加器都有进位输入和输出的端口,这些端口首尾相连,上一级全加器的进位输出连接到下一级全加器的进位输入。为了描述的方便,比如,串行加法器的位宽为8比特,该串行加法器具有两个输入,其中一个输入设为8位二进制常数11111111,另一个输入为数字化后的待测信号(比如触发信号s),不足8比特的部分用0补齐。当待测信号的上升沿到来时,待测信号的数字电平从0变到1,串行加法器的计算结果不是立刻变为全0,首先离待测信号最近的那个全加器的计算结果变成0,然后这个全加器的进位信号由0变成1并传递到下一级;随后位于第二级的全加器的计算结果变成0,其进位信号由0变成1,再传递 到下一级,以此类推。进位信号的传递需要时间,从第n级全加器产生进位信号到第n+1级全加器产生进位信号间隔的时间通常小于100皮秒,且进位信号每传递一级,温度码包含0的个数就加1。More specifically, the clock distribution device uses logic units on the FPGA to form a delay line. The essence of a delay line is a serial adder composed of several full adders. Each full adder has ports for carry inputs and outputs. These The ports are connected end to end, and the carry output of the full adder in the upper stage is connected to the carry input of the full adder in the next stage. For convenience of description, for example, the bit width of the serial adder is 8 bits. The serial adder has two inputs, one of which is set to an 8-bit binary constant 11111111, and the other is a digitized signal to be tested ( For example, the trigger signal s), the part less than 8 bits is filled with 0. When the rising edge of the signal to be measured arrives, the digital level of the signal to be measured changes from 0 to 1, the calculation result of the serial adder does not immediately become all 0, the calculation of the full adder closest to the signal to be measured first The result becomes 0, and then the carry signal of this full adder changes from 0 to 1 and is passed to the next stage; the calculation result of the full adder in the second stage then becomes 0, and its carry signal changes from 0 to 1. Then pass to the next level, and so on. The transfer of the carry signal takes time. The time from the n-th full adder to the carry signal to the n + 1 th full adder to generate the carry signal is usually less than 100 picoseconds, and the temperature code contains 0 for each level of the carry signal. Add 1 to the number.
同理,当待测信号的数字电平从1变到0时,串行加法器的计算结果不是立刻变为全1,首先离待测信号最近的那个全加器的计算结果变成1,其进位信号由1变成0并传递到下一级,直到所有的全加器的计算结果都变成1。Similarly, when the digital level of the signal to be measured changes from 1 to 0, the calculation result of the serial adder does not immediately become all 1, the calculation result of the full adder closest to the signal to be measured first becomes 1, Its carry signal is changed from 1 to 0 and passed to the next stage until the calculation result of all full adders becomes 1.
时间数字转换单元使用一个时钟信号(和粗计数器的时钟信号相同)采样延迟线输出的温度码。当某一时刻温度码的最高位(MSB)一侧是1,最低位(LSB)一侧为0时,表明信号的上升沿被探测到,统计延迟线上输出的温度码中0的个数作为细计数的数值。当某一时刻温度码的最高位(MSB)一侧是0,最低位(LSB)一侧为1时,表明信号的下降沿被探测到,统计延迟线上输出的温度码中1的个数作为细计数。对于8位温度码,温度码包含的1或0的个数是0到8,可以用一个4比特的二进制数表示,但在本申请实际的实现过程中,时间-数字转换器使用128位温度码,温度码包含的1或0的个数是0到128,用一个8比特的二进制数表示。上述温度码到细计数的转换过程由编码器完成。The time-to-digital conversion unit uses a clock signal (same as the clock signal of the coarse counter) to sample the temperature code output from the delay line. When the most significant bit (MSB) side of the temperature code is 1 and the least significant bit (LSB) side is 0, it indicates that the rising edge of the signal is detected, and the number of 0 in the temperature code output on the delay line is counted. The value as a fine count. When the most significant bit (MSB) side of the temperature code is 0 and the least significant bit (LSB) side is 1, it indicates that the falling edge of the signal is detected, and the number of 1 in the temperature code output on the delay line is counted. As a fine count. For an 8-bit temperature code, the number of 1 or 0 contained in the temperature code is 0 to 8, which can be represented by a 4-bit binary number, but in the actual implementation process of this application, the time-to-digital converter uses a 128-bit temperature Code, the temperature code contains 1 or 0, the number is 0 to 128, expressed by an 8-bit binary number. The above conversion process of temperature code to fine count is completed by the encoder.
对于每个触发信号s的边沿,时间数字转换单元都会给出一个粗计数和细计数。触发信号s的边沿到达时间T=Tc×N-To×M,其中,粗时间为Tc×N,细时间为To×M;Tc为一个时钟周期,是已知值;N是粗计数的计数值;To是延迟线上每一级温度码进位的平均时间;M是细计数的计数值。For each edge of the trigger signal s, the time-to-digital conversion unit will give a coarse count and a fine count. The edge arrival time of the trigger signal s is T = Tc × N-To × M, where the coarse time is Tc × N and the fine time is To × M; Tc is one clock cycle, which is a known value; N is the count of the coarse count Value; To is the average time of each temperature code carry on the delay line; M is the count value of the fine count.
步骤S6:反复进行上述步骤S1-步骤S5以获得闪烁脉冲信号的阈值电压时间对,完成闪烁脉冲信号的数字化。Step S6: Repeat the above steps S1-S5 to obtain the threshold voltage time pair of the flicker pulse signal, and complete the digitization of the flicker pulse signal.
在步骤S6中,闪烁脉冲的阈值电压时间对可以包括闪烁脉冲信号分别在各个采样点所对应的阈值电压和时间,也可以包括在经过数次采样后在各个采样点所对应的阈值电压和时间的平均值。In step S6, the threshold voltage time pair of the flicker pulse may include the threshold voltage and time corresponding to the flicker pulse signal at each sampling point, and may also include the threshold voltage and time corresponding to each sampling point after several samplings. average of.
图4为采用上述方法的闪烁脉冲数字化的装置的结构示意图,由图4可知,该装置包括FPGA10,FPGA10中具有采用自身逻辑单元形成的比较器11和时间数字转换单元12,比较器11与时间数字转换单元12通信连接,外部待采样的闪烁脉冲信号通过接口输入比较器11,FPGA10通过I/O端口13向与其通信连接的滤波电路20发送PWM信号,滤波电路20与比较器 11的另一个端口通信连接并向比较器11发送阈值电压信号。FIG. 4 is a schematic structural diagram of a device for digitizing a flicker pulse using the above method. As can be seen from FIG. 4, the device includes FPGA 10, and the FPGA 10 has a comparator 11 and a time-to-digital conversion unit 12 formed by using its own logic unit. The comparator 11 and time The digital conversion unit 12 is communicatively connected. The flicker pulse signal to be sampled externally is input to the comparator 11 through the interface. The FPGA 10 sends a PWM signal to the filter circuit 20 connected to the FPGA 11 through the I / O port 13. The filter circuit 20 and the other of the comparator 11 are PWM signals. The port is communicatively connected and sends a threshold voltage signal to the comparator 11.
具体地,根据本申请的一个实施例,FPGA10被配置为可以根据MVT采样需求,设置n个理论阈值电压,这n个理论阈值电压分别记为V1、V2、V3、……、Vn,其中,n为自然数。Specifically, according to an embodiment of the present application, the FPGA 10 is configured to set n theoretical threshold voltages according to MVT sampling requirements, and the n theoretical threshold voltages are respectively denoted as V1, V2, V3, ..., Vn, where: n is a natural number.
MVT采样需求通常是指为了实现空间分辨率、时间分辨率和能量分辨率等需求中的一种和/或几种,对于不同的MVT采样需求,可以通过在MVT采样时设置不同的理论阈值电压大小、理论阈值电压数量、采样时间等参数而实现。MVT sampling requirements generally refer to one and / or several of the requirements of spatial resolution, time resolution, and energy resolution. For different MVT sampling requirements, different theoretical threshold voltages can be set during MVT sampling Size, theoretical threshold voltage, sampling time and other parameters.
进一步地,本领域技术人员可以根据已经采集的大量阈值电压时间对的数据建立数据库,并根据采集的阈值电压时间对的数据进行波形重建,获取重建波形,从而提取闪烁脉冲的空间分辨率、时间分辨率和能量分辨率等信息,在数据库的基础上,本领域技术人员为了获得更准确的信息,可以根据从数据库获取的经验信息合理的设置MVT采样的理论阈值电压大小、理论阈值电压数量、采样时间等参数,以满足不同的能量、时间分辨率和能量分辨率等需求。Further, a person skilled in the art may establish a database based on data of a large number of threshold voltage time pairs that have been collected, and perform waveform reconstruction based on the collected data of the threshold voltage time pairs, to obtain a reconstructed waveform, thereby extracting the spatial resolution and time of the flicker pulse. Information such as resolution and energy resolution. On the basis of the database, in order to obtain more accurate information, those skilled in the art can reasonably set the theoretical threshold voltage magnitude, theoretical threshold voltage number, Sampling time and other parameters to meet different energy, time resolution and energy resolution requirements.
理论阈值电压的确定可以通过下述方法完成:确定待采样的闪烁脉冲信号的电压幅值范围,根据待采样闪烁脉冲信号的电压幅值选择不同幅值的理论阈值电压,使得所有理论阈值电压均位于待采样的闪烁脉冲信号的幅值范围之内;或者根据待采样闪烁脉冲信号的电压幅值选择不同幅值的理论阈值电压,使得所设置的理论阈值电压中至少有一个位于待采样的闪烁脉冲信号的幅值范围之内。The determination of the theoretical threshold voltage can be accomplished by: determining the voltage amplitude range of the flicker pulse signal to be sampled, and selecting the theoretical threshold voltage of different amplitudes according to the voltage amplitude of the flicker pulse signal to be sampled, so that all the theoretical threshold voltages are equal; Is located within the amplitude range of the flicker pulse signal to be sampled; or a theoretical threshold voltage of different amplitude is selected according to the voltage amplitude of the flicker pulse signal to be sampled, so that at least one of the set theoretical threshold voltages is located in the flicker to be sampled Within the amplitude of the pulse signal.
根据本申请的一个实施例,FPGA10的性能参数可以配置为具有114480个逻辑单元,用户可用I/O端口数量为528,LVDS端口数量高达230对。According to an embodiment of the present application, the performance parameters of the FPGA 10 can be configured to have 114480 logic units, the number of user-available I / O ports is 528, and the number of LVDS ports is up to 230 pairs.
根据本申请的一个实施例,FPGA10可以被配置为可以根据上述理论阈值电压Vn的值计算出脉冲信号的PWM特性,同时FPGA10的I/O端口13被配置为可产生与不同的理论阈值电压对应的n路PWM信号,分别记为P1、P2、P3、……、Pn,I/O端口13向滤波电路20发送PWM信号。According to an embodiment of the present application, the FPGA 10 may be configured to calculate a PWM characteristic of a pulse signal according to the value of the theoretical threshold voltage Vn, and the I / O port 13 of the FPGA 10 is configured to generate a signal corresponding to a different theoretical threshold voltage. The n-channel PWM signals are denoted as P1, P2, P3, ..., Pn, respectively, and the I / O port 13 sends a PWM signal to the filter circuit 20.
计算PWM特性的具体过程为:按照公式D=Vn/Vpwm计算出PWM信号的占空比D,该占空比D表示输出端口输出的信号在1个周期内高电平的持续时间占整个信号时间的百分比;从而确定待产生的PWM信号的PWM特性为:占空比D,最大幅值Vpwm(即输出端口的电平)。The specific process of calculating the PWM characteristics is: Calculate the duty cycle D of the PWM signal according to the formula D = Vn / Vpwm. The duty cycle D indicates that the duration of the high level of the signal output by the output port in a period accounts for the entire signal. The percentage of time; thereby determining the PWM characteristics of the PWM signal to be generated: the duty cycle D, the maximum amplitude Vpwm (that is, the level of the output port).
FPGA的I/O端口产生PWM信号的具体过程为:根据计算出的PWM信号的占空比D,FPGA利用内部的定时器单元控制单个信号的周期和高电平持续时间,此时通过I/O端口输出的信号即为满足占空比需求的PWM信号。The specific process of the FPGA I / O port generating a PWM signal is: According to the calculated duty cycle D of the PWM signal, the FPGA uses the internal timer unit to control the period and high-level duration of a single signal. The signal output from the O port is a PWM signal that meets the duty cycle requirements.
根据本申请的一个实施例,滤波电路20被配置为根据n路PWM信号产生对应的n个直流形式的阈值电压Vt1、Vt2、Vt3、……、Vtn,同时滤波电路20向比较器11发送阈值电压信号。According to an embodiment of the present application, the filter circuit 20 is configured to generate corresponding n DC-shaped threshold voltages Vt1, Vt2, Vt3,..., Vtn according to n PWM signals, and the filter circuit 20 sends the threshold to the comparator 11 at the same time. Voltage signal.
根据本申请的一个实施例,滤波电路20采用四阶电阻电容搭建的RC滤波电路(resistance-capacitance circuits),如图3所示,该4阶滤波电路包括四个依次串联的电阻R1、R2、R3和R4,产生的PWM信号通过电阻R1接入滤波电路,其中,电阻R1和电阻R2之间通过电容C1连接后接地,电阻R2和电阻R3之间通过电容C2连接后接地,电阻R3和电阻R4之间通过电容C3连接后接地,电阻R4的末端通过电容C4连接后接地,电阻R4的末端还负责输出滤波后的阈值电压。滤波电路对PWM信号进行滤波,过滤到PWM信号中的高频信号,使纹波变小,输出变得平稳。另外,RC滤波电路还具有结构简单、价格低廉、性能优异且易实现等诸多优点。According to an embodiment of the present application, the filter circuit 20 uses RC filter circuits (resistance-capacitance circuits) constructed by fourth-order resistors and capacitors. As shown in FIG. 3, the fourth-order filter circuit includes four resistors R1, R2, which are connected in series in order. R3 and R4. The generated PWM signal is connected to the filter circuit through resistor R1. Among them, resistor R1 and resistor R2 are connected to ground through capacitor C1, and resistor R2 and resistor R3 are connected to ground through capacitor C2. Resistor R3 and resistor R4 is connected to ground through capacitor C3, and the end of resistor R4 is connected to ground through capacitor C4. The end of resistor R4 is also responsible for outputting the filtered threshold voltage. The filter circuit filters the PWM signal and filters the high-frequency signal in the PWM signal to make the ripple smaller and the output smooth. In addition, the RC filter circuit also has many advantages such as simple structure, low price, excellent performance and easy implementation.
本领域技术人员应当理解的是,FPGA10可通过端口13将n路PWM信号输入m阶滤波电路,也可以在端口13和滤波电路20之间采用其它的滤波处理后再接入滤波电路20,在此不再赘述。Those skilled in the art should understand that the FPGA 10 can input n-channel PWM signals to the m-order filter circuit through the port 13 or use other filtering processing between the port 13 and the filter circuit 20 and then access the filter circuit 20. This will not be repeated here.
FPGA10中的比较器11可以采用任何满足要求的电压比较器,优选地采用LVDS比较器,LVDS比较器相比常规的电压比较器芯片,具有低成本,高集成度,低功耗等优点。比如,常规的FPGA芯片均具备LVDS端口,且数量较多。The comparator 11 in the FPGA 10 can use any voltage comparator that meets the requirements, preferably an LVDS comparator. Compared with a conventional voltage comparator chip, the LVDS comparator has the advantages of low cost, high integration, and low power consumption. For example, conventional FPGA chips have LVDS ports, and the number is large.
FGPA中的时间数字转换单元12可通过FPGA内部的逻辑单元形成,时间数字转换单元12被配置为测量闪烁脉冲信号的边沿到达时间(包括上升沿和下降沿)并且判断闪烁脉冲信号何时为高电平,何时为低电平,进而控制采集数据。时间数字转换单元12可以包括一个粗计数器(第一计数器,图中未示)和一个细计数器(第二计数器,图中未示),粗计数器输出的粗时间值(第一时间值)和细计数器输出的细时间值(第二时间值)按一定的关系合并,即可得到闪烁脉冲信号的边沿到达时间,时间数字转换单元将闪烁脉冲信号的边沿到达时间和阈值电压信号进行比较,记录下高、低电平状 态跳变时对应的时间信息和该时间信息对应的阈值电压信息,从而形成闪烁脉冲信号的阈值电压-时间对。The time-to-digital conversion unit 12 in FGPA can be formed by a logic unit inside the FPGA. The time-to-digital conversion unit 12 is configured to measure the edge arrival time (including rising and falling edges) of the flicker pulse signal and determine when the flicker pulse signal is high. Level and when it is low to control the collected data. The time-to-digital conversion unit 12 may include a coarse counter (first counter, not shown in the figure) and a fine counter (second counter, not shown in the figure). The coarse time value (first time value) and fine The fine time value (second time value) output by the counter is combined according to a certain relationship to obtain the edge arrival time of the flicker pulse signal. The time-digital conversion unit compares the edge arrival time of the flicker pulse signal with the threshold voltage signal and records it. The time information corresponding to the high and low state transitions and the threshold voltage information corresponding to the time information form a threshold voltage-time pair of the flicker pulse signal.
具体地,粗计数器由一个时钟信号驱动,每过一个时钟周期,粗计数器输出的计数值加1,将当前的计数值乘以一个时钟周期可得到当前的粗时间。当触发信号s的边沿到来时,时间-数字转换器记录下此刻粗计数器输出的计数值,并记为N。若时钟周期记为Tc,那么触发信号s的边沿到达的粗时间可以表示为N*Tc。粗计数器的时间测量精度是以时钟周期为单位的,但对于FPGA而言,时钟信号的频率不能无限制提高,若要进一步提高时间测量精度,就需要引入细计数器。细计数器的实现基于一条输出温度码的延迟线,温度码包括若干个0和1,延迟线上的温度码的特点是一侧全是0,另一侧全是1,0和1的数目存在此消彼长的关系,并且0的数目和1的数目之和等于温度码的总长,比如,1110000为由3个1和5个0组成的一段温度码,0和1的交界代表待测信号的边沿,通过数0或1的个数,再乘以每个0或1代表的时间长度,就能计算出待测信号的边沿在延迟线上传输的细时间。因此,触发信号s的边沿到达时间就等于粗时间与细时间之和。借助延迟线,时间-数字转换器的时间测量精度可以提高到优于100皮秒。Specifically, the coarse counter is driven by a clock signal, and after each clock cycle, the count value output by the coarse counter is increased by 1, and the current coarse value is obtained by multiplying the current count value by one clock cycle. When the edge of the trigger signal s comes, the time-to-digital converter records the count value of the coarse counter output at this moment, and records it as N. If the clock period is recorded as Tc, the coarse time of the edge arrival of the trigger signal s can be expressed as N * Tc. The time measurement accuracy of the coarse counter is based on the clock cycle, but for FPGAs, the frequency of the clock signal cannot be increased without limit. To further improve the time measurement accuracy, a fine counter needs to be introduced. The implementation of the fine counter is based on a delay line that outputs a temperature code. The temperature code includes several 0s and 1. The temperature code on the delay line is characterized by all 0s on one side and 1,0 and 1 on the other side. The relationship between the elimination of each other, and the sum of the number of 0 and the number of 1 is equal to the total length of the temperature code. For example, 1110000 is a piece of temperature code composed of 3 1s and 5 0s. The boundary between 0 and 1 represents the signal to be measured. By counting the number of 0 or 1, and multiplying the length of time represented by each 0 or 1, the fine time of the edge of the signal to be measured on the delay line can be calculated. Therefore, the edge arrival time of the trigger signal s is equal to the sum of the coarse time and the fine time. With the help of a delay line, the time measurement accuracy of the time-to-digital converter can be improved to better than 100 picoseconds.
更具体地,时钟分配装置使用FPGA上的逻辑单元组成延迟线,延迟线的本质是由若干个全加器组成的串行加法器,每个全加器都有进位输入和输出的端口,这些端口首尾相连,上一级全加器的进位输出连接到下一级全加器的进位输入。为了描述的方便,比如,串行加法器的位宽为8比特,该串行加法器具有两个输入,其中一个输入设为8位二进制常数11111111,另一个输入为数字化后的待测信号(比如触发信号s),不足8比特的部分用0补齐。当待测信号的上升沿到来时,待测信号的数字电平从0变到1,串行加法器的计算结果不是立刻变为全0,首先离待测信号最近的那个全加器的计算结果变成0,然后这个全加器的进位信号由0变成1并传递到下一级;随后位于第二级的全加器的计算结果变成0,其进位信号由0变成1,再传递到下一级,以此类推。进位信号的传递需要时间,从第n级全加器产生进位信号到第n+1级全加器产生进位信号间隔的时间通常小于100皮秒,且进位信号每传递一级,温度码包含0的个数就加1。More specifically, the clock distribution device uses logic units on the FPGA to form a delay line. The essence of a delay line is a serial adder composed of several full adders. Each full adder has ports for carry inputs and outputs. These The ports are connected end to end, and the carry output of the full adder in the upper stage is connected to the carry input of the full adder in the next stage. For convenience of description, for example, the bit width of the serial adder is 8 bits. The serial adder has two inputs, one of which is set to an 8-bit binary constant 11111111, and the other is a digitized signal to be tested ( For example, the trigger signal s), the part less than 8 bits is filled with 0. When the rising edge of the signal to be measured arrives, the digital level of the signal to be measured changes from 0 to 1, the calculation result of the serial adder does not immediately become all 0, the calculation of the full adder closest to the signal to be measured first The result becomes 0, and then the carry signal of this full adder changes from 0 to 1 and is passed to the next stage; the calculation result of the full adder in the second stage then becomes 0, and its carry signal changes from 0 to 1. Then pass to the next level, and so on. The transfer of the carry signal takes time. The time from the n-th full adder to the carry signal to the n + 1 th full adder to generate the carry signal is usually less than 100 picoseconds, and the temperature code contains 0 for each level of the carry signal. Add 1 to the number.
同理,当待测信号的数字电平从1变到0时,串行加法器的计算结果不是立刻变为全1,首先离待测信号最近的那个全加器的计算结果变成1,其 进位信号由1变成0并传递到下一级,直到所有的全加器的计算结果都变成1。Similarly, when the digital level of the signal to be measured changes from 1 to 0, the calculation result of the serial adder does not immediately become all 1, the calculation result of the full adder closest to the signal to be measured first becomes 1, Its carry signal is changed from 1 to 0 and passed to the next stage until the calculation result of all full adders becomes 1.
时间数字转换单元使用一个时钟信号(和粗计数器的时钟信号相同)采样延迟线输出的温度码。当某一时刻温度码的最高位(MSB)一侧是1,最低位(LSB)一侧为0时,表明信号的上升沿被探测到,统计延迟线上输出的温度码中0的个数作为细计数的数值。当某一时刻温度码的最高位(MSB)一侧是0,最低位(LSB)一侧为1时,表明信号的下降沿被探测到,统计延迟线上输出的温度码中1的个数作为细计数。对于8位温度码,温度码包含的1或0的个数是0到8,可以用一个4比特的二进制数表示,但在本申请实际的实现过程中,时间-数字转换器使用128位温度码,温度码包含的1或0的个数是0到128,用一个8比特的二进制数表示。上述温度码到细计数的转换过程由编码器完成。The time-to-digital conversion unit uses a clock signal (same as the clock signal of the coarse counter) to sample the temperature code output from the delay line. When the most significant bit (MSB) side of the temperature code is 1 and the least significant bit (LSB) side is 0, it indicates that the rising edge of the signal is detected, and the number of 0 in the temperature code output on the delay line is counted. The value as a fine count. When the most significant bit (MSB) side of the temperature code is 0 and the least significant bit (LSB) side is 1, it indicates that the falling edge of the signal is detected, and the number of 1 in the temperature code output on the delay line is counted. As a fine count. For an 8-bit temperature code, the number of 1 or 0 contained in the temperature code is 0 to 8, which can be represented by a 4-bit binary number, but in the actual implementation process of this application, the time-to-digital converter uses a 128-bit temperature Code, the temperature code contains 1 or 0, the number is 0 to 128, expressed by an 8-bit binary number. The above conversion process of temperature code to fine count is completed by the encoder.
对于每个触发信号s的边沿,时间数字转换单元都会给出一个粗计数和细计数。触发信号s的边沿到达时间T=Tc×N-To×M,其中,粗时间为Tc×N,细时间为To×M;Tc为一个时钟周期,是已知值;N是粗计数的计数值;To是延迟线上每一级温度码进位的平均时间;M是细计数的计数值。For each edge of the trigger signal s, the time-to-digital conversion unit will give a coarse count and a fine count. The edge arrival time of the trigger signal s is T = Tc × N-To × M, where the coarse time is Tc × N and the fine time is To × M; Tc is one clock cycle, which is a known value; N is the count of the coarse count Value; To is the average time of each temperature code carry on the delay line; M is the count value of the fine count.
闪烁脉冲的阈值电压-时间对可以包括闪烁脉冲信号分别在各个采样点所对应的阈值电压信息和时间信息,也可以包括在经过数次采样后在各个采样点所对应的阈值电压信息和时间信息的平均值。The threshold voltage-time pair of the flicker pulse may include the threshold voltage information and time information corresponding to the flicker pulse signal at each sampling point, and may also include the threshold voltage information and time information corresponding to each sampling point after several samplings. average of.
本申请提供的闪烁脉冲数字化的方法及装置,通过FPGA产生PWM信号,经过电阻电容搭建的滤波电路后产生直流阈值电压信号,以此替代DAC部分的电路功能,完成MVT采样。相对于传统MVT采样电路,因为通过后端的FPGA和少数的电阻电容搭建多阶RC滤波电路来产生阈值电压信号,省去了DAC和电压基准源电路,从而仅依靠FPGA就可完成闪烁脉冲的数字化采样,使得整个电路结构变得精简。同时从性能上而言,PWM信号经过滤波电路产生的直流阈值电压信号的质量和12位精度的DAC的输出相当,而电阻电容为非常常见的基本电子元器件且价格低廉,通常1颗电阻或者电容的售价0.001美元左右,因此其单通道成本为0.001*8*4=0.032美元左右,相对于单通道DAC而言成本可大幅度降低成本,降低系统功耗和PCB电路面积。The method and device for digitizing the flicker pulse provided in the present application generate a PWM signal through an FPGA and generate a DC threshold voltage signal after a filter circuit constructed by a resistor and a capacitor, thereby replacing the circuit function of the DAC part and completing the MVT sampling. Compared with the traditional MVT sampling circuit, because the multi-stage RC filter circuit is built by the back-end FPGA and a small number of resistors and capacitors to generate the threshold voltage signal, the DAC and voltage reference circuit are eliminated, and the flicker pulse can be digitized by using the FPGA alone Sampling makes the whole circuit structure simple. At the same time, in terms of performance, the quality of the DC threshold voltage signal generated by the PWM signal through the filter circuit is equivalent to the output of a 12-bit precision DAC, and the resistance and capacitance are very common basic electronic components and the price is low, usually 1 resistor or The price of a capacitor is about 0.001 USD, so its single-channel cost is about 0.001 * 8 * 4 = 0.032 USD. Compared with a single-channel DAC, the cost can greatly reduce the cost, reduce system power consumption and PCB circuit area.
以上所述的,仅为本申请的较佳实施例,并非用以限定本申请的范围, 本申请的上述实施例还可以做出各种变化。即凡是依据本申请申请的权利要求书及说明书内容所作的简单、等效变化与修饰,皆落入本申请专利的权利要求保护范围。本申请未详尽描述的均为常规技术内容。The above are only preferred embodiments of the present application, and are not intended to limit the scope of the present application. The above embodiments of the present application can also make various changes. That is, any simple and equivalent changes and modifications made based on the content of the claims and the description of the present application shall fall into the protection scope of the claims of the present patent. What is not described in detail in this application is conventional technical content.

Claims (20)

  1. 一种闪烁脉冲数字化的方法,其特征在于,所述方法包括以下步骤:A method for digitizing a scintillation pulse, wherein the method includes the following steps:
    步骤S1:根据多阈值电压采样的需求,设置n个理论阈值电压,其中,n为自然数;Step S1: Set n theoretical threshold voltages according to the requirements of multi-threshold voltage sampling, where n is a natural number;
    步骤S2:根据所述理论阈值电压计算脉冲宽度调制特性,利用FPGA的输入/输出端口根据所述脉冲宽度调制特性来分别产生与所述理论阈值电压对应的n路脉冲宽度调制信号;Step S2: Calculate a pulse width modulation characteristic according to the theoretical threshold voltage, and use an input / output port of the FPGA to generate n pulse width modulation signals corresponding to the theoretical threshold voltage according to the pulse width modulation characteristic;
    步骤S3:将n路所述脉冲宽度调制信号输入滤波电路,产生对应的n个阈值电压信号;Step S3: input n pulse-width modulation signals into a filter circuit to generate corresponding n threshold voltage signals;
    步骤S4:将待采样的闪烁脉冲信号和n个所述阈值电压信号分别输入到所述FPGA的n个比较器中并进行电压比较;Step S4: input the flicker pulse signal to be sampled and n threshold voltage signals into n comparators of the FPGA and perform voltage comparison;
    步骤S5:利用所述FPGA内部的时间数字转换单元并根据n个所述比较器的比较结果来采集阈值电压-时间对。Step S5: Use a time-to-digital conversion unit inside the FPGA to collect threshold voltage-time pairs according to the comparison results of n comparators.
  2. 根据权利要求1所述的闪烁脉冲数字化的方法,其特征在于,所述多阈值电压采样的需求包括空间分辨率、时间分辨率和能量分辨率中的一种或几种。The method of digitizing a scintillation pulse according to claim 1, wherein the requirement of multi-threshold voltage sampling includes one or more of spatial resolution, temporal resolution, and energy resolution.
  3. 根据权利要求1所述的闪烁脉冲数字化的方法,其特征在于,所述多阈值电压采样的需求通过以下方法获得:根据已经采集的阈值电压-时间对-建立数据库,并进行波形重建以提取闪烁脉冲信号的空间分辨率、时间分辨率和能量分辨率。The method for digitizing a flicker pulse according to claim 1, wherein the demand for multi-threshold voltage sampling is obtained by the following method: establishing a database according to the threshold voltage-time pair that has been collected, and performing waveform reconstruction to extract flicker The spatial, temporal, and energy resolution of the pulse signal.
  4. 根据权利要求1所述的闪烁脉冲数字化的方法,其特征在于,所述理论阈值电压的设置通过下述方法完成:确定待采样的闪烁脉冲信号的电压幅值范围,所述理论阈值电压中至少有一个位于待采样的闪烁脉冲信号的电压幅值范围之内。The method for digitizing a flicker pulse according to claim 1, wherein the setting of the theoretical threshold voltage is performed by the following method: determining a voltage amplitude range of the flicker pulse signal to be sampled, and at least one of the theoretical threshold voltages is set. One is within the voltage amplitude range of the blinking pulse signal to be sampled.
  5. 根据权利要求1所述的闪烁脉冲数字化的方法,其特征在于,计算所述脉冲宽度调制特性的具体方法包括:The method of digitizing a flicker pulse according to claim 1, wherein a specific method of calculating the pulse width modulation characteristic comprises:
    步骤S21:根据所述理论阈值电压确定待产生脉冲宽度调制信号对应的 输出端口的电平;Step S21: Determine the level of the output port corresponding to the pulse width modulation signal to be generated according to the theoretical threshold voltage;
    步骤S22:按照下述公式计算出脉冲宽度调制信号的占空比D:Step S22: Calculate the duty cycle D of the pulse width modulation signal according to the following formula:
    D=理论阈值电压/对应的输出端口的电平,D = theoretical threshold voltage / level of the corresponding output port,
    其中,所述占空比D表示所述输出端口输出的脉冲宽度调制信号在一个周期内高电平的持续时间占整个信号时间的百分比;Wherein, the duty ratio D represents the duration of the high level of the pulse width modulation signal output by the output port in a period as a percentage of the entire signal time;
    步骤S23,确定待产生的脉冲宽度调制信号的脉冲宽度调制特性为:占空比D,最大幅值为对应的输出端口的电平。In step S23, it is determined that the pulse width modulation characteristic of the pulse width modulation signal to be generated is: the duty ratio D, and the maximum amplitude value is the level of the corresponding output port.
  6. 根据权利要求5所述的闪烁脉冲数字化的方法,其特征在于,所述FPGA产生脉冲宽度调制信号的具体方法为:根据所述占空比D,利用所述FPGA内部的定时器单元控制单个脉冲宽度调制信号的周期和高电平持续时间。The method for digitizing a flicker pulse according to claim 5, wherein a specific method for generating a pulse width modulated signal by the FPGA is: using a timer unit inside the FPGA to control a single pulse according to the duty cycle D Period and high-level duration of the width-modulated signal.
  7. 根据权利要求1所述的闪烁脉冲数字化的方法,其特征在于,将n路所述脉冲宽度调制信号输入滤波电路的具体方法为:在所述脉冲宽度调制信号后端直接接入所述滤波电路,或者在所述脉冲宽度调制信号后通过滤波处理后再接入所述滤波电路。The method for digitizing a flicker pulse according to claim 1, wherein a specific method of inputting n channels of the pulse width modulation signal to a filter circuit is: directly connecting the filter circuit at a back end of the pulse width modulation signal Or after filtering the pulse width modulated signal, the filtering circuit is connected to the filtering circuit.
  8. 根据权利要求7所述的闪烁脉冲数字化的方法,其特征在于,所述滤波电路为4阶滤波电路。The method for digitizing a flicker pulse according to claim 7, wherein the filter circuit is a fourth-order filter circuit.
  9. 根据权利要求8所述的闪烁脉冲数字化的方法,其特征在于,所述4阶滤波电路包括依次串联的四个电阻R1、R2、R3和R4,产生的所述脉冲宽度调制信号通过所述电阻R1接入滤波电路,其中,所述电阻R1和所述电阻R2之间通过电容C1连接后接地,所述电阻R2和所述电阻R3之间通过电容C2连接后接地,所述电阻R3和所述电阻R4之间通过电容C3连接后接地,所述电阻R4的末端通过电容C4连接后接地,所述电阻R4的末端还负责输出滤波后的阈值电压。The method for digitizing a scintillation pulse according to claim 8, wherein the fourth-order filter circuit includes four resistors R1, R2, R3, and R4 connected in series, and the pulse width modulation signal generated by the resistor passes through the resistor R1 is connected to a filter circuit, wherein the resistor R1 and the resistor R2 are connected to each other through a capacitor C1 and grounded, and the resistor R2 and the resistor R3 are connected to each other through a capacitor C2 to be grounded, and the resistor R3 and all The resistors R4 are connected to ground through a capacitor C3, the ends of the resistors R4 are connected to ground through a capacitor C4, and the ends of the resistors R4 are also responsible for outputting the filtered threshold voltage.
  10. 根据权利要求1所述的闪烁脉冲数字化的方法,其特征在于,在所述步骤S4中,通过低压差分信号比较器对待采样的所述闪烁脉冲信号和n个所述阈值电压信号进行电压比较。The method for digitizing a flicker pulse according to claim 1, wherein in the step S4, a voltage comparison is performed between the flicker pulse signal to be sampled and n threshold voltage signals through a low-voltage differential signal comparator.
  11. 根据权利要求1所述的闪烁脉冲数字化的方法,其特征在于,所述时 间数字转换单元包括一个第一计数器和一个第二计数器,所述第一计数器输出的第一时间值和所述第二计数器输出的第二时间值合并以得到闪烁脉冲信号的边沿到达时间,所述时间数字转换单元将闪烁脉冲信号的边沿到达时间和阈值电压信号进行比较,记录下高、低电平状态跳变时对应的时间信息和该时间信息对应的阈值电压信息。The method for digitizing a flicker pulse according to claim 1, wherein the time-to-digital conversion unit comprises a first counter and a second counter, and the first time value output by the first counter and the second counter The second time values output by the counters are combined to obtain the edge arrival time of the flicker pulse signal. The time-to-digital conversion unit compares the edge arrival time of the flicker pulse signal with the threshold voltage signal, and records the high and low level state transitions. The corresponding time information and the threshold voltage information corresponding to the time information.
  12. 根据权利要求1所述的闪烁脉冲数字化的方法,其特征在于,所述方法还包括:The method of digitizing a flicker pulse according to claim 1, further comprising:
    步骤S6:反复进行上述步骤S1-步骤S5以获得多组闪烁脉冲信号的阈值电压-时间对,完成闪烁脉冲信号的数字化。Step S6: Repeat the above steps S1-S5 to obtain the threshold voltage-time pairs of multiple sets of flicker pulse signals, and complete the digitization of the flicker pulse signals.
  13. 根据权利要求12所述的闪烁脉冲数字化的方法,其特征在于,所述阈值电压-时间对包括闪烁脉冲信号分别在各个采样点处所对应的阈值电压和时间,或者包括经过数次采样后在各个采样点处所对应的阈值电压和时间的平均值。The method of digitizing a flicker pulse according to claim 12, wherein the threshold voltage-time pair includes threshold voltage and time corresponding to the flicker pulse signal at each sampling point, or comprises The average of the corresponding threshold voltage and time at the sampling point.
  14. 一种闪烁脉冲数字化的装置,其特征在于,所述装置包括:A device for digitizing a flicker pulse is characterized in that the device comprises:
    FPGA,所述FPGA被配置为根据多阈值电压采样的需求,设置n个理论阈值电压,所述FPGA具有输入/输出端口,所述输入/输出端口被配置为根据所述理论阈值电压产生脉冲宽度调制信号;FPGA, the FPGA is configured to set n theoretical threshold voltages according to the requirements of multi-threshold voltage sampling, the FPGA has input / output ports, and the input / output ports are configured to generate pulse widths based on the theoretical threshold voltages Modulated signal;
    滤波电路,所述滤波电路被配置为将所述脉冲宽度调制信号转换为阈值电压信号;A filtering circuit configured to convert the pulse width modulation signal into a threshold voltage signal;
    所述FPGA还包括比较器和时间数字转换单元,所述比较器被配置为接收待采样的闪烁脉冲信号和所述阈值电压信号并进行比较;所述时间数字转换单元被配置为根据所述比较器的比较结果采集阈值电压-时间对。The FPGA further includes a comparator and a time-to-digital conversion unit. The comparator is configured to receive a flicker pulse signal to be sampled and compare the threshold voltage signal with each other; and the time-to-digital conversion unit is configured to perform a comparison based on the comparison. The result of the comparison is collected by the threshold voltage-time pair.
  15. 根据权利要求14所述的闪烁脉冲数字化的装置,其特征在于,所述理论阈值电压中至少有一个位于待采样的闪烁脉冲信号的电压幅值范围之内。The device for digitizing a flicker pulse according to claim 14, wherein at least one of the theoretical threshold voltages is within a voltage amplitude range of the flicker pulse signal to be sampled.
  16. 根据权利要求14所述的闪烁脉冲数字化的装置,其特征在于,所述FPGA的输入/输出端口为低压差分信号端口。The device for digitizing a flicker pulse according to claim 14, wherein the input / output port of the FPGA is a low-voltage differential signal port.
  17. 根据权利要求14所述的闪烁脉冲数字化的装置,其特征在于,所述滤波电路为4阶滤波电路。The device for digitizing a flicker pulse according to claim 14, wherein the filter circuit is a fourth-order filter circuit.
  18. 根据权利要求17所述的闪烁脉冲数字化的装置,其特征在于,所述4阶滤波电路包括依次串联的四个电阻R1、R2、R3和R4,其中,所述电阻R1和所述电阻R2之间通过电容C1连接后接地,所述电阻R2和所述电阻R3之间通过电容C2连接后接地,所述电阻R3和所述电阻R4之间通过电容C3连接后接地,所述电阻R4的末端通过电容C4连接后接地,产生的所述脉冲宽度调制信号通过所述电阻R1接入滤波电路,滤波后的所述阈值电压通过所述电阻R4的末端输出。The device for digitizing a flicker pulse according to claim 17, wherein the fourth-order filter circuit includes four resistors R1, R2, R3, and R4 connected in series, wherein one of the resistor R1 and the resistor R2 Between the resistor R2 and the resistor R3 through a capacitor C2, and then between the resistor R3 and the resistor R4 through a capacitor C3, the resistor R4 ends. The capacitor C4 is connected to ground, the generated pulse width modulation signal is connected to a filter circuit through the resistor R1, and the filtered threshold voltage is output through an end of the resistor R4.
  19. 根据权利要求14所述的闪烁脉冲数字化的装置,其特征在于,所述比较器为低压差分信号比较器。The device for digitizing a flicker pulse according to claim 14, wherein the comparator is a low-voltage differential signal comparator.
  20. 根据权利要求14所述的闪烁脉冲数字化的装置,其特征在于,所述时间数字转换单元包括一个粗计数器和一个细计数器,所述粗计数器输出的粗时间值和所述细计数器输出的细时间值合并以得到闪烁脉冲信号的边沿到达时间,所述时间数字转换单元将闪烁脉冲信号的边沿到达时间和阈值电压信号进行比较,记录下高、低电平状态跳变时对应的时间信息和该时间信息对应的阈值电压信息。The device for digitizing a flicker pulse according to claim 14, wherein the time-to-digital conversion unit includes a coarse counter and a fine counter, and the coarse time value output by the coarse counter and the fine time output by the fine counter The values are combined to obtain the edge arrival time of the flicker pulse signal. The time-digital conversion unit compares the edge arrival time of the flicker pulse signal with the threshold voltage signal, and records the time information corresponding to the high and low level state transitions and the Threshold voltage information corresponding to time information.
PCT/CN2019/099904 2018-08-29 2019-08-09 Method and apparatus for digitizing scintillation pulse WO2020042888A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810998093.X 2018-08-29
CN201810998093.XA CN109274369B (en) 2018-08-29 2018-08-29 Method and device for digitizing scintillation pulse

Publications (1)

Publication Number Publication Date
WO2020042888A1 true WO2020042888A1 (en) 2020-03-05

Family

ID=65154461

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/099904 WO2020042888A1 (en) 2018-08-29 2019-08-09 Method and apparatus for digitizing scintillation pulse

Country Status (2)

Country Link
CN (1) CN109274369B (en)
WO (1) WO2020042888A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115113512A (en) * 2022-05-26 2022-09-27 合肥综合性国家科学中心人工智能研究院(安徽省人工智能实验室) Pulse sampling method, sampling system, device and computer readable storage medium

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109274369B (en) * 2018-08-29 2022-05-10 苏州瑞迈斯医疗科技有限公司 Method and device for digitizing scintillation pulse
CN109669206A (en) * 2019-03-03 2019-04-23 南昌华亮光电有限责任公司 Circulating type liquid scintillator intelligence energy disperse spectroscopy system and its signal processing method
CN111917304B (en) * 2020-08-10 2022-05-10 北京新雷能科技股份有限公司 Digital power supply
CN112671410A (en) * 2020-12-29 2021-04-16 珠海禅光科技有限公司 Method based on PWM analog DAC function, digital-to-analog conversion circuit and storage medium
CN113472527B (en) * 2020-12-30 2024-04-16 广东国腾量子科技有限公司 Synchronous correction system for quantum key distribution
CN113204044A (en) * 2021-03-16 2021-08-03 华中科技大学 Nuclear pulse energy measuring method for nuclear logging instrument
CN113358917B (en) * 2021-06-02 2022-11-22 北京计算机技术及应用研究所 Pulse wave height acquisition implementation method based on FPGA
CN115032877B (en) * 2022-05-26 2024-03-29 合肥综合性国家科学中心人工智能研究院(安徽省人工智能实验室) Pulse sampling method, sampling system, device and computer readable storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102209110A (en) * 2011-05-18 2011-10-05 东南大学 Online controllable sensing node positioning method
US20160324498A1 (en) * 2013-07-25 2016-11-10 Raycan Technology Co., Ltd. (Su Zhou) On-line energy coincidence method and system for all-digital pet system
CN106559062A (en) * 2016-11-29 2017-04-05 青岛金思特电子有限公司 Logic analyser threshold voltage adjustment circuit
US20170357012A1 (en) * 2015-01-05 2017-12-14 Raycan Technology Co., Ltd. (Suzhou) Method for digitalizing scintillation pulse
CN108169789A (en) * 2018-03-22 2018-06-15 苏州瑞迈斯医疗科技有限公司 A kind of method, apparatus for obtaining power spectrum and the device that energy window is set
CN108324308A (en) * 2018-03-22 2018-07-27 苏州瑞迈斯医疗科技有限公司 A kind of number PET system
CN109274369A (en) * 2018-08-29 2019-01-25 苏州瑞迈斯医疗科技有限公司 A kind of scintillation pulse method for digitizing and device

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100426641C (en) * 2004-03-26 2008-10-15 奇鋐科技股份有限公司 Pulse wide modulation converting to DC voltage unit
US8735834B2 (en) * 2010-03-31 2014-05-27 John MILLETT Mobile cardiac positron emission tomography (moPET) camera
CN102347751A (en) * 2010-08-04 2012-02-08 中国科学院高能物理研究所 Digitalized control method and device for pulse power source
CN102843139B (en) * 2012-09-20 2015-10-28 苏州瑞派宁科技有限公司 A kind of scintillation pulse method for digitizing and device
CN202801645U (en) * 2012-09-20 2013-03-20 苏州瑞派宁科技有限公司 Scintillation pulse digital device
CN103870421B (en) * 2012-12-10 2016-08-24 上海工程技术大学 A kind of serial line interface based on FPGA and PWM combination application IP kernel device
WO2015105314A1 (en) * 2014-01-07 2015-07-16 Samsung Electronics Co., Ltd. Radiation detector, tomography imaging apparatus thereof, and radiation detecting apparatus thereof
CN103944381A (en) * 2014-03-27 2014-07-23 重庆四联光电科技有限公司 Voltage output circuit based on PWM control
CN204242015U (en) * 2014-11-14 2015-04-01 珠海格力电器股份有限公司 PWM ripple is converted to the circuit of DC voltage, air-conditioner controller and air-conditioning
CN205017309U (en) * 2015-09-16 2016-02-03 成都四威高科技产业园有限公司 PWM conversion analog voltage signal circuit
WO2018134886A1 (en) * 2017-01-17 2018-07-26 オリンパス株式会社 Power supply

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102209110A (en) * 2011-05-18 2011-10-05 东南大学 Online controllable sensing node positioning method
US20160324498A1 (en) * 2013-07-25 2016-11-10 Raycan Technology Co., Ltd. (Su Zhou) On-line energy coincidence method and system for all-digital pet system
US20170357012A1 (en) * 2015-01-05 2017-12-14 Raycan Technology Co., Ltd. (Suzhou) Method for digitalizing scintillation pulse
CN106559062A (en) * 2016-11-29 2017-04-05 青岛金思特电子有限公司 Logic analyser threshold voltage adjustment circuit
CN108169789A (en) * 2018-03-22 2018-06-15 苏州瑞迈斯医疗科技有限公司 A kind of method, apparatus for obtaining power spectrum and the device that energy window is set
CN108324308A (en) * 2018-03-22 2018-07-27 苏州瑞迈斯医疗科技有限公司 A kind of number PET system
CN109274369A (en) * 2018-08-29 2019-01-25 苏州瑞迈斯医疗科技有限公司 A kind of scintillation pulse method for digitizing and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115113512A (en) * 2022-05-26 2022-09-27 合肥综合性国家科学中心人工智能研究院(安徽省人工智能实验室) Pulse sampling method, sampling system, device and computer readable storage medium
CN115113512B (en) * 2022-05-26 2024-03-29 合肥综合性国家科学中心人工智能研究院(安徽省人工智能实验室) Pulse sampling method, sampling system, device and computer readable storage medium

Also Published As

Publication number Publication date
CN109274369B (en) 2022-05-10
CN109274369A (en) 2019-01-25

Similar Documents

Publication Publication Date Title
WO2020042888A1 (en) Method and apparatus for digitizing scintillation pulse
US7345604B2 (en) Analog to digital conversion using recurrent neural networks
US20140368222A1 (en) Capacitive Proximity Detection Using Delta-Sigma Conversion
WO2020082858A1 (en) Pulse signal sampling method and reconstruction method, and apparatuses therefor
Hedayati A study of Successive Approximation Registers and implementation of an ultra-low power 10-bit SAR ADC in 65nm CMOS technology
WO2017005748A1 (en) Built-in self-test for adc
WO2015070504A1 (en) Method and device for acquiring time point where glimmering pulse passes over threshold
CN103901243B (en) A kind of oscillograph with high triggering precision
JP2008092387A (en) Analog/digital conversion circuit, timing signal generating circuit, and controller
AU595282B2 (en) Methods of and apparatus for converting an electrical signal into a proportional frequency
CN218958903U (en) Analog-to-digital converter
Kweon et al. A reconfigurable time-to-digital converter based on time stretcher and chain-delay-line for electrical bioimpedance spectroscopy
Ghanavati et al. A tlbo optimized tdc for biomedical applications
CN205921567U (en) Sawtooth wave produces circuit
US10528010B2 (en) Range finding device
RU119960U1 (en) ANALOG-DIGITAL CONVERTER
CN101800552A (en) Method for realizing long delay, analog-time converting circuit and analog to digital converter
CN112600561A (en) Signal processing system in oscilloscope, oscilloscope and signal processing method
CN106130512B (en) Sawtooth wave generating circuit
CN204649825U (en) Based on the high speed true effective value rectifying system of FPGA
Fathi et al. A sar adc based time-to-digital converter in cmos technology
Killat et al. Hybrid integrators for analog computers
Aragonés et al. Self-adaptive A/D converter based on a frequency based acquisition method for smart sensors applications
CN106487386A (en) High Speed Analog is to digital converter and its method
JPH042222A (en) One-bit d/a converter

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19853776

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19853776

Country of ref document: EP

Kind code of ref document: A1