A fitting detection method and system for spectral lines of arc plasma
Through multimodal fitting and error detection methods, the problem of fitting error in arc plasma spectral line fitting detection is solved, and the accuracy of the detection data is improved.
Patent Information
- Application Number
- CN202410754025.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-12
- Publication Date
- 2025-07-29
- Estimated Expiration
- 2044-06-12
AI Technical Summary
In the existing arc plasma spectral line fitting detection methods, the fitting function can only give the root mean square error within the fitting range, which is prone to fitting errors, resulting in low accuracy of the fitting data obtained by the detection.
By obtaining the spectrum of arc plasma emission, performing multi-peak fitting to generate a fitting curve, selecting spectral line peaks based on the peak position of the fitting curve and the peak position of the spectral line corresponding to the spectrum, determining the fitting curve data and spectral line range, and performing fitting error detection to generate fitting detection data.
The accuracy of the fitting detection results is improved, and the problem that the fitting function can only give the root mean square error within the fitting range in the existing method is solved to ensure the accuracy of the fitting data.
Smart Images

Figure CN118464877B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of arc plasma, and in particular to a fitting detection method and system for spectral lines of arc plasma. Background Art
[0002] The arc model is an important basis for evaluating and calculating the current interruption of a circuit breaker. As a low-temperature plasma, the arc can be studied by optical diagnostic methods of plasma emission spectroscopy to obtain parameters such as the composition and temperature of the arc. The spectrum of the plasma is mainly divided into a continuous spectrum and a line spectrum. The line spectrum is the emission or absorption spectrum generated by the transition between two bound energy levels of electrons in an atom. Since the interval between energy levels is determined and discrete, showing sharp spectral lines, it is called a line spectrum. For the emission spectrum of the plasma, it is mainly the line spectrum generated when atoms and ions of various elements in the plasma transition from high energy levels to low energy levels.
[0003] The existing fitting detection method for spectral lines of arc plasma is based on the collected line spectrum, uses the Lorentz line shape for multi-peak fitting, and evaluates the fitting effect. By separating the spectral line parameters of each element and each ionization state through the fitting curve, the plasma parameters such as the composition and temperature of the arc plasma can be calculated and obtained. However, the fitting function used in this method can only give the root mean square error within the fitting range. In some cases, spectral line information shown by some elements with relatively low content may appear within the fitting range, resulting in fitting errors. At this time, the root mean square error given by the fitting function cannot represent the fitting quality of the spectral line at the desired fitting position, leading to low accuracy of the fitting data obtained by detection. Summary of the Invention
[0004] The present invention provides a fitting detection method and system for spectral lines of arc plasma, which solves the technical problem that the fitting function used in the existing fitting detection method can only give the root mean square error within the fitting range, is prone to fitting errors, and leads to low accuracy of the fitting data obtained by detection.
[0005] A fitting detection method for spectral lines of arc plasma provided by the present invention includes:
[0006] Obtain the spectrum emitted by the arc plasma, perform multi-peak fitting on the spectral line data corresponding to the spectrum, and generate a fitting curve;
[0007] Select spectral line peaks according to the peak positions of the fitting curve and the spectral line peaks corresponding to the spectrum, and determine the fitting curve data and the spectral line range;
[0008] Perform fitting error detection based on the fitting curve data and the spectral line range, and generate fitting detection data corresponding to the spectrum.
[0009] Optionally, the step of performing multi-peak fitting on the spectral line data corresponding to the spectrum to generate a fitting curve includes:
[0010] Substitute the full width at half maximum, central wavelength, and wavelength of the spectral line in the spectral line data into a preset fitting function for multi-peak fitting to generate a fitting curve;
[0011] The preset fitting function is:
[0012] ;
[0013] where is the fitting curve; is the full width at half maximum of the spectral line, nm; is the central wavelength of the spectral line, nm; is the wavelength of the spectral line, nm.
[0014] Optionally, the step of selecting spectral line peaks based on the peak positions of the fitting curve and the spectral line peaks corresponding to the spectrum, and determining the fitting curve data and spectral line range includes:
[0015] Calculate the distance difference between the peak position of the fitting curve and the peak position of the spectral line corresponding to the spectrum;
[0016] Based on the distance difference and a preset difference threshold, determine the fitting curve data corresponding to the fitting curve;
[0017] Taking the peak position corresponding to the fitting curve data as the center, measure a complete spectral line peak to generate a spectral line range.
[0018] Optionally, the step of performing fitting error detection based on the fitting curve data and the spectral line range to generate the fitting detection data corresponding to the spectrum includes:
[0019] Judge whether the distance difference is less than the preset difference threshold;
[0020] If so, set the fitting curve data corresponding to the fitting curve as correctly fitted;
[0021] If not, set the curve data corresponding to the fitting curve as having too large a deviation in the fitting curve.
[0022] Optionally, the step of performing fitting error detection based on the fitting curve data and the spectral line range to generate the fitting detection data corresponding to the spectrum includes:
[0023] Remove the range corresponding to the spectral line range in the fitting curve to generate a spectral line fitting range;
[0024] Perform fitting error detection based on the fitting curve and the spectral line fitting range to generate fitting error data corresponding to the spectrum;
[0025] Calculate the normalized root mean square error between the curve data corresponding to the spectral line range and the spectral data corresponding to the spectrum to generate the normalized root mean square error;
[0026] When the normalized root mean square error is less than or equal to the third preset threshold, construct first fitting detection data corresponding to the spectrum by using the fitting curve data, the fitting error data, and the normalized root mean square error;
[0027] When the normalized root mean square error is greater than the third preset threshold, perform multi-peak fitting on the spectral line data corresponding to the spectral line range to generate a multi-peak fitting curve;
[0028] Calculate the normalized root mean square error between the curve data corresponding to the multi-peak fitting curve and the spectral data corresponding to the spectrum to generate the multi-peak normalized root mean square error;
[0029] Construct second fitting detection data corresponding to the spectrum by using the fitting curve data, the fitting error data, and the multi-peak normalized root mean square error.
[0030] Optionally, the step of performing fitting error detection based on the fitting curve and the spectral line fitting range to generate fitting error data corresponding to the spectrum includes:
[0031] Calculate the minimum vertical distance between each peak and its adjacent trough in the spectral line fitting range respectively to generate a plurality of minimum vertical distances;
[0032] Judge whether the minimum vertical distance is greater than the first preset threshold;
[0033] If so, set the error data corresponding to the minimum vertical distance as a characteristic peak caused by other elements;
[0034] If not, judge whether the minimum vertical distance is greater than the second preset threshold;
[0035] If so, set the error data corresponding to the minimum vertical distance as having fitting perturbation;
[0036] If not, set the error data corresponding to the minimum vertical distance as only having a single characteristic peak;
[0037] Construct fitting error data corresponding to the spectrum by using the error data corresponding to all the minimum vertical distances.
[0038] Optionally, the step of calculating the root mean square error between the curve data corresponding to the spectral line range and the spectral data corresponding to the spectrum to generate the root mean square error includes:
[0039] Substitute the curve data corresponding to the spectral line range and the spectral data corresponding to the spectrum into a preset root mean square error calculation formula to calculate the root mean square error;
[0040] The preset root mean square error calculation formula is:
[0041] ;
[0042] where is the root mean square error; is the number of curve data corresponding to the spectral line range; is the true value, that is, the spectral data; is the predicted value, that is, the curve data;
[0043] Calculate the difference between the maximum value and the minimum value in the spectral data to generate a data difference;
[0044] Calculate the ratio between the root mean square error and the data difference to generate a normalized root mean square error.
[0045] The present invention also provides a fitting detection system for an arc plasma spectral line, including:
[0046] A fitting curve generation module, configured to obtain the spectrum emitted by the arc plasma, perform multi-peak fitting on the spectral line data corresponding to the spectrum, and generate a fitting curve;
[0047] A fitting curve data and spectral line range determination module, configured to select spectral line peaks according to the peak positions of the fitting curve and the spectral line peaks corresponding to the spectrum, and determine the fitting curve data and the spectral line range;
[0048] A fitting detection data generation module, configured to perform fitting error detection based on the fitting curve data and the spectral line range, and generate the fitting detection data corresponding to the spectrum.
[0049] The present invention also provides an electronic device, including a memory and a processor. When the computer program stored in the memory is executed by the processor, the processor is caused to execute the steps of implementing the fitting detection method for the arc plasma spectral line as described in any one of the above.
[0050] The present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed, it implements the fitting detection method for the arc plasma spectral line as described in any one of the above.
[0051] As can be seen from the above technical solutions, the present invention has the following advantages:
[0052] By comparing the peak position of the fitting curve and the peak position of the spectral line corresponding to the spectrum, the present invention determines the correctness of the fitting, and selects the spectral line range within the fitting range corresponding to the fitting curve. Based on this spectral line range, combined with the fitting curve data for fitting error detection, the accuracy of the fitting detection result can be improved. It solves the technical problem that the fitting function used in the existing fitting detection method can only give the root mean square error within the fitting range, which is prone to fitting errors and results in low accuracy of the fitting data obtained by detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0054] Figure 1 It is a flowchart of the steps of a fitting detection method for an arc plasma spectral line provided in Embodiment 1 of the present invention;
[0055] Figure 2 It is a flowchart of the steps of a fitting detection method for an arc plasma spectral line provided in Embodiment 2 of the present invention;
[0056] Figure 3 It is a flowchart of a fitting detection method for an arc plasma spectral line provided in Embodiment 2 of the present invention;
[0057] Figure 4 It is the first multi-peak fitting diagram provided in Embodiment 2 of the present invention;
[0058] Figure 5 It is the second multi-peak fitting diagram provided in Embodiment 2 of the present invention;
[0059] Figure 6 It is the third multi-peak fitting diagram provided in Embodiment 2 of the present invention;
[0060] Figure 7 It is the fitting diagram after improvement of the third multi-peak fitting diagram provided in Embodiment 2 of the present invention;
[0061] Figure 8 It is a structural block diagram of a fitting detection system for an arc plasma spectral line provided in Embodiment 3 of the present invention;
[0062] Figure 9 It is a structural block diagram of an electronic device provided in Embodiment 4 of the present invention. Specific Embodiments
[0063] Through the analysis of the emission spectrum of the arc plasma, the spatial distribution and time evolution information of the arc plasma components and parameters can be obtained. In the experiment, the emission spectrum of the arc plasma is collected and diagnosed based on optical fibers and spectrometers. However, in places where the plasma density and temperature are relatively high, due to the wide broadening of the atomic spectral lines and ionic spectral lines of each element, there are spectral line overlaps. If the peak value of the spectral line is directly selected for subsequent calculation of plasma parameters, large errors will occur. Therefore, multi-peak spectral line fitting is required to separate the spectral line parameters of different ionization states. After spectral line fitting, it is necessary to evaluate the fitting quality of the spectral line. Since the fitting function can only give the root mean square error within the fitting range, and in some cases, spectral line information manifested by some elements with relatively low content will appear within the fitting range, resulting in fitting errors. At this time, the root mean square error given by the fitting function cannot represent the fitting quality of the spectral line at the desired fitting position either.
[0064] Therefore, the embodiments of the present invention provide a fitting detection method and system for arc plasma spectral lines, which are used to solve the technical problem that the fitting function used in the existing fitting detection method can only give the root mean square error within the fitting range, is prone to fitting errors, and leads to low accuracy of the detected fitting data.
[0065] In order to make the objectives, features, and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the embodiments described below are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0066] Embodiment 1
[0067] Please refer to Figure 1 , Figure 1 which is a flowchart of the steps of a fitting detection method for arc plasma spectral lines provided by Embodiment 1 of the present invention.
[0068] A fitting detection method for arc plasma spectral lines provided by the first example of the present invention includes:
[0069] Step 101: Obtain the spectrum emitted by the arc plasma, perform multi-peak fitting on the spectral line data corresponding to the spectrum, and generate a fitting curve.
[0070] In the embodiments of the present invention, the collection and sampling of the arc plasma emission spectrum are carried out through an optical fiber and a spectrometer. For spectral lines of the same or different elements in the same ionization state or different ionization states, if the central wavelengths of the spectral lines are relatively close and the broadening is relatively large, assuming that the line shapes of the spectral lines are Lorentzian line shapes, a preset fitting function is used for multi-peak fitting to obtain a fitting curve and relevant fitting parameters. Specifically, the full width at half maximum, the central wavelength of the spectral line, and the wavelength of the spectral line in the spectral line data are substituted into the preset fitting function for multi-peak fitting to generate a fitting curve.
[0071] Step 102: Select spectral line peaks according to the peak positions of the fitting curve and the spectral line peaks corresponding to the spectrum, and determine the fitting curve data and the spectral line range.
[0072] In the embodiments of the present invention, the distance difference between the peak position of the fitting curve and the spectral line peak position corresponding to the spectrum is calculated. Based on the distance difference and a preset difference threshold, the fitting curve data corresponding to the fitting curve is determined. Taking the peak position corresponding to the fitting curve data as the center, a complete spectral line peak is measured to generate a spectral line range.
[0073] Step 103: Perform fitting error detection based on the fitting curve data and the spectral line range to generate fitting detection data corresponding to the spectrum.
[0074] In the embodiments of the present invention, the range corresponding to the spectral line range in the fitting curve is removed to generate a spectral line fitting range. Fitting error detection is performed based on the fitting curve and the spectral line fitting range to generate fitting error data corresponding to the spectrum. The normalized root mean square error between the curve data corresponding to the spectral line range and the spectral data corresponding to the spectrum is calculated to generate the normalized root mean square error. When the normalized root mean square error is less than or equal to a third preset threshold, the fitting curve data, the fitting error data, and the normalized root mean square error are used to construct first fitting detection data corresponding to the spectrum. When the normalized root mean square error is greater than the third preset threshold, multi-peak fitting is performed using the spectral line data corresponding to the spectral line range to generate a multi-peak fitting curve. The normalized root mean square error between the curve data corresponding to the multi-peak fitting range and the spectral data corresponding to the spectrum is calculated to generate a multi-peak normalized root mean square error. The fitting curve data, the fitting error data, and the multi-peak normalized root mean square error are used to construct second fitting detection data corresponding to the spectrum.
[0075] In an embodiment of the present invention, by acquiring the spectrum emitted by the arc plasma, performing multi-peak fitting on the spectral line data corresponding to the spectrum, and generating a fitting curve. Selecting spectral line peaks according to the peak positions of the fitting curve and the spectral line peak positions corresponding to the spectrum, and determining the fitting curve data and the spectral line range. Performing fitting error detection based on the fitting curve data and the spectral line range to generate fitting detection data corresponding to the spectrum. By comparing the peak positions of the fitting curve and the spectral line peak positions corresponding to the spectrum, the correctness of the fitting is determined, and a spectral line range is selected within the fitting range corresponding to the fitting curve. Based on this spectral line range, combining the fitting curve data to perform fitting error detection can improve the accuracy of the fitting detection result. It solves the technical problem that the fitting function used in the existing fitting detection method can only give the root mean square error within the fitting range, which is prone to fitting errors and results in low accuracy of the fitting data obtained by the detection.
[0076] Embodiment 2
[0077] Please refer to Figure 2 , Figure 2 which is the flowchart of the steps of a fitting detection method for the spectral lines of an arc plasma spectrum provided in Embodiment 2 of the present invention.
[0078] Another fitting detection method for the spectral lines of an arc plasma spectrum provided in the second embodiment of the present invention includes:
[0079] Step 201: Acquire the spectrum emitted by the arc plasma, perform multi-peak fitting on the spectral line data corresponding to the spectrum, and generate a fitting curve.
[0080] Further, Step 201 may include the following sub-step S11:
[0081] S11: Substitute the spectral line full width at half maximum, spectral line center wavelength, and spectral line wavelength in the spectral line data into a preset fitting function for multi-peak fitting to generate a fitting curve.
[0082] The preset fitting function is:
[0083] ;
[0084] wherein, is the fitting curve; is the spectral line full width at half maximum, nm; is the spectral line center wavelength, nm; is the spectral line wavelength, nm.
[0085] In the embodiments of the present invention, assuming the spectral line shape is Lorentzian, the relative intensity ratios of ionized state particles are determined to obtain the intensities of separated spectral lines. The fit function is used to fit the spectral line data within the spectral line fitting range, and fitting parameters such as the spectral line broadening of each particle are obtained. Specifically, by substituting the full width at half maximum, central wavelength, and wavelength of the spectral line corresponding to the spectral line data into a preset fitting function for multi-peak fitting, a fitting curve is obtained.
[0086] Step 202: Select spectral line peaks according to the peak positions of the fitting curve and the spectral line peaks corresponding to the spectrum, and determine the fitting curve data and spectral line range.
[0087] Further, step 202 may include the following sub-steps S21 - S23:
[0088] S21: Calculate the distance difference between the peak position of the fitting curve and the spectral line peak position corresponding to the spectrum.
[0089] S22: Based on the distance difference and a preset difference threshold, determine the fitting curve data corresponding to the fitting curve.
[0090] S23: Taking the peak position corresponding to the fitting curve data as the center, measure a complete spectral line peak to generate a spectral line range.
[0091] Further, step S22 may include the following sub-steps S221 - S223:
[0092] S221: Determine whether the distance difference is less than the preset difference threshold. If so, execute step S222; if not, execute step S223.
[0093] S222: Set the fitting curve data corresponding to the fitting curve as correctly fitted.
[0094] S223: Set the curve data corresponding to the fitting curve as having too large a fitting deviation.
[0095] The preset difference threshold refers to the critical value of the distance difference between the peak position of the fitting curve and the spectral line peak position corresponding to the spectrum, usually set to 0.5 nm.
[0096] In an embodiment of the present invention, the peak position of the fitting curve is determined and compared with the peak position of the spectral line of the spectrum. If the difference in distance is less than 0.5 nm, that is, the distance difference is less than the preset difference threshold, it is considered an effective fitting process and the fitting position is correct. At this time, the fitting curve data corresponding to the fitting curve is set to have the correct fitting position. Then, with the peak position of the spectral data to be fitted as the center, a complete spectral line peak is measured, and the spectral range of the complete spectral line peak is determined. The spectral range taken is plus or minus 2.3 nm of the desired central wavelength. When the distance difference is greater than or equal to 0.5 nm, that is, the distance difference is greater than or equal to the preset difference threshold, a reminder of an invalid fitting process is output, the curve data corresponding to the fitting curve is set to have a too large deviation of the fitting curve, and the following steps are continued to determine the reason for the too large deviation of the fitting curve through subsequent steps and improve the fitting result by narrowing the fitting spectral range.
[0097] Step 203: Remove the range corresponding to the spectral range in the fitting curve to generate a spectral fitting range.
[0098] In an embodiment of the present invention, the part of the fitting curve other than the spectral range is used as the spectral fitting range. By performing fitting error detection on the spectral fitting range, the obtained fitting error data can enable the calculation personnel to analyze whether there are spectral lines of other elements in the fitting range or determine the perturbation position to better improve the fitting method and fitting result.
[0099] Step 204: Perform fitting error detection based on the fitting curve and the spectral fitting range to generate fitting error data corresponding to the spectrum.
[0100] Further, step 204 may include the following sub-steps S31 - S37:
[0101] S31: Calculate the minimum vertical distance between each peak and its adjacent trough in the spectral fitting range respectively to generate a plurality of minimum vertical distances.
[0102] S32: Determine whether the minimum vertical distance is greater than the first preset threshold. If so, execute step S33; if not, execute step S34.
[0103] S33: Set the error data corresponding to the minimum vertical distance to a characteristic peak caused by other elements.
[0104] S34: Determine whether the minimum vertical distance is greater than the second preset threshold. If so, execute step S35; if not, execute step S36.
[0105] S35: Set the error data corresponding to the minimum vertical distance to a fitting perturbation.
[0106] S36. Set the error data corresponding to the minimum vertical distance to have only a single characteristic peak.
[0107] S37. Use all the error data corresponding to the minimum vertical distances to construct the fitting error data corresponding to the spectrum.
[0108] The first preset threshold is a critical value used to screen whether there are characteristic peaks caused by other elements around the peak in the spectral fitting range, and is usually set to 10% of the peak position of the peak.
[0109] The second preset threshold is a perturbation position used to screen whether there is a fitting error around the peak in the spectral fitting range, and is usually set to 5% of the peak position of the peak.
[0110] In the embodiment of the present invention, determine the spectral fitting range outside the spectral peak to obtain the spectral fitting range. Calculate the minimum vertical distance between each peak and its adjacent trough in the spectral fitting range respectively to generate a plurality of minimum vertical distances. Then, in this range, find the peak position of the spectral peak where the minimum vertical distance between the peak and its adjacent trough is greater than 10% to screen for characteristic peaks caused by other elements. If the minimum vertical distance is greater than the first preset threshold, set the error data corresponding to the minimum vertical distance to have characteristic peaks caused by other elements. If the minimum vertical distance is less than or equal to the first preset threshold, it is also necessary to find the peak position of the spectral peak where the minimum vertical distance between the peak and its adjacent trough is greater than 5% to determine the perturbation position causing the fitting error. If the minimum vertical distance is greater than the second preset threshold, set the error data corresponding to the minimum vertical distance to have a fitting perturbation. If the minimum vertical distance is less than or equal to the second preset threshold, set the error data corresponding to the minimum vertical distance to have only a single characteristic peak. After judging all the minimum vertical distances in the spectral fitting range, use the obtained error data corresponding to all the minimum vertical distances to construct the fitting error data corresponding to the spectrum. The obtained fitting error data can be used to analyze whether there are spectral lines of other elements in the fitting range or to determine the perturbation position to better improve the fitting method and fitting result.
[0111] Step 205. Calculate the normalized root mean square error between the curve data corresponding to the spectral range and the spectral data corresponding to the spectrum to generate the normalized root mean square error.
[0112] Further, step 205 may include the following sub-steps S41 - S43:
[0113] S41. Substitute the curve data corresponding to the spectral range and the spectral data corresponding to the spectrum into the preset root mean square error calculation formula to calculate the root mean square error.
[0114] The preset root mean square error calculation formula is:
[0115] ;
[0116] Among them, is the root mean square error; is the number of curve data corresponding to the spectral line range; is the true value, that is, the spectral data; is the predicted value, that is, the curve data.
[0117] S42. Calculate the difference between the maximum value and the minimum value in the spectral data to generate a data difference.
[0118] S43. Calculate the ratio between the root mean square error and the data difference to generate a normalized root mean square error.
[0119] In the embodiment of the present invention, within the spectral line range of the obtained complete spectral line peak, calculate the root mean square error and the normalized root mean square error between the fitting curve and the characteristic peak. Specifically: Substitute the curve data corresponding to the spectral line range and the spectral data corresponding to the spectrum into the preset root mean square error calculation formula to calculate the root mean square error. Then normalize the root mean square error, and obtain the data difference by calculating the difference between the maximum value and the minimum value in the spectral data. Finally, calculate the ratio between the root mean square error and the data difference to obtain the normalized root mean square error. The corresponding normalized root mean square error calculation formula is:
[0120] ;
[0121] Among them, is the normalized root mean square error; is the root mean square error; is the maximum value of the spectral data; is the minimum value of the spectral data.
[0122] Step 206. When the normalized root mean square error is less than or equal to the third preset threshold, construct the first fitting detection data corresponding to the spectrum by using the fitting curve data, the fitting error data, and the normalized root mean square error.
[0123] The third preset threshold is a critical value used to determine whether the normalized root mean square error meets the requirements, and is usually set to 0.05.
[0124] In the embodiment of the present invention, if the normalized root mean square error is less than or equal to 0.05, after determining that the spectral line fitting is relatively accurate, the process ends. At this time, a fitting curve with relatively high accuracy is obtained, and the overlapping emission spectral lines are separated for use in subsequent other calculations. And construct the first fitting detection data corresponding to the spectrum by using the fitting curve data, the fitting error data, and the normalized root mean square error.
[0125] Step 207: When the normalized root mean square error is greater than the third preset threshold, perform multi-peak fitting using the spectral data corresponding to the spectral range to generate a multi-peak fitting curve.
[0126] In the embodiment of the present invention, if the normalized root mean square error is greater than 0.05, there is a large error in spectral fitting. At this time, perform spectral fitting of the desired complete spectral peaks, use the obtained single complete spectral peak as the fitting data, and perform multi-peak fitting of the ionization state spectra of the desired particles whose central wavelengths are near the spectral peaks within the spectral range, that is, perform multi-peak fitting within the spectral range, which is equivalent to narrowing the fitting range, and only use a complete spectral peak near the central wavelength as the spectral data to be fitted, and re-perform the fitting process. Also use the Lorentz line shape for fitting calculation to obtain the multi-peak fitting curve and the curve data corresponding to the multi-peak fitting curve, that is, the fitting parameters.
[0127] Step 208: Calculate the normalized root mean square error between the curve data corresponding to the multi-peak fitting range and the spectral data corresponding to the spectrum to generate a multi-peak normalized root mean square error.
[0128] In the embodiment of the present invention, substitute the curve data corresponding to the multi-peak fitting range and the spectral data corresponding to the spectrum into the above preset root mean square error calculation formula and the normalized root mean square error calculation formula to calculate the normalized root mean square error, and obtain the multi-peak normalized root mean square error. Comparing the multi-peak normalized root mean square error with the above normalized root mean square error, it can be found that the normalized root mean square error has been reduced to a certain extent, proving that this method has a certain improvement effect.
[0129] Step 209: Construct the second fitting detection data corresponding to the spectrum using the fitting curve data, fitting error data, and multi-peak normalized root mean square error.
[0130] In the embodiment of the present invention, after calculating the multi-peak normalized root mean square error, construct the second fitting detection data corresponding to the spectrum using the fitting curve data, fitting error data, and multi-peak normalized root mean square error.
[0131] In the embodiment of the present invention, as Figure 3 shown, collect the plasma emission spectrum through a spectrometer and import the data. Determine the desired spectral information, thereby determining the fitting range and data. Determine the spectral parameters required for fitting, such as the central wavelength, degeneracy, transition probability, energies of the upper and lower energy levels, etc. Use the Lorentz line shape for multi-peak fitting to generate a fitting curve. After multi-peak fitting, by determining the peak position of the fitting curve and comparing it with the peak position of the spectral line to be fitted, if it is less than a certain range (temporarily set to 0.5 nm here), it is considered that the fitting is accurate, and the spectral peak to be fitted is found.
[0132] Figure 3Comparing the peak position of the fitting curve with the central wavelength position of the spectral line in the spectrum has a certain degree of inaccuracy. For multi-peak fitting, the central wavelengths of the spectral lines of each ion state near a spectral peak may be quite far apart. Therefore, it should be compared with the peak position of the curve to be fitted. Calculate the center of the fitting curve, that is, the distance between the peak position of the fitting curve and the peak position of the spectral line in the spectrum, and generate a distance difference. Determine whether the distance difference is less than 0.5 nm. If not, the fitting curve has too large a deviation, that is, an invalid fitting process, and set the curve data corresponding to the fitting curve as having too large a fitting curve deviation. If so, search for the expected characteristic peak, that is, take the peak in the fitting curve as the expected characteristic peak.
[0133] Determine a complete spectral line peak near the peak position of the spectral line in the spectrum, that is, with the peak position corresponding to the fitting curve data as the center, measure a complete spectral line peak, and generate a spectral line range. Remove the range corresponding to the spectral line range in the fitting curve to generate a spectral line fitting range, and calculate the minimum vertical distance between each peak and its adjacent trough in the spectral line fitting range respectively to generate multiple minimum vertical distances. Determine whether the minimum vertical distance between the peak at other positions and its adjacent trough is greater than 10%? That is, determine whether the minimum vertical distance is greater than the first preset threshold. If so, there are other characteristic peaks, and set the error data corresponding to the minimum vertical distance as the characteristic peak caused by other elements. If not, determine whether the minimum vertical distance between the peak at other positions and its adjacent trough is greater than 5%? That is, determine whether the minimum vertical distance is greater than the second preset threshold. If so, there are other perturbations, and set the error data corresponding to the minimum vertical distance as having fitting perturbations. If not, there is only a single characteristic peak, and set the error data corresponding to the minimum vertical distance as having only a single characteristic peak.
[0134] After determining the error data corresponding to all the minimum vertical distances, calculate the root mean square error and the normalized root mean square error of the expected characteristic peak, and determine whether the normalized root mean square error is greater than 0.05? If not, the process ends, and use the fitting curve data, fitting error data, and normalized root mean square error to construct the first fitting detection data corresponding to the spectrum. If so, perform multi-peak fitting only for the spectral line range of the expected characteristic peak, and then calculate the root mean square error and the normalized root mean square error of the expected characteristic peak in the multi-peak fitting range after multi-peak fitting, that is, calculate the normalized root mean square error between the curve data corresponding to the multi-peak fitting range and the spectral data corresponding to the spectrum to generate the multi-peak normalized root mean square error. Finally, use the fitting curve data, fitting error data, and multi-peak normalized root mean square error to construct the second fitting detection data corresponding to the spectrum.
[0135] By comparing the peak positions of the fitting curve and the spectral line peak, the correctness of the fitting is determined; by determining the peak position of the curve to be fitted, a complete spectral line peak is extracted to determine the spectral line range. By outputting the peak positions or perturbation positions other than the spectral line range, relevant elemental information at the corresponding wavelength positions is provided for the calculation personnel, simplifying the fitting calculation process. The root mean square error and the normalized root mean square error corresponding to the spectral line range are calculated to determine the accuracy of the fitting. Finally, for the fitting results with large errors, single spectral line peak fitting is performed for the expected fitting spectral line positions, which can effectively reduce the normalized root mean square error. By establishing the determination criteria and perturbation criteria for other characteristic peak positions except for the complete spectral line peak, the root mean square error and the normalized root mean square error of the complete spectral line peak are calculated to establish the error criteria. Then, an improved fitting method can be used to compare the improvement effect, and to determine other elemental characteristic peak positions and perturbation positions for the calculation personnel to improve the fitting method and fitting results.
[0136] Figure 4 The first multi-peak fitting diagram is shown, specifically the measured spectral data at a certain position in the experiment and the fitting curve of the corresponding multi-peak fitting. This spectral line is composed of the CⅡ spectral line with a central wavelength of 426.7 nm and the CⅡ spectral line of 426.725 nm superimposed. It can be seen that for this set of spectral data, the fitting result is good, with only a single peak, and there are no perturbations or other ion spectral line peaks within the fitting range. That is, through the above steps for Figure 4 the fitting detection of the arc plasma spectral line, the detection results are: only a single characteristic peak exists; the root mean square error for the characteristic peak is 168.5528; the normalized root mean square error for the characteristic peak is 0.0189.
[0137] Figure 5 The second multi-peak fitting diagram is shown, specifically the measured spectral data and the fitting curve at another position, also composed of the CⅡ spectral line of 426.7 nm and the CⅡ spectral line of 426.725 nm superimposed. However, it can be seen that there are perturbations with small amplitudes at both ends of the spectral line peak, which may be caused by measurement errors, etc. That is, through the above steps for Figure 5 the fitting detection of the arc plasma spectral line, the detection results are: there is a perturbation on the right side, with a position of 428.0655; there is a perturbation on the left side, with a position of 425.5620; the root mean square error for the characteristic peak is: 53.5337; the normalized root mean square error for the characteristic peak is 0.0564.
[0138] Figure 6Shows the third multi-peak fitting graph, specifically the measured spectral data at a certain position and the multi-peak fitting curve. It can be seen that in addition to the spectral peak composed of the two required CⅡ spectral lines at 426.7nm, there is a relatively obvious peak at 425.3nm and 428.6nm. This spectral peak may be caused by the atomic or ionic spectral lines of other elements existing in the experiment. Element information can be searched according to the wavelength position corresponding to the appeared peak to troubleshoot the problem. That is, through the above steps for Figure 6 fitting detection of the spectral lines of the arc plasma spectrum, the obtained detection results are: the right peak position is 428.5775; the left peak position is 425.3344; the root mean square error for the characteristic peak is 23.6492; the normalized root mean square error for the characteristic peak is 0.1031. Figure 7 Is the fitting graph after improving the third multi-peak fitting graph, corresponding to Figure 6 the same spectral line information, only performing multi-peak fitting on the single spectral line peak appearing near 426.7nm to narrow the fitting range. It can be seen that the degree of coincidence with the measured spectral peak is better, and the normalized root mean square error decreases, showing a certain improvement effect. At this time, the optimized normalized root mean square error for the characteristic peak is: 0.0470. By comparing the optimized normalized root mean square error with the normalized root mean square error before optimization, it can be known that for the fitting results with larger errors, performing single spectral line peak fitting for the expected fitting spectral line position can effectively reduce the normalized root mean square error.
[0139] Example 3
[0140] Please refer to Figure 8 , Figure 8 which is the structural block diagram of a fitting detection system for arc plasma spectrum spectral lines provided by Embodiment 3 of the present invention.
[0141] A fitting detection system for arc plasma spectrum spectral lines provided by the third example of the present invention includes:
[0142] A fitting curve generation module 801, configured to obtain the spectrum emitted by the arc plasma, perform multi-peak fitting on the spectral line data corresponding to the spectrum, and generate a fitting curve. [[ID=**]]
[0143] A fitting curve data and spectral range determination module 802, configured to select spectral line peaks according to the peak position of the fitting curve and the spectral line peak position corresponding to the spectrum, and determine the fitting curve data and spectral range.
[0144] A fitting detection data generation module 803, configured to perform fitting error detection based on the fitting curve data and spectral range, and generate fitting detection data corresponding to the spectrum.
[0145] Optionally, the fitting curve generation module 801 may perform the following steps:
[0146] Substitute the full width at half maximum, central wavelength, and wavelength of the spectral line in the spectral line data into a preset fitting function for multi-peak fitting to generate a fitting curve;
[0147] The preset fitting function is:
[0148] ;
[0149] where, is the fitting curve; is the full width at half maximum of the spectral line, nm; is the central wavelength of the spectral line, nm; is the wavelength of the spectral line, nm.
[0150] Optionally, the fitting curve data and spectral line range determination module 802 includes:
[0151] A distance difference generation module for calculating the distance difference between the peak position of the fitting curve and the peak position of the spectral line corresponding to the spectrum.
[0152] A fitting curve data determination module for determining the fitting curve data corresponding to the fitting curve based on the distance difference and a preset difference threshold.
[0153] A spectral line range confirmation sub-module for measuring a complete spectral line peak centered on the peak position corresponding to the fitting curve data to generate a spectral line range.
[0154] Optionally, the fitting curve data determination module can perform the following steps:
[0155] Judge whether the distance difference is less than the preset difference threshold;
[0156] If so, set the fitting curve data corresponding to the fitting curve to correct fitting position;
[0157] If not, set the curve data corresponding to the fitting curve to excessive deviation of the fitting curve.
[0158] Optionally, the fitting detection data generation module 803 includes:
[0159] A spectral line fitting range generation module for removing the range corresponding to the spectral line range in the fitting curve to generate a spectral line fitting range;
[0160] A fitting error data generation module for performing fitting error detection based on the fitting curve and the spectral line fitting range to generate fitting error data corresponding to the spectrum.
[0161] A normalized root mean square error generation module for calculating the normalized root mean square error between the curve data corresponding to the spectral line range and the spectral data corresponding to the spectrum to generate the normalized root mean square error.
[0162] The first fitting detection data construction module is used to construct the first fitting detection data corresponding to the spectrum by using the fitting curve data, the fitting error data, and the normalized root mean square error when the normalized root mean square error is less than or equal to the third preset threshold.
[0163] The multi-peak fitting range determination module is used to perform multi-peak fitting on the spectral line data corresponding to the spectral line range to generate a multi-peak fitting curve when the normalized root mean square error is greater than the third preset threshold.
[0164] The multi-peak normalized root mean square error generation module is used to calculate the normalized root mean square error between the curve data corresponding to the multi-peak fitting range and the spectral data corresponding to the spectrum, and generate the multi-peak normalized root mean square error.
[0165] The second fitting detection data construction module is used to construct the second fitting detection data corresponding to the spectrum by using the fitting curve data, the fitting error data, and the multi-peak normalized root mean square error.
[0166] Optionally, the fitting error data generation module can perform the following steps:
[0167] Calculate the minimum vertical distance between each peak and its adjacent trough in the spectral line fitting range respectively, and generate a plurality of minimum vertical distances;
[0168] Judge whether the minimum vertical distance is greater than the first preset threshold;
[0169] If so, set the error data corresponding to the minimum vertical distance as the characteristic peak caused by other elements;
[0170] If not, judge whether the minimum vertical distance is greater than the second preset threshold;
[0171] If so, set the error data corresponding to the minimum vertical distance as the existence of fitting perturbation;
[0172] If not, set the error data corresponding to the minimum vertical distance as only a single characteristic peak;
[0173] Use the error data corresponding to all the minimum vertical distances to construct the fitting error data corresponding to the spectrum.
[0174] Optionally, the normalized root mean square error generation module can perform the following steps:
[0175] Substitute the curve data corresponding to the spectral line range and the spectral data corresponding to the spectrum into the preset root mean square error calculation formula to calculate the root mean square error;
[0176] The preset root mean square error calculation formula is:
[0177] ;
[0178] Wherein, is the root mean square error; is the number of curve data corresponding to the spectral line range; is the true value, i.e., the spectral data; is the predicted value, i.e., the curve data;
[0179] Calculate the difference between the maximum value and the minimum value in the spectral data to generate a data difference;
[0180] Calculate the ratio between the root mean square error and the data difference to generate a normalized root mean square error.
[0181] Embodiment 4
[0182] Please refer to Figure 9 , Figure 9 which is a structural block diagram of an electronic device provided by Embodiment 4 of the present invention.
[0183] An electronic device according to an embodiment of the present invention, the electronic device includes: a memory 901 and a processor 902, and a computer program is stored in the memory 901; when the computer program is executed by the processor 902, the processor 902 is caused to execute the fitting detection method of the arc plasma spectral line as described in any of the above embodiments.
[0184] The memory 901 can be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk, or a ROM. The memory 901 has a storage space 903 for program code 913 for executing any method step in the above method. For example, the storage space 903 for program code can include respective program codes 913 for implementing various steps in the above method. These program codes can be read from or written into one or more computer program products. These computer program products include program code carriers such as hard disks, compact discs (CDs), memory cards, or floppy disks. The program code can be compressed in an appropriate form. When these codes are run by a computing processing device, the computing processing device is caused to execute each step in the fitting detection method of the arc plasma spectral line described above.
[0185] The embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the fitting detection method of the arc plasma spectral line as described in any of the above embodiments.
[0186] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.
[0187] In several embodiments provided in the present application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces. The indirect couplings or communication connections of devices or units can be in electrical, mechanical, or other forms.
[0188] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0189] In addition, in each embodiment of the present invention, the functional units can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
[0190] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods in each embodiment of the present invention. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs that can store program codes.
[0191] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A fitting detection method for spectral lines of arc plasma, characterized in that, Including: Obtain the spectrum emitted by the arc plasma, perform multi-peak fitting on the spectral line data corresponding to the spectrum, and generate a fitting curve; Select spectral line peaks according to the peak positions of the fitting curve and the spectral line peak positions corresponding to the spectrum, and determine the fitting curve data and the spectral line range. The steps include: calculating the distance difference between the peak position of the fitting curve and the spectral line peak position corresponding to the spectrum; based on the distance difference and a preset difference threshold, determine the fitting curve data corresponding to the fitting curve; taking the peak position corresponding to the fitting curve data as the center, measure a complete spectral line peak to generate the spectral line range; Perform fitting error detection based on the fitting curve data and the spectral line range to generate the fitting detection data corresponding to the spectrum. The steps include: removing the range corresponding to the spectral line range from the fitting curve to generate a spectral line fitting range; perform fitting error detection based on the fitting curve and the spectral line fitting range to generate the fitting error data corresponding to the spectrum; calculate the normalized root mean square error between the curve data corresponding to the spectral line range and the spectral data corresponding to the spectrum to generate the normalized root mean square error; when the normalized root mean square error is less than or equal to the third preset threshold, use the fitting curve data, the fitting error data, and the normalized root mean square error to construct the first fitting detection data corresponding to the spectrum; when the normalized root mean square error is greater than the third preset threshold, perform multi-peak fitting on the spectral line data corresponding to the spectral line range to generate a multi-peak fitting curve; calculate the normalized root mean square error between the curve data corresponding to the multi-peak fitting curve and the spectral data corresponding to the spectrum to generate the multi-peak normalized root mean square error; use the fitting curve data, the fitting error data, and the multi-peak normalized root mean square error to construct the second fitting detection data corresponding to the spectrum; The step of performing fitting error detection based on the fitting curve and the spectral line fitting range to generate the fitting error data corresponding to the spectrum includes: respectively calculate the minimum vertical distance between each peak in the spectral line fitting range and its adjacent trough to generate a plurality of minimum vertical distances; determine whether the minimum vertical distance is greater than the first preset threshold; if so, set the error data corresponding to the minimum vertical distance as a characteristic peak caused by other elements; if not, determine whether the minimum vertical distance is greater than the second preset threshold; if so, set the error data corresponding to the minimum vertical distance as a fitting perturbation; if not, set the error data corresponding to the minimum vertical distance as only having a single characteristic peak; use all the error data corresponding to the minimum vertical distances to construct the fitting error data corresponding to the spectrum.
2. The fitting detection method of the arc plasma spectral line according to claim 1, characterized in that The step of performing multi-peak fitting on the spectral line data corresponding to the spectrum to generate a fitting curve includes: Substitute the spectral line full width at half maximum, the spectral line center wavelength, and the spectral line wavelength in the spectral line data into a preset fitting function for multi-peak fitting to generate a fitting curve; The preset fitting function is: ; Among them, is the fitting curve; is the full width at half maximum of the spectral line, nm; is the central wavelength of the spectral line, nm; is the wavelength of the spectral line, nm.
3. The fitting detection method for the spectral lines of arc plasma according to claim 1, characterized in that The step of determining the fitting curve data corresponding to the fitting curve based on the distance difference and a preset difference threshold includes: Determine whether the distance difference is less than the preset difference threshold; If so, set the fitting curve data corresponding to the fitting curve as correct fitting position; If not, set the curve data corresponding to the fitting curve as excessive deviation of the fitting curve.
4. The fitting detection method for the spectral lines of arc plasma according to claim 1, characterized in that, The step of calculating the normalized root mean square error between the curve data corresponding to the spectral range and the spectral data corresponding to the spectrum to generate the normalized root mean square error includes: Substitute the curve data corresponding to the spectral range and the spectral data corresponding to the spectrum into a preset root mean square error calculation formula to calculate the root mean square error; The preset root mean square error calculation formula is: ; in, is the root mean square error; is the number of curve data corresponding to the spectral line range; is the true value, i.e., spectral data; is the predicted value, i.e. curve data; Calculate the difference between the maximum value and the minimum value in the spectral data to generate a data difference; Calculate the ratio between the root mean square error and the data difference to generate the normalized root mean square error.
5. An arc plasma spectral line fitting detection system, characterized in that including: A fitting curve generation module, configured to obtain the spectrum emitted by the arc plasma, perform multi-peak fitting on the spectral line data corresponding to the spectrum, and generate a fitting curve; A fitting curve data and spectral range determination module, configured to select spectral line peaks according to the peak position of the fitting curve and the spectral line peak position corresponding to the spectrum, and determine the fitting curve data and the spectral range. The steps include: calculating the distance difference between the peak position of the fitting curve and the spectral line peak position corresponding to the spectrum; determining the fitting curve data corresponding to the fitting curve based on the distance difference and a preset difference threshold; taking the peak position corresponding to the fitting curve data as the center, measuring a complete spectral line peak, and generating the spectral range; A fitting detection data generation module, configured to perform fitting error detection based on the fitting curve data and the spectral range to generate the fitting detection data corresponding to the spectrum. The steps include: removing the range corresponding to the spectral range from the fitting curve to generate a spectral line fitting range; performing fitting error detection based on the fitting curve and the spectral line fitting range to generate the fitting error data corresponding to the spectrum; calculating the normalized root mean square error between the curve data corresponding to the spectral range and the spectral data corresponding to the spectrum to generate the normalized root mean square error; when the normalized root mean square error is less than or equal to a third preset threshold, construct the first fitting detection data corresponding to the spectrum by using the fitting curve data, the fitting error data, and the normalized root mean square error; when the normalized root mean square error is greater than the third preset threshold, perform multi-peak fitting on the spectral line data corresponding to the spectral range to generate a multi-peak fitting curve; calculate the normalized root mean square error between the curve data corresponding to the multi-peak fitting curve and the spectral data corresponding to the spectrum to generate a multi-peak normalized root mean square error; construct the second fitting detection data corresponding to the spectrum by using the fitting curve data, the fitting error data, and the multi-peak normalized root mean square error; The steps of generating the fitting error data corresponding to the spectrum by performing fitting error detection based on the fitting curve and the spectral line fitting range in the fitting detection data generation module include: calculating the minimum vertical distance between each peak and its adjacent trough in the spectral line fitting range respectively to generate a plurality of minimum vertical distances; determining whether the minimum vertical distance is greater than a first preset threshold; if so, setting the error data corresponding to the minimum vertical distance as a characteristic peak caused by other elements; if not, determining whether the minimum vertical distance is greater than a second preset threshold; if so, setting the error data corresponding to the minimum vertical distance as a fitting perturbation; if not, setting the error data corresponding to the minimum vertical distance as only having a single characteristic peak; and constructing the fitting error data corresponding to the spectrum by using all the error data corresponding to the minimum vertical distances.
6. An electronic device, characterized in that: It includes a memory and a processor. When the computer program stored in the memory is executed by the processor, the processor is caused to execute the steps of the fitting detection method for the spectral lines of the arc plasma spectrum according to any one of claims 1 to 4.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed, it implements the fitting detection method for the spectral lines of the arc plasma spectrum according to any one of claims 1 to 4.
Citation Information
Patent Citations
Computer assisted full-waveband spectrometer wavelength calibration method
CN105424185A
Computer-assisted full wave-band spectrometer wavelength calibration method
WO2017076228A1