Beam measurement system and method based on pepper hole method, processor and storage medium
By comprehensively utilizing Gaussian fitting, morphological processing and Hungarian algorithm image processing, the problem of insufficient real-time and accuracy in pepper hole beam measurement is solved, and efficient and accurate beam parameter measurement is achieved.
Patent Information
- Application Number
- CN202510722443.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-30
- Publication Date
- 2025-08-26
AI Technical Summary
In the prior art, it is difficult to achieve overall optimization on the premise of ensuring real-time and accuracy, resulting in low measurement accuracy and efficiency.
The image processing technology that comprehensively utilizes Gaussian fitting, morphological processing and Hungarian algorithms, combined with data acquisition and processing modules, is used to accurately calculate the beam current parameters through image preprocessing, beam spot detection, optimal matching and phase space ellipse fitting.
It significantly improves the accuracy and efficiency of beam current measurement, solves the problems of large matching errors and high computational complexity, and provides reliable beam current diagnosis and optimization control support.
Smart Images

Figure CN120539779A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of beam current measurement, and in particular relates to a pepper hole method beam current measurement system, method, processor and storage medium. Background Art
[0002] In accelerator and high-energy physics experiments, accurate measurement of beam parameters (such as emittance, divergence, and beam envelope) is crucial for improving device performance. The pepper hole method, a commonly used beam diagnostic method, relies heavily on the reliability of its image processing and data matching algorithms for measurement accuracy.
[0003] Existing technologies often use separate algorithmic processes for image preprocessing, spot detection, and data matching, making it difficult to achieve overall optimization while ensuring real-time performance and accuracy. Therefore, a system and method that integrates multiple image processing techniques, such as Gaussian fitting, morphological processing, and Hungarian algorithm matching, is urgently needed to improve the accuracy and efficiency of pepper hole beam measurement.
[0004] The present invention provides a pepper hole method beam current measurement system, method, processor and storage medium to solve the above technical problems. Summary of the Invention
[0005] The present invention aims to solve at least one of the technical problems existing in the prior art. To this end, the present invention proposes a pepper hole method beam current measurement system, method, processor and storage medium, which are used to solve the technical problem that the prior art solutions are difficult to achieve overall optimization while ensuring real-time performance and accuracy, resulting in low accuracy and efficiency in beam current measurement using the pepper hole method.
[0006] To achieve the above-mentioned object, a first aspect of the present invention provides a pepper hole method beam current measurement system, comprising: a data acquisition module and a data processing module;
[0007] The data acquisition module is used to obtain the beam image and the hole-screen spacing; wherein the hole-screen spacing is the distance between the pepper hole plate and the fluorescent screen, and the pepper hole plate includes multiple theoretical hole positions;
[0008] The data processing module is used to identify the beam image based on the image processing algorithm to obtain the beam spot centroid and beam spot brightness; calculate the divergence angle based on the aperture screen spacing, the beam spot centroid and the center coordinates of the theoretical aperture position; optimally match the beam spot centroid with the pepper aperture plate based on the Hungarian algorithm; process the beam spot centroid and divergence angle in the phase space based on ellipse fitting to obtain the beam emittance and beam envelope; and,
[0009] The lateral intensity distribution of the beam is obtained based on the beam spot brightness.
[0010] Preferably, the identifying of the beam image based on an image processing algorithm includes:
[0011] Performing image preprocessing on the collected beam image to obtain an image to be measured;
[0012] Perform beam spot detection on the image to be tested according to the LoG operator to obtain multiple beam spots;
[0013] Gaussian fitting is used to analyze the beam spot to obtain the center position and area information of the beam spot's lateral distribution intensity;
[0014] The contour of the image to be measured is extracted according to the morphological processing algorithm to obtain multiple beam spot contours;
[0015] Obtain the number of pixels corresponding to each beam spot outline and mark it as the beam spot area;
[0016] Determine whether the beam spot area is smaller than a preset area threshold; if yes, mark the corresponding beam spot as an invalid beam spot; if no, mark the corresponding beam spot as a valid beam spot;
[0017] The center coordinates of the effective beam spot corresponding to the beam spot contour are extracted and marked as the beam spot centroid.
[0018] It should be noted that the LoG (Laplacian of Gaussian) operator refers to the Laplace of Gaussian operator.
[0019] Preferably, the image preprocessing of the collected beam image includes:
[0020] Extracting a beam image; performing denoising on the beam image by using a median filter or a Gaussian filter to obtain a denoised image; performing threshold segmentation on the denoised image by using an adaptive threshold segmentation algorithm to obtain an image to be measured.
[0021] Preferably, the optimal matching of the beam spot centroid with the pepper plate based on the Hungarian algorithm includes:
[0022] Extract beam spot centroid and pepper plate;
[0023] Calculate the Euclidean distance between the centroid of each beam spot and the center coordinate of the corresponding theoretical hole position in the pepper hole plate in sequence;
[0024] Construct a cost matrix according to the positions of multiple theoretical hole positions in the pepper hole theoretical array, and mark the Euclidean distances of the theoretical hole positions as corresponding element values in the cost matrix;
[0025] The Hungarian algorithm is used to allocate the minimum cost to the cost matrix so that the Euclidean distance between the centroids of multiple beam spots and the corresponding theoretical hole positions in the pepper hole plate is minimized.
[0026] It is worth noting that the minimum cost allocation of the cost matrix through the Hungarian algorithm can ensure that the centroids of multiple beam spots are aligned with the corresponding theoretical hole positions in the pepper hole plate.
[0027] Preferably, the calculation of the divergence angle based on the aperture-screen spacing, the beam spot centroid and the center coordinates of the theoretical aperture position includes:
[0028] Extract the aperture-screen spacing, beam spot centroid and the center coordinates of the theoretical aperture position; by the formula Calculate the divergence angle of the i-th beam spot along the positive direction of the x-axis By formula Calculate the divergence angle of the i-th beam spot along the positive direction of the y-axis Among them, (X i ,Y i ) is the coordinate of the center of mass of the ith beam spot, (x i ,y i ) is the center coordinate of the theoretical aperture that matches the i-th beam spot, L is the aperture-screen distance; i = 1, 2, ..., n, where n is the total number of beam spots.
[0029] Preferably, the processing of the beam spot centroid and divergence angle in the phase space based on ellipse fitting includes:
[0030] The beam spot centroid and divergence angle are extracted; the beam spot centroid and divergence angle are fitted with an ellipse in phase space using the least squares method to obtain a target ellipse; the area of the target ellipse is calculated and marked as the beam emittance; the maximum abscissa and maximum ordinate of the target ellipse in phase space are extracted, and the beam envelope is determined based on the maximum abscissa and maximum ordinate values.
[0031] Preferably, obtaining the transverse intensity distribution of the beam based on the beam spot brightness includes:
[0032] The beam spot brightness corresponding to multiple beam spots is obtained; the beam spot brightness is proportional to the beam intensity passing through the corresponding theoretical aperture position; by normalizing the brightness, the lateral intensity distribution of the beam on the aperture plate plane can be indirectly restored.
[0033] A second aspect of the present invention provides a pepper hole method beam current measurement method, comprising:
[0034] S1: Acquire the beam image and the aperture-screen spacing; the aperture-screen spacing is the distance between the pepper plate and the phosphor screen, and the pepper plate includes multiple theoretical aperture positions;
[0035] S2: Identify the beam image based on the image processing algorithm to obtain the beam spot centroid;
[0036] S3: Calculate the divergence angle based on the aperture-screen spacing, the centroid of the beam spot, and the center coordinates of the theoretical aperture position;
[0037] S4: Optimally match the beam spot centroid with the pepper plate based on the Hungarian algorithm;
[0038] S5: Process the beam spot centroid and divergence angle in phase space based on ellipse fitting to obtain the beam emittance and beam envelope;
[0039] S6: Obtain the transverse intensity distribution of the beam based on the beam spot brightness.
[0040] A third aspect of the present invention provides a processor, which is used to run a program, wherein the program executes the above-mentioned pepper hole method beam current measurement method when running.
[0041] A fourth aspect of the present invention provides a storage medium, which includes a stored program, wherein when the program is run, the device where the storage medium is located is controlled to execute the above-mentioned pepper hole method beam current measurement method.
[0042] Compared with the prior art, the present invention has the following beneficial effects:
[0043] The present invention obtains the beam image and the aperture-screen spacing, combines the image processing algorithm to accurately identify the beam spot centroid, uses the aperture-screen spacing, the centroid coordinates and the theoretical aperture center coordinates to calculate the divergence angle, and uses the Hungarian algorithm to achieve the optimal matching of the beam spot centroid and the theoretical aperture position, effectively eliminating position deviation and improving matching efficiency. Furthermore, based on the phase space ellipse fitting technology, the beam spot centroid and divergence angle data are integrated to accurately calculate the beam emittance and envelope, significantly improving the accuracy of the characterization of the beam phase space distribution. At the same time, the lateral intensity distribution is analyzed in combination with the beam spot brightness to systematically achieve multi-dimensional quantification of beam parameters. This method solves the problems of large matching errors, high computational complexity and incomplete parameter coverage in traditional beam analysis through the organic combination of algorithm optimization and phase space model, thereby improving the accuracy and efficiency of beam measurement and providing reliable technical support for accelerator beam diagnosis, optimization and stability control. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0045] Figure 1 : is an overall flow chart of the pepper hole method beam current measurement method in this embodiment;
[0046] Figure 2 Schematic diagram of the principle of the pepper hole method beam current measurement system in this embodiment;
[0047] Figure 3 is the beam image collected in this embodiment;
[0048] Figure 4 : is a position marking diagram of multiple beam spots in this embodiment;
[0049] Figure 5 is a Gaussian fitting curve corresponding to the beam spot numbered 1 in this embodiment;
[0050] Figure 6 is a Gaussian fitting curve corresponding to the beam spot numbered 83 in this embodiment;
[0051] Figure 7 is the transverse intensity distribution diagram of the horizontal beam in this embodiment;
[0052] Figure 8 is the transverse intensity distribution diagram of the vertical beam in this embodiment;
[0053] Figure 9 is the beam envelope diagram in this embodiment;
[0054] Figure 10 This is a schematic diagram of the beam current measurement principle of the pepper hole plate and the fluorescent screen in this embodiment. DETAILED DESCRIPTION
[0055] The technical solutions of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the embodiments described are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0056] See also Figures 1-10 , a first aspect of the present invention provides a pepper hole method beam current measurement system, comprising: a data acquisition module and a data processing module;
[0057] Data acquisition module: used to obtain beam images and aperture-screen spacing; the aperture-screen spacing is the distance between the pepper plate and the fluorescent screen, and the pepper plate includes multiple theoretical aperture positions;
[0058] Data processing module: used to identify the beam image based on the image processing algorithm to obtain the beam spot centroid and beam spot brightness; calculate the divergence angle based on the aperture screen spacing, the beam spot centroid and the center coordinates of the theoretical aperture position; optimally match the beam spot centroid with the pepper plate based on the Hungarian algorithm; process the beam spot centroid and divergence angle in phase space based on ellipse fitting to obtain the beam emittance and beam envelope; and,
[0059] The lateral intensity distribution of the beam is obtained based on the beam spot brightness.
[0060] In this embodiment, the beam image is identified based on an image processing algorithm, including:
[0061] Performing image preprocessing on the collected beam image to obtain an image to be measured;
[0062] Perform beam spot detection on the image to be tested according to the LoG operator to obtain multiple beam spots;
[0063] Gaussian fitting is used to analyze the beam spot to obtain the center position and area information of the beam spot's lateral distribution intensity;
[0064] The contour of the image to be measured is extracted according to the morphological processing algorithm to obtain multiple beam spot contours;
[0065] Obtain the number of pixels corresponding to each beam spot outline and mark it as the beam spot area;
[0066] Determine whether the beam spot area is smaller than a preset area threshold; if yes, mark the corresponding beam spot as an invalid beam spot; if no, mark the corresponding beam spot as a valid beam spot;
[0067] The center coordinates of the effective beam spot corresponding to the beam spot contour are extracted and marked as the beam spot centroid.
[0068] It should be noted that the LoG (Laplacian of Gaussian) operator refers to the Laplace of Gaussian operator.
[0069] In this embodiment, image preprocessing is performed on the collected beam image, including:
[0070] Extracting a beam image; performing denoising on the beam image by using a median filter or a Gaussian filter to obtain a denoised image; performing threshold segmentation on the denoised image by using an adaptive threshold segmentation algorithm to obtain an image to be measured.
[0071] In this embodiment, the Hungarian algorithm is used to optimally match the beam spot centroid with the pepper plate, including:
[0072] Extract beam spot centroid and pepper plate;
[0073] Calculate the Euclidean distance between the centroid of each beam spot and the center coordinate of the corresponding theoretical hole position in the pepper hole plate in sequence;
[0074] Construct a cost matrix according to the positions of multiple theoretical hole positions in the pepper hole plate, and mark the Euclidean distance of the theoretical hole positions as the corresponding element value in the cost matrix;
[0075] The Hungarian algorithm is used to allocate the minimum cost to the cost matrix so that the Euclidean distance between the centroids of multiple beam spots and the corresponding theoretical hole positions in the pepper hole plate is minimized.
[0076] It is worth noting that the minimum cost allocation of the cost matrix through the Hungarian algorithm can ensure that the centroids of multiple beam spots are aligned with the corresponding theoretical hole positions in the pepper hole plate.
[0077] In this embodiment, the divergence angle is calculated based on the aperture-screen spacing, the beam spot centroid, and the center coordinates of the theoretical aperture position, including:
[0078] Extract the aperture-screen spacing, beam spot centroid and the center coordinates of the theoretical aperture position; by the formula Calculate the divergence angle of the i-th beam spot along the positive direction of the x-axis By formula Calculate the divergence angle of the i-th beam spot along the positive direction of the y-axis Among them, (X i ,Y i ) is the coordinate of the center of mass of the ith beam spot, (x i ,y i ) is the center coordinate of the theoretical aperture that matches the i-th beam spot, L is the aperture-screen distance; i = 1, 2, ..., n, where n is the total number of beam spots.
[0079] In this embodiment, the beam spot centroid and divergence angle are processed in the phase space based on ellipse fitting, including:
[0080] The beam spot centroid and divergence angle are extracted; the beam spot centroid and divergence angle are fitted with an ellipse in phase space using the least squares method to obtain a target ellipse; the area of the target ellipse is calculated and marked as the beam emittance; the maximum abscissa and maximum ordinate of the target ellipse in phase space are extracted, and the beam envelope is determined based on the maximum abscissa and maximum ordinate values.
[0081] In this embodiment, obtaining the transverse intensity distribution of the beam based on the beam spot brightness includes:
[0082] The beam spot brightness corresponding to multiple beam spots is obtained; the beam spot brightness is proportional to the beam intensity passing through the corresponding theoretical aperture position; by normalizing the brightness, the lateral intensity distribution of the beam on the aperture plate plane can be indirectly restored.
[0083] A second embodiment of the present invention provides a pepper hole method beam current measurement method, comprising:
[0084] S1: Acquire the beam image and the aperture-screen spacing; the aperture-screen spacing is the distance between the pepper plate and the phosphor screen, and the pepper plate includes multiple theoretical aperture positions;
[0085] S2: Identify the beam image based on the image processing algorithm to obtain the beam spot centroid;
[0086] S3: Calculate the divergence angle based on the aperture-screen spacing, the centroid of the beam spot, and the center coordinates of the theoretical aperture position;
[0087] S4: Optimally match the beam spot centroid with the pepper plate based on the Hungarian algorithm;
[0088] S5: Process the beam spot centroid and divergence angle in phase space based on ellipse fitting to obtain the beam emittance and beam envelope;
[0089] S6: Obtain the transverse intensity distribution of the beam based on the beam spot brightness.
[0090] A third aspect of the present invention provides a processor configured to run a program, wherein the program executes the above-mentioned pepper hole method beam current measurement method when the program is running.
[0091] A fourth aspect of the present invention provides a storage medium, which includes a stored program. When the program is running, the device where the storage medium is located is controlled to execute the above-mentioned pepper hole method beam current measurement method.
[0092] The above embodiments are only used to illustrate the technical method of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical method of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical method of the present invention.
Claims
1. A pepper hole method beam current measurement system, comprising: Data acquisition module and data processing module; characterized in that, The data acquisition module is used to obtain the beam image and the hole-screen spacing; wherein the hole-screen spacing is the distance between the pepper hole plate and the fluorescent screen, and the pepper hole plate includes multiple theoretical hole positions; The data processing module is used to identify the beam image based on the image processing algorithm to obtain the beam spot centroid; calculate the divergence angle based on the aperture screen spacing, the beam spot centroid and the center coordinates of the theoretical aperture position; optimally match the beam spot centroid with the pepper aperture plate based on the Hungarian algorithm; process the beam spot centroid and the divergence angle in the phase space based on ellipse fitting to obtain the beam emittance and beam envelope; and The lateral intensity distribution of the beam is obtained based on the beam spot brightness.
2. The pepper hole method beam current measurement system according to claim 1, characterized in that: The identifying of the beam image based on the image processing algorithm includes: Performing image preprocessing on the collected beam image to obtain an image to be measured; Perform beam spot detection on the image to be tested according to the LoG operator to obtain multiple beam spots; Gaussian fitting is used to analyze the beam spot to obtain the center position and area information of the beam spot's lateral distribution intensity; The contour of the image to be measured is extracted according to the morphological processing algorithm to obtain multiple beam spot contours; Obtain the number of pixels corresponding to each beam spot outline and mark it as the beam spot area; Determine whether the beam spot area is smaller than a preset area threshold; if yes, mark the corresponding beam spot as an invalid beam spot; if no, mark the corresponding beam spot as a valid beam spot; The center coordinates of the effective beam spot corresponding to the beam spot contour are extracted and marked as the beam spot centroid.
3. The pepper hole method beam current measurement system according to claim 2, characterized in that: The image preprocessing of the collected beam image includes: Extracting a beam image; performing denoising on the beam image by using a median filter or a Gaussian filter to obtain a denoised image; performing threshold segmentation on the denoised image by using an adaptive threshold segmentation algorithm to obtain an image to be measured.
4. The pepper hole method beam current measurement system according to claim 1, characterized in that: The optimal matching of the beam spot centroid and the pepper plate based on the Hungarian algorithm includes: Extract beam spot centroid and pepper plate; Calculate the Euclidean distance between the centroid of each beam spot and the center coordinate of the corresponding theoretical hole position in the pepper hole plate in sequence; Construct a cost matrix according to the positions of multiple theoretical hole positions in the pepper hole theoretical array, and mark the Euclidean distances of the theoretical hole positions as corresponding element values in the cost matrix; The Hungarian algorithm is used to allocate the minimum cost to the cost matrix so that the Euclidean distance between the centroids of multiple beam spots and the corresponding theoretical hole positions in the pepper hole plate is minimized.
5. The pepper hole method beam current measurement system according to claim 1, characterized in that: The calculation of the divergence angle based on the aperture-screen spacing, the beam spot centroid, and the center coordinates of the theoretical aperture position includes: Extract the aperture-screen spacing, beam spot centroid and the center coordinates of the theoretical aperture position; by the formula Calculate the divergence angle of the i-th beam spot along the positive direction of the x-axis By formula Calculate the divergence angle of the i-th beam spot along the positive direction of the y-axis Among them, (X i ,Y i ) is the coordinate of the center of mass of the ith beam spot, (x i ,y i ) is the center coordinate of the theoretical aperture that matches the i-th beam spot, L is the aperture-screen distance; i = 1, 2, ..., n, where n is the total number of beam spots.
6. The pepper hole method beam current measurement system according to claim 1, characterized in that: The processing of the beam spot centroid and the divergence angle in the phase space based on ellipse fitting includes: The beam spot centroid and divergence angle are extracted; the beam spot centroid and divergence angle are fitted with an ellipse in phase space using the least squares method to obtain a target ellipse; the area of the target ellipse is calculated and marked as the beam emittance; the maximum abscissa and maximum ordinate of the target ellipse in phase space are extracted, and the beam envelope is determined based on the maximum abscissa and maximum ordinate values.
7. The pepper hole method beam current measurement system according to claim 1, characterized in that: The step of obtaining the transverse intensity distribution of the beam based on the beam spot brightness includes: The beam spot brightness corresponding to multiple beam spots is obtained; the beam spot brightness is proportional to the beam intensity passing through the corresponding theoretical aperture position; by normalizing the brightness, the lateral intensity distribution of the beam on the aperture plate plane can be indirectly restored.
8. A pepper hole method beam current measurement method, based on the pepper hole method beam current measurement system according to any one of claims 1 to 7, characterized in that: include: Obtaining a beam image and the aperture-screen spacing; wherein the aperture-screen spacing is the distance between the pepper plate and the phosphor screen, and the pepper plate includes multiple theoretical aperture positions; The beam image is identified based on the image processing algorithm to obtain the beam spot centroid; The divergence angle is calculated based on the aperture-screen spacing, the centroid of the beam spot, and the center coordinates of the theoretical aperture position; The beam spot centroid is optimally matched with the pepper plate based on the Hungarian algorithm; Based on ellipse fitting, the beam spot centroid and divergence angle are processed in phase space to obtain the beam emittance and beam envelope; The lateral intensity distribution of the beam is obtained based on the beam spot brightness.
9. A processor, characterized in that: The processor is used to run a program, wherein the program, when running, executes the pepper hole method beam current measurement method described in claim 8.
10. A storage medium, characterized in that: The storage medium includes a stored program, wherein when the program is executed, the device where the storage medium is located is controlled to execute the pepper hole method beam current measurement method described in claim 8.