A Chromatographic Peak Recognition Method Based on Adaptive Threshold
By setting up the adaptive threshold and filtering processing technology in the chromatography peak recognition method, the problem of color spectrum peak recognition errors in existing technologies is solved, and higher identification accuracy and anti -interference ability are achieved.
Patent Information
- Application Number
- CN202211344676.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-31
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2042-10-31
AI Technical Summary
The existing chromatographic peak recognition algorithms have uncertainties in the peak recognition process, which easily introduces false peaks, resulting in errors in chromatographic peak recognition.
Adopt the chromatography peak recognition method based on the adaptive threshold, through the setting threshold of minimum peak slope, minimum peak height, minimum peak area, and minimum half -peak width, combined with filtering treatment and peak recognition technology Recognition rate.
Effectively reduce the noise in the peak spectrum, remove the peaks, and improve the recognition rate of effective peaks, especially in the overlapping peak recognition significantly improved accuracy.
Smart Images

Figure CN115586280B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of power transmission and transformation, and in particular to a chromatographic peak recognition method based on an adaptive threshold. Background Art
[0002] As a key equipment of the power system, the reliability of the transformer is the key to the safe operation of the power grid, and online chromatography technology is an effective means to monitor the status of the transformer in real time. Due to the harsh on-site environment and large changes in temperature and humidity, the chromatographic online monitoring device is required to have strong anti-interference and good algorithm compatibility, and to automatically and accurately complete these tasks without human intervention. At present, the most commonly used oil chromatographic peak recognition algorithms include time window method, curve fitting method, pattern matching method, derivative method, etc. These conventional algorithms have the following shortcomings in the peak recognition process: the minimum number of the starting and end arrays of the chromatographic peak is determined by the sampling frequency, but the peak shape of the chromatographic peak will change with the increase of time. Therefore, the minimum number of the starting and end arrays of the chromatographic peak determined by the sampling frequency is uncertain, which is easy to introduce false peaks, thereby generating errors in chromatographic peak recognition. Summary of the invention
[0003] Purpose of the invention: In view of the above problems, the present invention provides a chromatographic peak recognition method based on adaptive threshold, which combines the characteristics of dissolved gas chromatography in power transformer oil, sets appropriate thresholds in the peak recognition process, better removes impurity peaks and greatly improves the recognition rate of overlapping peaks.
[0004] Technical solution: To solve the above problems, the present invention discloses a chromatographic peak recognition method based on adaptive threshold, which specifically includes the following steps:
[0005] (1) collecting transformer oil chromatogram data and filtering the collected chromatogram data;
[0006] (2) performing chromatographic peak detection on the chromatographic spectrum data after filtering; specifically, setting a minimum peak slope threshold, comparing the slope of each data of the chromatographic spectrum with the minimum peak slope threshold, and determining the starting point, vertex, and end point of each chromatographic peak based on the comparison result;
[0007] (3) calculating the peak identification parameters of each chromatographic peak detected; setting three detection thresholds of minimum peak height, minimum peak area, and minimum half-peak width, comparing the peak identification parameters of each chromatographic peak with the three detection thresholds respectively, and retaining chromatographic peaks that are simultaneously greater than the three detection thresholds; the peak identification parameters are peak height, peak area, retention time, and half-peak width;
[0008] (4) Adjust the starting point and end point of each retained chromatographic peak; specifically, including: (4.1) taking the current starting point or end point of each chromatographic peak as the reference to obtain the previous sampling data point in the chromatogram, and comparing the slope of the current starting point or end point with the slope of the previous sampling data point: (4.2) if the slope of the current starting point or end point is greater than the slope of the previous sampling data point, the count is increased by 1; otherwise, the count is reset to zero; the previous sampling data is used as the new current starting point or end point, and step (4.1) is repeated until the count value reaches the set value;
[0009] (5) performing consecutive peak identification on the chromatographic peaks. If consecutive peaks are identified, the starting point of the second peak in the consecutive peaks is corrected to the end point of the previous peak, and the starting point and the end point of the second peak are adjusted according to the chromatographic peak baseline, wherein the chromatographic peak baseline is the line connecting the starting point of the first peak and the end point of the second peak;
[0010] (6) By setting the maximum retention time error percentage and the gas concentration in the standard oil, the peak identification parameters of each chromatographic peak in the chromatographic peak are analyzed to identify the gas dissolved in the transformer oil.
[0011] Furthermore, step (5) specifically includes:
[0012] (5.1) Setting the minimum baseline slope and the maximum peak interval; calculating the slope and peak width of each chromatographic peak in the chromatographic peaks; if the slope of each chromatographic peak is greater than the minimum baseline slope and the peak width of each chromatographic peak is less than the maximum peak interval, it is determined to be a continuous peak; otherwise, it is determined to be a non-contiguous peak; the slope calculation formula of each chromatographic peak is: slope of chromatographic peak = (ordinate of the end point of the peak - ordinate of the starting point of the peak) / (abscissa of the end point of the peak - abscissa of the starting point of the peak);
[0013] (5.2) If consecutive peaks are identified, first correct the starting point of the second peak in the consecutive peaks to the end point of the previous peak; then calculate the chromatographic peak baseline, and correct the vertical coordinates of the starting point and end point of the second peak to the vertical coordinates of the chromatographic peak baseline; if consecutive peaks are not identified, go to step (6).
[0014] Furthermore, the filtering process in step (1) specifically includes: firstly performing a de-extinction and averaging filtering process on the data, and then performing a point-by-point slope calculation process on the filtered data; and repeating the operation twice.
[0015] Furthermore, the chromatographic peak detection in step (2) is specifically performed as follows:
[0016] Set the minimum peak slope threshold h min ; Divide the filtered chromatogram data into m windows, each window contains n data; when the data in the window meets 0 <h min n When it is, it is determined that h1 at this time is the starting point of the peak; continue to move the window. When the data in the window satisfies h1 < … < h m-1 <h m >h m+1 >…>h k and satisfies h k <h k-1 <…<h m+1 <X, it is determined that h m at this time is the starting point of the peak; continue to move the window. When the data in the window satisfies h1 < h2 … < h n <h min , it is determined that h n at this time is the end point of the peak; where h1, h2, h n , h m-1 , h m , h m+1 , h k , h k-1 are all the slopes of the data points in the corresponding window, and the value range of X is (-0.12, -0.07).
[0017] Further, step (6) specifically includes:
[0018] (6.1) Set the maximum retention time error percentage and the gas concentration in the standard oil;
[0019] (6.2) Conduct quantitative and qualitative analysis on the peak recognition parameters of each chromatographic peak in the chromatographic peak; the quantitative analysis includes: according to the peak recognition parameters of each chromatographic peak, obtain the concentration value of each chromatographic peak, and the calculation formula is:
[0020]
[0021] In the formula, H B represents the peak height of the gas in the standard oil; C B represents the gas concentration value in the standard oil; H C represents the peak height of the gas in reality; C C represents the concentration value in reality;
[0022] The qualitative analysis includes: comparing the retention time of each chromatographic peak with the gas elution time in the standard oil. If the error is less than the maximum retention time error percentage, then identify the gas corresponding to the chromatographic peak, and finally identify all the gases dissolved in the transformer oil.
[0023] Further, the range of the minimum peak slope in step (2) is set to (0, 0.015).
[0024] Further, the range of the minimum peak height in step (3) is set to (0, 0.2), the range of the minimum peak area is set to (88, 110), and the range of the minimum half-peak width is set to (24, 27).
[0025] Furthermore, in step (5), the range of the minimum baseline slope is set to (0, 4), and the range of the maximum peak interval is set to (24, 27).
[0026] Beneficial effects: Compared with the prior art, the chromatographic peak recognition method based on adaptive thresholds described in the present invention has the following significant advantages: 1. Before chromatographic peak detection, the chromatographic spectrum data is first smoothed, and then by setting a suitable threshold, the noise in the peak spectrum is effectively reduced and the miscellaneous peaks are removed, thereby improving the recognition rate of effective peaks; 2. By setting thresholds such as the minimum baseline and slope, the recognition rate of overlapping peaks is further improved; and the starting point and end point of the overlapping peaks are readjusted based on the actual baseline; 3. In combination with the peak curve and the characteristics of the standard gas, by setting the maximum retention time error percentage and the gas concentration value in the standard oil, the identified peak recognition parameters are quantitatively and qualitatively analyzed, and finally the dissolved gas in the oil chromatogram is identified; the substation oil chromatogram online monitoring device can effectively improve the reliability and accuracy of the device by applying the method for chromatographic peak recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 Shown is a flow chart of the method of the present invention;
[0028] Figure 2 Shown is a graph showing the results of chromatographic peak identification using the method of the present invention. DETAILED DESCRIPTION
[0029] The technical solution of the present invention is further described below in conjunction with the accompanying drawings.
[0030] like Figure 1 As shown, the present invention provides a chromatographic peak recognition method based on adaptive threshold, and the specific steps are as follows:
[0031] Step 1: Collect substation oil chromatogram data and filter the acquired oil chromatogram data.
[0032] Specifically, the original oil chromatogram data is first filtered by moving window average, and then the slope of the filtered data is calculated point by point, and then the above steps are repeated once, that is, the data after the slope is calculated is filtered, and the slope of the filtered data is calculated point by point again. After two filtering and two slope calculations, a relatively smooth signal curve is obtained.
[0033] Steps for implementing mean filtering after extreme value removal: Divide M consecutive sampling points into N equal parts on average. Perform mean filtering after extreme value removal on each part. Each time, filter data with a window size of K and a dead zone window size of P, and then perform bubble sorting to remove J extreme values. Finally, calculate the mean to obtain new data. If the value of K is too small, noise cannot be removed; if it is too large, valid information will also be filtered out. In this embodiment, the value range of K is set to 10 - 20, and the value of P is set to 1 / 4 of K.
[0034] Steps for calculating the slope point by point: Divide M consecutive sampling points into N equal parts on average, and then perform point-by-point subtraction in each part, that is, after solving the slope of each data point, subtract the value of the previous point from the value of the next point point by point, and reorganize the subtracted data to obtain new data.
[0035] Step 2: Detect chromatographic peaks in the filtered oil chromatogram data to detect all chromatographic peaks. Specifically, it includes:
[0036] Set the threshold of the minimum peak slope value; divide all the filtered oil chromatogram data into m windows, with n data in each window. Calculate the slope of all data points on the oil chromatogram curve, set a moving window, and compare the slope of the data points with the threshold of the minimum peak slope value respectively. Among them, the maximum half-peak width is used as the benchmark for setting the sliding window width.
[0037] When the data in the window satisfies 0 < h min < h1 < h2… < h n , it is determined that h1 at this time is the starting point of the peak; continue to move the window. When the data in the window satisfies h1 < … < h m-1 < h m > h m+1 > … > h k and satisfies h k < h k-1 < … < h m+1 < X, it is determined that h m is the starting point of the peak; continue to move the window. When the data in the window satisfies h1 < h2… < h n < h min , it is determined that h n is the end point of the peak;
[0038] Among them, h1, h2, h n , h m-1 , h m , h m+1 , h k , h k-1 are all the slopes of the data points in the corresponding window. The value range of X is (-0.12, -0.07). In this embodiment, X = -0.1, and the slope of the data is at h mWhen it is the maximum positive value, then h m+1 It is the negative maximum value.
[0039] Step 3: Remove the detected chromatographic peaks.
[0040] (1) Setting three detection thresholds including minimum peak height, minimum peak area and minimum half-peak width;
[0041] (2) calculating the peak identification parameters of each chromatographic peak, i.e., peak height, peak area, retention time, and half-peak width, for all chromatographic peaks detected in step 2;
[0042] (3) Compare the peak recognition parameters corresponding to each chromatographic peak with the three detection thresholds that have been set, retain the chromatographic peaks whose peak recognition parameters are greater than the three detection thresholds, and remove the remaining impurity peaks that do not meet the conditions.
[0043] Step 4: Adjust the starting point and end point of each chromatographic peak after the removal of impurity peaks.
[0044] (1) Take the current starting point of each chromatographic peak as the reference to obtain the previous sampling data point in the chromatogram, and compare the slope of the current starting point with the previous sampling data point:
[0045] (2) If the slope of the current starting point is greater than the slope of the previous sampling data point, the counter is incremented by 1; otherwise, the counter is reset to zero; the previous sampling data is used as the new current starting point, and step (1) is repeated until the count value reaches the set value. The starting point at this time is the adjusted starting point; specifically, for example, the data slope of the starting point is compared with the previous point. If the data slope of this point is less than the starting position, the counter is incremented by 1. If the data slope of this point is greater than the starting position, the counter is reset to zero, and the data slope of this point and the previous point are calculated again until the counter accumulates to be greater than the set value, which is then determined to be the true starting position.
[0046] The end point of each chromatographic peak is adjusted in the same adjustment manner. In this embodiment, the set value of the count value is 10.
[0047] Step 5: Perform continuous peak identification and processing on each chromatographic peak whose starting point and end point have been adjusted.
[0048] (1) Set the minimum baseline slope and maximum peak interval;
[0049] (2) Calculate the slope and peak width of each identified chromatographic peak. The specific calculation formula is:
[0050] The slope of the chromatographic peak = (the ordinate of the peak end point - the ordinate of the peak start point) / (the abscissa of the peak end point - the abscissa of the peak start point);
[0051] Peak width = abscissa of the peak end point - abscissa of the peak start point;
[0052] (3) When the slope of the chromatographic peak is greater than the minimum baseline slope and the peak width is less than the maximum peak interval, it is judged as a continuous peak, and the continuous peak is processed, specifically including:
[0053] (3.1) Correct the horizontal and vertical coordinates of the starting point of the second peak in the continuous peak to the horizontal and vertical coordinates of the end point of the previous peak;
[0054] (3.2) The starting point and the end point of the second peak are adjusted according to the chromatographic peak baseline, that is, the ordinates of the starting point and the end point of the second peak are corrected to the ordinates of the current baseline. The chromatographic peak baseline is the line between the starting point of the first peak and the end point of the second peak. Finally, the peak height, retention time and peak area of each peak in the continuous peak are calculated.
[0055] Otherwise, it is judged as non-contiguous peaks and go to step 6.
[0056] Step 6: Calculate the peak identification parameters of each chromatographic peak, and perform quantitative and qualitative analysis on the peak identification parameters corresponding to the chromatographic peaks identified in the previous steps according to the set maximum retention time error percentage and the gas concentration of the standard oil.
[0057] The qualitative process is: compare the retention time corresponding to the chromatographic peak identified and processed in the above steps with the gas peak time in the standard oil. If the error is less than the maximum retention time error percentage, then this chromatographic peak corresponds to the specific gas in the standard oil.
[0058] The quantitative process is as follows: The concentration value corresponding to the peak height of each chromatographic peak is calculated by comparing the identified peak with the gas peak in the standard oil and multiplying it by the gas concentration value in the standard oil to obtain the concentration value of each chromatographic peak. The specific formula is:
[0059]
[0060] In the formula, H B Indicates the gas peak height in the standard oil; C B Indicates the gas concentration value in the standard oil; H C Indicates the actual gas peak height; C C Indicates the actual concentration value;
[0061] Among them, the range of the minimum peak slope is set to (0, 0.015), the range of the minimum peak height is set to (0, 0.2), the range of the minimum peak area is set to (88, 110), the range of the minimum half-peak width is set to (24, 27), the range of the minimum baseline slope is set to (0, 4), the range of the maximum peak interval is set to (24, 27), the maximum retention time error percentage range is 6%-9%, and the range of the maximum peak width is set to (97, 103); according to the results of multiple tests, specifically in this embodiment, the optimal setting of the required threshold is obtained, as shown in Table 1 below:
[0062] Table 1
[0063]
[0064] According to the thresholds set in Table 1 above, Figure 2 As shown, the seven gases dissolved in transformer oil can be accurately identified. It can be seen from the figure that the baseline in the spectrum is very stable, the curve noise of the spectrum peak is very small, the peak height and peak area can be well calculated, and the overlapping peak of CO can also be well detected. The recognition results of the actual spectrum in the oil chromatogram according to the method of the present invention and the traditional time window method and curve fitting method are compared as shown in Table 2 below:
[0065] Table 2
[0066]
[0067]
[0068] From Table 2, it can be analyzed that compared with the traditional identification method, the method proposed in the present invention can obtain more accurate identification of the peak heights and retention times of the seven gases dissolved in the transformer oil. In addition, for the continuous peak of CO, the identification error is large in the other two methods, while the method described in the present application ensures the accuracy of continuous peak identification.
[0069] In summary, the method of the present invention sets a reasonable threshold in the peak recognition process based on the traditional slope threshold method, combines the absolute retention time of the chromatographic peak and the recognition window to identify the suspected chromatographic peak, greatly reduces the probability of introducing false peaks, and improves the accuracy of overlapping peak detection. Combined with the experimental research results, it is shown that the recognition accuracy of this application is very good, it has certain adaptive performance, and can meet the requirements of on-site online monitoring devices.
Claims
1. A chromatogram recognition method based on adaptive threshold, characterized in that: The following steps are involved: (1) collecting transformer oil chromatogram data and filtering the collected chromatogram data; (2) performing chromatographic peak detection on the chromatographic spectrum data after filtering; specifically, setting a minimum peak slope threshold, comparing the slope of each data of the chromatographic spectrum with the minimum peak slope threshold, and determining the starting point, vertex, and end point of each chromatographic peak based on the comparison result; (3) calculating the peak identification parameters of each chromatographic peak detected; setting three detection thresholds of minimum peak height, minimum peak area, and minimum half-peak width, comparing the peak identification parameters of each chromatographic peak with the three detection thresholds respectively, and retaining chromatographic peaks that are simultaneously greater than the three detection thresholds; the peak identification parameters are peak height, peak area, retention time, and half-peak width; (4) Adjust the starting point and end point of each retained chromatographic peak; specifically, including: (4.1) taking the current starting point or end point of each chromatographic peak as the reference to obtain the previous sampling data point in the chromatogram, and comparing the slope of the current starting point or end point with the slope of the previous sampling data point: (4.2) if the slope of the current starting point or end point is greater than the slope of the previous sampling data point, the count is increased by 1; otherwise, the count is reset to zero; the previous sampling data is used as the new current starting point or end point, and step (4.1) is repeated until the count value reaches the set value; (5) Setting the minimum baseline slope and the maximum peak interval; calculating the slope and peak width of each chromatographic peak in the chromatographic peaks; if the slope of each chromatographic peak is greater than the minimum baseline slope and the peak width of each chromatographic peak is less than the maximum peak interval, it is determined to be a continuous peak; otherwise, it is determined to be a non-continuous peak; the slope calculation formula of each chromatographic peak is: slope of chromatographic peak = (vertical coordinate of the end point of the peak - vertical coordinate of the starting point of the peak) / (horizontal coordinate of the end point of the peak - horizontal coordinate of the starting point of the peak); if continuous peaks are identified, first correct the starting point of the second peak in the continuous peaks to the end point of the previous peak; then calculate the chromatographic peak baseline, the chromatographic peak baseline is the line between the starting point of the first peak and the end point of the second peak, and correct the vertical coordinates of the starting point and the end point of the second peak to the vertical coordinate of the chromatographic peak baseline; if no continuous peaks are identified, go to step (6); (6) by setting the maximum retention time error percentage and the gas concentration in the standard oil, the peak identification parameters of each chromatographic peak in the chromatographic peak are quantitatively and qualitatively analyzed; the quantitative analysis includes: according to the peak identification parameters of each chromatographic peak, the concentration value of each chromatographic peak is obtained, and the calculation formula is: In the formula, H B Indicates the gas peak height in the standard oil; C B Indicates the gas concentration value in the standard oil; H C Indicates the actual gas peak height; C C Indicates the actual concentration value; The qualitative analysis includes: comparing the retention time of each chromatographic peak with the gas peak time in the standard oil, and if the error is less than the maximum retention time error percentage, identifying the gas corresponding to the chromatographic peak, and finally identifying all gases dissolved in the transformer oil.
2. The chromatogram recognition method based on adaptive threshold according to claim 1, characterized in that: The filtering process in step (1) specifically includes: firstly performing a de-extreme value averaging filtering process on the data, and then performing a point-by-point slope calculation process on the filtered data; and repeating the operation twice.
3. The chromatogram recognition method based on adaptive threshold according to claim 1, characterized in that: The chromatographic peak detection in step (2) is specifically as follows: Set the minimum peak slope threshold h min ; Divide the filtered chromatogram data into m windows, each window containing n data; When the data within the window satisfies 0 < h min < h1 < h2… < h n , it is determined that h1 at this time is the starting point of the peak; continue to move the window. When the data within the window satisfies h1 < … < h m-1 < h m > h m+1 > … > h k and satisfies h k < h k-1 < … < h m+1 < X, it is determined that h m at this time is the starting point of the peak; continue to move the window. When the data within the window satisfies h1 < h2… < h n < h min it is determined that h n at this time is the end point of the peak; where h1, h2, h n , h m-1 , h m , h m+1 , h k , h k-1 are all the slopes of the data points in the corresponding window, and the value range of X is (-0.12, -0.07).
4. The chromatogram recognition method based on adaptive threshold according to claim 1, characterized in that: The range of the minimum peak slope in step (2) is set to (0, 0.015).
5. The chromatogram recognition method based on adaptive threshold according to claim 1, characterized in that: In step (3), the range of the minimum peak height is set to (0, 0.2), the range of the minimum peak area is set to (88, 110), and the range of the minimum half-peak width is set to (24, 27).
6. The chromatogram recognition method based on adaptive threshold according to claim 1, characterized in that: In step (5), the range of the minimum baseline slope is set to (0, 4), and the range of the maximum peak interval is set to (24, 27).
Citation Information
Patent Citations
Method for identifying samples by utilizing chromatographic feature extraction
CN103868999A
Method for calculating area of chromatographic peaks of gas in electric power equipment oil
CN104049055A