Neural network hardware centroid calculation method for crossed strip-shaped position-sensitive anode
By deploying the U-Net neural network hardware centroid calculation method on FPGA, the problem of processing speed and accuracy of cross-bar position-sensitive anode centroid algorithm is solved. The calculation speed and accuracy are improved by using convolutional neural network and pipeline architecture, and suitable for multiple applications There are fewer signal paths and high-value signal paths.
Patent Information
- Application Number
- CN202411033587.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-30
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2044-07-30
AI Technical Summary
The centroid algorithm of crossbar-sensitive anode has insufficient processing speed and calculation accuracy, especially when there are few multi-signal paths and high-value signal paths, it is difficult to ensure high-precision calculations, and there are difficulties in implementing FPGA hardware.
U-Net neural network hardware centroid calculation method is adopted to deploy the trained model parameters to FPGA, combine the convolutional neural network to realize centroid calculation in a programmable logic unit, and use the AXI bus for data transmission, parallel addition operations and images. Processing, using pipeline architecture to improve computing speed.
It effectively reduces noise interference, improves the spatial resolution of imaging, shortens the calculation time of centroid, reduces calculation time, and improves calculation accuracy.
Smart Images

Figure CN119026655A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of neural network model training and data processing, and in particular relates to a method for calculating the centroid of neural network hardware for a cross-strip position-sensitive anode. Background Art
[0002] As a cutting-edge optical detection technology, single-photon cameras have played an indispensable role in astronomy, physics and other scientific research fields. In particular, in the fields of deep space exploration, Earth ionosphere observation and biological behavior analysis, these cameras have demonstrated their excellent performance and broad application prospects. However, to achieve the high performance of such instruments, the front-end anode structure plays a decisive role. This structure not only affects the clarity of the image, but also determines the way the subsequent electronics read out, which has a direct impact on the detection accuracy. In 1974, the Lampton team first proposed the resistive position-sensitive anode. The introduction of this technology effectively solved the various challenges faced by the use of traditional television camera tube imaging systems in space exploration missions in terms of equipment size, complexity, cost, weight and information loss. This innovation enables scientists to conduct deep space exploration and environmental monitoring more efficiently, and also lays the foundation for the subsequent development of anode technology. In order to achieve a wider imaging area and higher resolution, a variety of anode structures such as wedge-shaped anodes, delay line anodes and crossed delay line anodes have emerged one after another. Each new anode structure is based on the further development of previous technologies and aims to improve the performance limit of single-photon cameras. Among them, the Cross Strip (XS) position-sensitive anode proposed by Siegmund's team uses two layers of mutually perpendicular elongated strip electrodes, which sample the spatial distribution of charge events leaving the microchannel plate (MCP). The signal received by each electrode is used to accurately determine the center position of the event. This unique design greatly improves the detection efficiency and accuracy. Compared with other types of detector structures, the XS anode detector has the characteristics of high parallelism, high spatial resolution, high temporal resolution, and a longer service life. However, this is accompanied by the generation of a large amount of data, which places higher requirements on the processing capabilities of the back-end readout circuit.
[0003] like Figure 1As shown in the figure, the front end of the cross-strip single-photon detector is mainly composed of an incident window, a photocathode, an MCP stack, and a position-sensitive anode. Both the MCP stack and the position-sensitive anode need to work in a vacuum environment. Photons are irradiated onto the photocathode through the incident window and converted into photoelectrons on the photocathode. The photoelectrons generated by the photocathode are then accelerated and multiplied in the MCP stack, eventually becoming an electron cloud composed of a large number of electrons, which then collide with the XS anode plate. The charge is divided by the conductive micro-strip electrodes that are isolated from each other and orthogonal to each other in the anode plate. Each strip collects the charge and transfers it to the detector port. As shown in the figure, the front end of the cross-strip single-photon detector is mainly composed of an incident window, a photocathode, and a position-sensitive anode. Figure 2 As shown in the figure, taking the X direction as an example, after the charge on each anode strip reaches the charge-sensitive amplifier at the back end, it is shaped and amplified into a voltage signal that can be collected by the ADC, and then the voltage signal corresponding to the strip is sampled in parallel by the ADC. Finally, these digital signals will be processed by the FPGA in two directions respectively, and the coordinate position of the center of the electron cloud in the X and Y directions will be calculated. The two FPGAs interact to obtain the center coordinates (X, Y). Each coordinate will be transmitted to the computer via Gigabit Ethernet.
[0004] The main performance indicators of XS single photon detectors are high spatial resolution and high counting rate. The centroid algorithm is one of the main factors affecting its performance. Currently known centroid algorithms include simple weighted average, function fitting, and interpolation convolution.
[0005] The simple weighted average algorithm refers to a method of averaging the data of each strip to calculate the centroid according to the mathematical definition of the centroid. This method is easier to implement with FPGA. Its calculation formula is shown below. Taking the x direction as an example, Xi is the channel i where the event occurs, l is the lower boundary of the channel, n is the upper boundary of the channel, and Vi is the state value (peak value, average value, etc.) of the i-th channel when the event occurs. Most of this method is simple and independent mathematical operations, so it is suitable for implementation on FPGA. The advantages are small amount of calculation, extremely fast speed, and small fluctuation of calculation results, but the disadvantage is that due to the small number of channels of the event (few weighted available data), it will have a certain impact on the accuracy, causing the result to deviate from the actual value.
[0006]
[0007] Function fitting algorithm refers to the use of software to fit the charge distribution of the strip. In the early foreign solutions, FPGA only serves as a bridge between the ADC board and the PC, receiving data and sending it to the host computer. In the host computer, the sampling value of each channel is read by software, and the corresponding channel position of the sampling peak is determined after comparison. Then the function is fitted, and 3 to 7 signal points adjacent to both sides of the channel corresponding to the sampling peak are selected and brought into the function for fitting calculation (Gaussian function works best). The advantage of this solution is that it only needs to compare the sampling values of each channel and find several signal points near the sampling peak. At the same time, it is simpler and easier to implement by using software for processing. And it can also have better resolution at the edge, because even if the electron cloud falls at the edge, only fewer points are needed to calculate the result. However, the software code operation is a sequential execution process with a slow processing speed, and in order to achieve a higher fitting accuracy, multiple rounds of iterations with small steps are required, which will also consume a lot of time and computing power.
[0008] The interpolation convolution algorithm refers to the use of the interpolation convolution method to find the center position of the charge cloud. It convolves the charge distribution of the strip with a centrally symmetric bipolar convolution kernel based on the average charge distribution. The zero point of the convolution result, which is interpolated to the sub-strip position, is interpreted as the center of mass position of the charge cloud. The advantage of this method is that it is insensitive to any baseline offset because the sum of the kernels is zero. The kernel is also a matched filter because it is based on the average charge distribution, so it weights the strips with higher signal-to-noise ratios accordingly. The disadvantage of this method is that if FPGA is used for integrated ADC acquisition and calculation, it is a complicated process to determine different Gaussian kernels according to electron clouds of different sizes.
[0009] In summary, there are three main challenges facing the centroid algorithm at present. First, there are many XS anode signal pathways, which affects the processing speed of the centroid algorithm when processing huge amounts of data. Second, although there are many XS anode signal pathways, there are relatively few strips received from the falling electron cloud, that is, there are few high-value signal pathways and high-value data, and the calculation accuracy of the centroid algorithm is difficult to guarantee. Third, there are problems with the hardware implementation and deployment of the centroid algorithm on FPGA. Summary of the invention
[0010] In order to overcome the shortcomings of the centroid algorithm, such as the affected processing speed, difficult to ensure calculation accuracy, and difficult hardware implementation, the present invention proposes a neural network hardware centroid calculation method for cross-strip position-sensitive anodes.
[0011] The technical solution adopted by the present invention to solve the technical problem is:
[0012] A method for calculating the centroid of neural network hardware for a cross-strip position-sensitive anode comprises the following steps:
[0013] Step S1, model building
[0014] The measured data set generated by the anode readout signal and the simulated data set generated by matlab are used as data sets. The training set and test set are randomly generated from the data set. The U-Net neural network is selected as the model and the model is trained using python. After the model training is completed, the model parameters are exported.
[0015] Step S2, hardware implementation
[0016] The U-Net neural network combined with the exported model parameters is deployed on the FPGA, and the algorithm deployment uses the FPGA chip. The FPGA chip includes a processor unit PS, a programmable logic unit PL, and an AXI bus. The PS and PL work together. The convolutional neural network CNN algorithm is partially implemented in the PL. The PS realizes the control of the data flow, and the PS and PL rely on the AXI bus to transmit data. The FPGA chip with the centroid calculation function is obtained.
[0017] In the above-mentioned centroid calculation method, the step S1 of model establishment further comprises:
[0018] After the signal collected by the cross-strip anode plate passes through the charge-sensitive amplifier, the ADC collects the voltage signal corresponding to each strip.
[0019] Matlab was used to generate an ideal Gaussian signal, which was a noise-free original electron cloud. The noise-free original electron cloud was superimposed with noise signals of different amplitudes and frequencies as a simulated data set. The peak values of the small Gaussian signals obtained from the strips in the x and y directions were superimposed, and the obtained two-dimensional matrix was used as the measured data set. The measured data set and the simulated data set were mixed to form a data set.
[0020] The U-Net neural network is trained using the training set. The model training process includes two stages: the stage in which the training set data is propagated from low level to high level, i.e. the forward propagation stage; when the result obtained by the forward propagation does not match the expectation, the error is propagated from high level to low level, i.e. the back propagation stage; the horizontal and vertical coordinate distance between the centroids of the reverse x and reverse y is used as the loss function, and the network parameters are optimized using the back propagation algorithm. In the network parameter optimization, the centroid calculation error is reduced. When the centroid calculation error is lower than the predetermined value, the model training is completed.
[0021] In the above centroid calculation method, the data set consists of 10,000 images, 80% of which are randomly selected as the training set, and the remaining 20% are the test set.
[0022] The above-mentioned centroid calculation method, the step S2 is implemented by hardware, further comprising:
[0023] The programmable logic unit PL includes a data receiving and preprocessing module and a convolutional neural network module, and the processor unit PS includes a centroid calculation result output module.
[0024] The strip information data is read from the ADC and converted into a two-dimensional matrix graphic by the data receiving and preprocessing module. The converted two-dimensional matrix graphic is stored in the data storage RAM, and the two-dimensional matrix graphic data is sent to the convolutional neural network module via the AXI bus.
[0025] In the above-mentioned centroid calculation method, in the hardware implementation of step S2, the process of converting the data preprocessing module into a two-dimensional matrix graphic is:
[0026] The strip information read by the ADC is divided into x-channel and y-channel, and any x-channel peak value and y-channel peak value are added in parallel.
[0027] In the above-mentioned centroid calculation method, in the hardware implementation of step S2, the convolutional neural network CNN algorithm part is mainly implemented in the PL process as follows:
[0028] The convolutional neural network module includes an image operation processing submodule and a data cache submodule. The image operation processing submodule includes a convolution layer module, a maximum / minimum pooling layer module, an activation function module, and a fully connected layer module. The pipeline architecture is used to connect the various layers of the convolutional neural network in the image operation processing submodule. The data cache submodule includes a data flow control module, a weight storage module, a bias storage module, and a RAM. The data flow control module receives the pre-processed image data, transports the weight data and the bias data through the AXI bus to participate in the neural network calculation. The data obtained is the centroid calculation result, and the centroid calculation result is sent to the RAM, and then sent back to the PS end via the AXI bus.
[0029] The above-mentioned centroid calculation method further includes step S3, in which the centroid calculation result output module sends the centroid calculation result to the host computer.
[0030] The beneficial effects of the present invention are:
[0031] A neural network hardware centroid calculation method for a cross-strip position-sensitive anode adopts a convolutional neural network training model and optimizes the centroid errors of noisy electron cloud clusters and noise-free electron cloud clusters through U-Net, which can reduce the interference of noise to a certain extent, effectively solve the problem of high-precision centroid calculation under noise interference, and improve the spatial resolution of imaging.
[0032] A neural network hardware centroid calculation method for a cross-strip position-sensitive anode, which aims to solve the problem that the XS anode has many signal pathways, a huge amount of data, and a long time consumed in calculating the centroid, fully utilizes the high-speed parallel characteristics of the hardware circuit, pre-processes the strip signal, directly performs parallel addition operations on any x and y channel peaks, converts them into prediction graphics required by the neural network, and combines the pipeline architecture to improve the calculation speed, thereby reducing the time for calculating the centroid;
[0033] A neural network hardware centroid calculation method for cross-strip position-sensitive anodes is proposed. To address the problem that XS anodes have many signal pathways but few high-value signal pathways and high-value data, a convolutional neural network is used to extract local features of the image and reduce the dimension, thereby capturing key information from a large number of signals, reducing the number of parameters and the amount of calculation, and reducing the time spent on calculating the centroid. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 It is a schematic diagram of the photon conversion process of the prior art;
[0035] Figure 2 It is a schematic diagram of the process of determining the position of an electron cloud in the prior art;
[0036] Figure 3 It is a flow chart of the centroid calculation method of an embodiment of the present invention. DETAILED DESCRIPTION
[0037] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0038] Embodiment 1
[0039] A method for calculating the centroid of neural network hardware for a cross-strip position-sensitive anode comprises the following steps:
[0040] 1.1 Overall implementation plan for software and hardware
[0041] U-Net is a fully convolutional neural network (CNN) widely used in image correlation processing. The overall hardware and software implementation solution based on the convolutional neural network algorithm is as follows: Figure 3As shown in the figure, the main body is divided into model establishment and hardware implementation. The software implementation mainly makes the anode readout signal and the simulation data generated by matlab into a data set, divides the data set into a training set and a test set, selects a suitable network structure and uses python to train the model. After completing the model training in the computer, the model parameters are exported. The hardware implementation mainly deploys the U-Net neural network combined with the trained model parameters on the FPGA. The algorithm deployment uses an FPGA chip, which contains a processor unit (PS) and a programmable logic unit (PL). The PS and PL work together. The convolutional neural network (CNN) algorithm is mainly implemented in the PL. The PS realizes the control of the data flow, and the data is transmitted between the two via the AXI bus.
[0042] 1.2 Overall Software Implementation Plan
[0043] After the cross-strip anode plate collects the signal and passes through the charge sensitive amplifier, the ADC can collect the voltage signal corresponding to each strip. Since the electron cloud is Gaussian distributed, the voltage signal collected by each strip is also a small Gaussian signal. The data set consists of two parts: a simulated data set and a measured data set. Matlab is used to first generate an ideal Gaussian signal as the noise-free original electron cloud, and then superimpose noise signals of different amplitudes and frequencies as a simulated data set; the signal obtained by ADC sampling is superimposed with the peak value of the small Gaussian signal obtained by the strips in the x and y directions to obtain the value as a two-dimensional matrix as the measured data set. There are 10,000 data sets in total, 80% of which are randomly selected as training sets and 20% as test sets.
[0044] In order to achieve high-precision calculation of the centroid of the cross-line anode readout under noise interference, a centroid physical information neural network will be used. The main process is to train the U-Net neural network using a labeled data set. The model training process includes two stages: the stage in which data is propagated from low level to high level, that is, the forward propagation stage; when the result obtained by the forward propagation does not match the expectation, the stage in which the error is propagated from the high level to the low level, that is, the back propagation stage. The horizontal and vertical coordinate distance between the centroids of the reverse x and reverse y is used as the loss function, and the back propagation algorithm is used to optimize the network parameters. The centroid calculation error is reduced in the continuous parameter optimization, and when the error is minimized, high-quality model parameters are obtained.
[0045] 1.3 Overall Hardware Implementation Plan
[0046] The overall hardware structure includes a data receiving and preprocessing module, a convolutional neural network module, an AXI bus control module, and a centroid calculation result output module.
[0047] The data receiving and preprocessing module first reads the strip information from the ADC through the SPI driver. After the data preprocessing module converts the parallel addition operation of any x and y channel peaks into the two-dimensional matrix graphics required by the neural network, it is stored in a high-speed first-in-first-out data storage device. Finally, the data is sent to the convolutional neural network module via the AXI bus.
[0048] The convolutional neural network module is the core of the hardware, including the image operation processing submodule and the data cache submodule. The image operation processing submodule consists of a convolutional layer module, a maximum / minimum pooling layer module, an activation function module, and a fully connected layer module. The pipeline architecture is used to connect the various layers of the convolutional neural network in the image operation processing submodule to improve the computing efficiency. The data cache submodule consists of a data flow control module, a weight storage module, a bias storage module, and RAM. The data flow control module is mainly responsible for receiving the pre-processed image data through the AXI bus, transporting the weight data and bias data for participating in the neural network calculation, and sending the calculated data to the RAM, and finally sending it back to the PS end via the AXI bus.
[0049] The AXI bus control module is responsible for the high-speed signal path for data transmission between PS and PL.
[0050] The centroid calculation result output module is responsible for sending the centroid calculation result to the host computer.
Claims
1. A neural network hardware centroid calculation method for a cross-strip position-sensitive anode, characterized in that: The following steps are involved: Step S1, model establishment: The measured data set generated by the anode readout signal and the simulated data set generated by MATLAB are made into data sets. The data sets are randomly selected to generate training sets and test sets. The U-Net neural network is selected as the model and the model is trained using Python. After the model training is completed, the model parameters are exported. Step S2, hardware implementation: The U-Net neural network combined with the exported model parameters is deployed on the FPGA, and the algorithm deployment uses the FPGA chip; the FPGA chip includes a processor unit PS, a programmable logic unit PL, and an AXI bus. The PS and PL work together, and the convolutional neural network CNN algorithm is partially implemented in the PL. The PS realizes data flow control, and data is transmitted between the PS and PL via the AXI bus; an FPGA chip with centroid calculation function is obtained.
2. The centroid calculation method according to claim 1, characterized in that: The step S1 model establishment further comprises: After the signal collected by the cross-strip anode plate passes through the charge-sensitive amplifier, the ADC collects the voltage signal corresponding to each strip; Matlab is used to generate an ideal Gaussian signal, which is a noise-free original electron cloud. The noise-free original electron cloud is superimposed with noise signals of different amplitudes and frequencies as a simulated data set; the peak values of the small Gaussian signals obtained by the strips in the x and y directions are superimposed, and the obtained two-dimensional matrix is used as the measured data set; the measured data set and the simulated data set are mixed to form a data set; The U-Net neural network is trained using the training set. The model training process includes two stages: the stage in which the training set data is propagated from low level to high level, i.e. the forward propagation stage; when the result obtained by the forward propagation is inconsistent with the expectation, the error is propagated from high level to low level for training, i.e. the back propagation stage; the horizontal and vertical coordinate distance between the centroids of the x-reverse and y-reverse directions is used as the loss function, and the network parameters are optimized using the back propagation algorithm; the centroid calculation error is reduced in the network parameter optimization, and the model training is completed when the centroid calculation error is lower than the predetermined value.
3. The centroid calculation method according to claim 2, characterized in that: The data set consists of 10,000 images, 80% of which are randomly selected as training sets, and the remaining 20% are test sets.
4. The centroid calculation method according to claim 1, characterized in that: The step S2 is implemented by hardware and further comprises: The programmable logic unit PL includes a data receiving and preprocessing module and a convolutional neural network module, and the processor unit PS includes a centroid calculation result output module; The strip information data is read from the ADC and converted into a two-dimensional matrix graphic by the data receiving and preprocessing module. The converted two-dimensional matrix graphic is stored in the data storage RAM, and the two-dimensional matrix graphic data is sent to the convolutional neural network module via the AXI bus.
5. The centroid calculation method according to claim 4, characterized in that: In the hardware implementation of step S2, the process of converting the data preprocessing module into a two-dimensional matrix graphic is: The strip information read by the ADC is divided into x-channel and y-channel, and any x-channel peak value and y-channel peak value are added in parallel.
6. The centroid calculation method according to claim 4, characterized in that: In the hardware implementation of step S2, the process of implementing the convolutional neural network CNN algorithm in PL is as follows: The convolutional neural network module includes an image operation and processing submodule and a data cache submodule; the image operation and processing submodule includes a convolutional layer module, a maximum / minimum pooling layer module, an activation function module, and a fully connected layer module, and uses a pipeline architecture to connect the various layers of the convolutional neural network in the image operation and processing submodule; the data cache submodule includes a data flow control module, a weight storage module, a bias storage module and a RAM. The data flow control module receives preprocessed image data, transports weight data and bias data through the AXI bus to participate in the neural network calculation. The data obtained is the centroid calculation result, and the centroid calculation result is sent to the RAM, and then sent back to the PS end via the AXI bus.
7. The method for calculating the centroid according to any one of claims 1 to 6, characterized in that: The method also includes step S3, in which the centroid calculation result output module sends the centroid calculation result to the host computer.
Citation Information
Patent Citations
Decoupling method of multi-dimensional force sensor in noise environment
CN111256905A
Converter transformer state classification method and device, computer equipment and storage medium
CN113780393A
Retinal vessel image segmentation method based on semi-supervised deep learning
CN116342615A
Wavefront missing information prediction completion method based on time-space domain prediction
CN116380259A
Convolutional neural network accelerator based on FPGA is in vision is used
CN207458128U
Cited By
Cross strip-shaped anode single-photon detector imaging method based on deep learning
CN121720597A
Local strip self-adaptive reading method for crossed strip-shaped anode
CN122286201A
