A spectrum peak point detection method and device based on information entropy algorithm
Through information entropy algorithm and sliding window technology, combined with triangular threshold method, adaptive spectrum peak point detection is realized, solving the problem of difficulty in setting thresholds in the existing technology, improving detection accuracy and robustness, and suitable for unknowns Industrial scenario.
Patent Information
- Application Number
- CN202411196316.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-29
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2044-08-29
AI Technical Summary
In existing spectrum analysis, the spectrum peak search method is difficult to effectively set the height threshold and significance threshold, resulting in inaccurate peak detection.
The spectrum peak point detection method based on the information entropy algorithm is adopted, and the threshold is adaptively adjusted through sliding window technology, information entropy calculation, boxing processing and triangular threshold method, and the spectrum peak point is found and confirmed, and noise and unimportant signals are eliminated.
It improves the accuracy and robustness of spectrum peak point detection, reduces the dependence of parameter adjustment, and is suitable for vibration signal analysis in unknown industrial scenarios.
Smart Images

Figure CN118708951B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of spectrum analysis, and in particular to a spectrum peak point detection method and device based on an information entropy algorithm. Background Art
[0002] Spectral analysis of vibration signals plays an extremely important role in many industries such as manufacturing and engineering, mainly in equipment fault diagnosis, equipment status monitoring and predictive maintenance. Peak finding plays a vital role in spectrum analysis. Peak acquisition is essential for understanding the components of the signal, identifying the characteristic frequency of the signal, and classifying and identifying the signal. Currently on the market, the commonly used method for spectrum peak finding is to find the local maximum value, but its parameters such as height threshold and significance threshold are difficult to set.
[0003] In view of this, this application is filed. Summary of the invention
[0004] The present invention provides a spectrum peak point detection method and device based on an information entropy algorithm, which can at least partially improve the above-mentioned problem.
[0005] To achieve the above object, the present invention adopts the following technical solutions:
[0006] A spectrum peak point detection method based on information entropy algorithm, comprising:
[0007] Acquire vibration batch data when the equipment is running, and pre-process the vibration batch data to convert time domain data in the vibration batch data into frequency spectrum data;
[0008] The spectrum data is subjected to sliding window slicing processing by adopting sliding window technology, the spectrum data is segmented, the continuous data discretization processing is performed on each window data, and its information entropy is calculated;
[0009] The information entropy is binned to obtain the boundary value and frequency of each box after binning, and the information entropy threshold of the window with a peak value is obtained by using the triangular threshold method. According to the preset evaluation index and the marked peak data, the gain coefficient is determined and the information entropy threshold is fine-tuned;
[0010] Compare the information entropy of the window with the entropy threshold, confirm the window with the peak, find the extreme value, replace the data within the extreme value and the half-peak width, recalculate the window information entropy, compare the information entropy with the threshold, and repeat this step until all peak points in the window are found;
[0011] The peak energy size is limited, the frequency interval between the two peak points must be greater than the half-peak width, and noise and unimportant signals are eliminated.
[0012] The present invention also provides a spectrum peak point detection device based on information entropy algorithm, which comprises:
[0013] A conversion unit, used to obtain vibration batch data when the equipment is running, and pre-process the vibration batch data to convert the time domain data in the vibration batch data into frequency spectrum data;
[0014] An information entropy calculation unit is used to perform sliding window slicing processing on the spectrum data using a sliding window technology, segment the spectrum data, discretize the continuous data on each window data, and calculate its information entropy;
[0015] A threshold calculation unit is used to bin the information entropy to obtain the boundary value and frequency of each box after binning, and use the triangular threshold method to obtain the information entropy threshold of the window with a peak value, and determine the gain coefficient according to the marked peak data according to the preset evaluation index, and fine-tune the information entropy threshold;
[0016] The peak point finding unit is used to compare the information entropy of the window with the entropy threshold, confirm the window with the peak, find the extreme value, replace the data within the extreme value and the half-peak width, recalculate the window information entropy, compare the information entropy with the threshold, and repeat this step until all the peak points in the window are found;
[0017] The elimination unit is used to limit the peak energy size. The frequency interval between two peak points must be greater than the half-peak width to eliminate noise and unimportant signals.
[0018] In summary, the spectrum peak point detection method based on the information entropy algorithm converts batch vibration signals into spectrum data through fast Fourier transform; performs sliding window slicing on the spectrum data; discretizes the amplitude array of each window and calculates the information entropy; uses the triangular threshold method to obtain the information entropy threshold of the window with peaks; can choose to determine the gain coefficient and fine-tune the threshold according to the marked peak data and the evaluation index; compare the window information entropy with the threshold to determine which windows have peaks, find extreme values, replace the extreme values and the data within the half-peak width, recalculate the window information entropy, and repeat this process until all peak points in the window are found; add a filtering mechanism to filter out peak points that are not of concern. This method can adaptively capture spectrum peak points, reduce the parameters that need to be adjusted, and can be applied to vibration signal analysis in unknown industrial scenarios with good robustness. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 It is a flowchart of a spectrum peak point detection method based on an information entropy algorithm provided by the first embodiment of the present invention;
[0020] Figure 2 It is a module schematic diagram of a spectrum peak point detection device based on information entropy algorithm provided by the second embodiment of the present invention. DETAILED DESCRIPTION
[0021] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0022] refer to Figure 1 As shown, the first embodiment of the present invention discloses a spectrum peak point detection method based on an information entropy algorithm, which can be performed by a spectrum peak point detection device based on an information entropy algorithm (hereinafter referred to as a detection device), and in particular, performed by one or more processors in the detection device to implement the following method:
[0023] S1, obtaining vibration batch data when the equipment is running, and preprocessing the vibration batch data to convert time domain data in the vibration batch data into spectrum data;
[0024] Specifically, step S1 includes: obtaining vibration batch data when the equipment is running, and filtering the vibration batch data using a high-pass filter;
[0025] The filtered vibration batch data is preprocessed using a Hanning window function, and the time domain data in the vibration batch data is converted into spectrum data using FFT technology;
[0026] The positive frequency part of the spectrum data is retained to construct the magnitude spectrum.
[0027] In this embodiment, during the operation of the equipment, when collecting batch data, the sampling frequency is set to 50000 Hz and the batch time is 50s. A high-pass filter is applied to the collected data, and the filter cutoff frequency is set to 0.1 Hz, in order to effectively remove the DC component and low-frequency noise in the signal. The Hanning window function is used to pre-process the signal. The Hanning window can effectively reduce the spectrum leakage phenomenon and improve the frequency resolution. The time domain signal is converted to the frequency domain using FFT technology. In the obtained spectrum signal, its absolute value is taken to quantify the amplitude of each frequency component in the frequency domain. For the above data, the positive frequency part of the spectrum is retained to construct the amplitude spectrum.
[0028] S2, using a sliding window technology to perform sliding window slicing processing on the spectrum data, segmenting the spectrum data, discretizing the continuous data of each window data, and calculating its information entropy;
[0029] Specifically, step S2 includes: using a sliding window technology with a window size equal to a step length to perform sliding window slicing processing on the spectrum data, and the window length calculation formula is:
[0030]
[0031]
[0032] in, To round up.
[0033] Confirm the number of intervals and calculate the interval width according to the amplitude range in the window. The calculation formula of interval width is: interval width = (maximum value - minimum value) / number of intervals;
[0034] Dividing the window data into a plurality of continuous and non-overlapping intervals according to the interval width;
[0035] Map the continuous data in the interval to the lower limit of the interval to generate a discretized array;
[0036] For the array after discretization of each window, calculate the probability p and information entropy H(U) of the duplicate elements appearing in the window. The information entropy calculation formula is:
[0037]
[0038] Among them, n is the duplicate element, p i is the probability of duplicate elements appearing.
[0039] In this embodiment, a sliding window technique with a window size equal to the step size is used to slice the data. The window size is selected as 2 Hz and is substituted into the following calculation formula:
[0040]
[0041]
[0042] The calculated frequency resolution is 0.02 Hz and the window length is 100 data points. Discretization is performed on each window data. First, the number of intervals is set to 20, and the interval width is calculated based on the amplitude range in the window. The interval width is (maximum value - minimum value) / number of intervals. According to the interval width, the window data is divided into 20 continuous and non-overlapping intervals. The continuous data in the interval is mapped to the lower limit of the interval to generate a discretized array.
[0043] Substitute p into the following formula to calculate the information entropy H(U):
[0044]
[0045] S3, binning the information entropy to obtain the boundary value and frequency of each box after binning, and using the triangular threshold method to obtain the information entropy threshold of the window with a peak value, according to the preset evaluation index, based on the marked peak data, determine the gain coefficient, and fine-tune the information entropy threshold;
[0046] Specifically, step S3 includes: determining the number of bins to be N, and sorting the information entropy in ascending order based on the minimum and maximum values of the information entropy, dividing the information entropy into N boxes with equal width, and traversing the information entropy array, mapping each information entropy to the corresponding box, recording the frequency of each box, and obtaining the box boundary value and frequency array;
[0047] Among them, for boxes with a frequency of 0, the previous non-zero frequency is continued, and boxes with too large a frequency are removed.
[0048] Select two peak points, one of which is the left boundary value x0, y0, and the other is the maximum value point x1, y1 of the histogram;
[0049] Traverse the information entropy box, take the x-axis center value of the box as x, the frequency of the box as y, and calculate the vertical distance d from the point (x, y) to the line connecting the two peak points. The vertical distance formula is:
[0050]
[0051] The x-coordinate value of the point with the largest vertical distance is selected as the initial information entropy threshold.
[0052] Select a nearby, equally spaced array as a candidate gain coefficient, traverse the candidate gain coefficients, select the spectrum data with marked peak points as a training set, and multiply the initially set threshold by the gain coefficient to obtain an adjusted threshold;
[0053] Compare the information entropy of each window with the adjusted threshold. When it is determined that the information entropy is less than the threshold, it is considered that the window with the information entropy less than the threshold has a peak.
[0054] Use recall rate as the key performance evaluation indicator, select the gain coefficient when the recall rate is the highest and multiply it by the initial threshold to achieve precise fine-tuning of the threshold. The calculation formula of recall rate is: recall rate = true positive examples / (true positive examples + false negative examples).
[0055] In this embodiment, the number of bins N is determined, and based on the minimum and maximum values of the information entropy, the data is sorted from small to large and divided into N boxes of equal width. The information entropy array is traversed, each information entropy is mapped to the corresponding box, and the frequency of each box is recorded to obtain the box boundary value and frequency array.
[0056] For boxes with a frequency of 0, continue with the previous non-zero frequency. The specific steps are as follows: Input the frequency array x, generate a one-dimensional array new_x with the same length as the input array x, which contains integers from 0 to the length of array x minus 1. At the position where the frequency is 0 in the x array, the corresponding position of new_x is also set to 0. Traverse the new_x array and fill in the cumulative maximum value. After the traversal is completed, the processed frequency array is obtained.
[0057] Remove boxes with too large frequency. The specific steps are as follows: Calculate the relative density of each box by dividing the frequency by the maximum frequency. Sort the boxes by relative density. If the maximum relative density is greater than twice the second relative density, it is considered that there is a box with too large frequency, and the frequency of the box is modified to the frequency of the box with the second relative density.
[0058] Information entropy is used to quantify the average amount of information in the information content and can be regarded as a measure of the disorder of the system. Compared with windows without peaks, the information entropy is smaller when there is a peak, and the number of windows with peaks is much smaller than the number of windows without peaks. Therefore, the information entropy histogram shows a long tail on the left, and the data is concentrated on the right side of the histogram. Therefore, in the triangular threshold method, the two peak points are selected, one is the left boundary value x0, y0, and the other is the maximum value point x1, y1 of the histogram. Traverse the information entropy bins, take the x-axis center value of the box as x, and the frequency of the box as y, and calculate the vertical distance from (x, y) to the line connecting the two peak points. The vertical distance formula is as follows:
[0059]
[0060] The x-coordinate value of the point with the largest vertical distance is selected as the initial information entropy threshold.
[0061] Compare the information entropy of each window with the adjusted threshold. If the information entropy is less than the threshold, it is determined that the window has a peak point. The recall rate is used as the key performance indicator, and its calculation formula is: recall rate = true positive examples / (true positive examples + false negative examples), where true positive examples refer to those windows that actually contain peak points and are correctly identified as containing peak points by the model, and false negative examples are those windows that actually contain peak points but are mistakenly determined by the model to not contain peak points. Find the gain coefficient that can maximize the recall rate, and then multiply the coefficient by the initial threshold to achieve precise fine-tuning of the threshold.
[0062] Specifically, in this embodiment, the number of bins is determined to be 200, and based on the minimum and maximum values of the information entropy, they are sorted from small to large and divided into 200 boxes of equal width. The information entropy array is traversed, and each information entropy is mapped to the corresponding box. The frequency of each box is recorded to obtain the box boundary value and frequency array.
[0063] For boxes with a frequency of 0, continue with the last non-zero frequency. The steps are as follows: Input the frequency array x, generate a one-dimensional array new_x with the same length as the input array x, containing integers from 0 to the length of array x minus 1. At the position where the frequency is 0 in the x array, the corresponding position of new_x is also set to 0. Traverse the new_x array and fill in the cumulative maximum value. After the traversal is completed, the processed frequency array is obtained.
[0064] Eliminate bins with too high a frequency. The steps are as follows: Calculate the relative density of each bin by dividing the frequency by the maximum frequency. Sort the bins by relative density. If the maximum relative density is greater than twice the second relative density, it is considered that there is a bin with too high a frequency, and the frequency of the bin is modified to the frequency of the bin with the second relative density.
[0065] Use the triangular threshold method to obtain the information entropy threshold of the peak in the window. You can choose to determine the gain coefficient and fine-tune the threshold based on the marked peak data and the evaluation index. The specific steps are as follows:
[0066] Two peak points are selected, one is the left boundary value x0, y0, and the other is the maximum value point x1, y1 of the histogram. Traverse the information entropy bins, the x-axis center value of the bin is taken as x, the frequency of the bin is taken as y, and the vertical distance from (x, y) to the line connecting the two peak points is calculated. The vertical distance formula is as follows:
[0067]
[0068] The x-coordinate value of the point with the largest vertical distance is selected as the initial information entropy threshold.
[0069] According to the marked peak data and the evaluation index, the gain coefficient can be determined and the information entropy threshold can be fine-tuned. The steps are as follows: Select an array with a range of 0.9 to 1.1 and a step size of 0.01 as the candidate gain coefficient. Iterate through the candidate gain coefficients, and the spectrum data of the marked peak points are used as the training sample set. The adjusted threshold is obtained by multiplying the initially set threshold with the gain coefficient. Compare the information entropy of each window with the adjusted threshold. If the information entropy is less than the threshold, it is determined that the window has a peak point. The recall rate is used as the key performance indicator, and its calculation formula is: recall rate = true positive examples / (true positive examples + false negative examples), where true positive examples refer to those windows that actually contain peak points and are correctly identified as containing peak points by the model, and false negative examples are those windows that actually contain peak points but are mistakenly determined by the model as not containing peak points. Find the gain coefficient that can maximize the recall rate, and then multiply the coefficient by the initial threshold to achieve accurate fine-tuning of the threshold.
[0070] S4, compare the information entropy of the window with the entropy threshold, confirm the window with the peak, find the extreme value, replace the extreme value and the data within the half-peak width, recalculate the window information entropy, compare the information entropy with the threshold, and repeat this step until all peak points in the window are found;
[0071] Specifically, step S4 includes: calculating the information entropy of each window, comparing the window information entropy with a preset threshold, screening out windows with information entropy lower than the threshold, and identifying these windows as containing peaks;
[0072] The extreme points in the window are located, which are the peak points. The data of these peak points and their left and right half-peak widths are eliminated and filled with the window mean;
[0073] Repeat the above steps until the information entropy of all windows is higher than the threshold and all peak points are captured.
[0074] In this embodiment, the threshold comparison and peak window screening, peak point location, data replacement and mean filling are performed in a loop until all peak points in the window are found. Specifically, by calculating the information entropy of each window and comparing it with a preset threshold, windows with information entropy lower than the threshold are screened out, and these windows are considered to contain peaks. Subsequently, the extreme points in the window, i.e., the peak points, are located, and the data of these peak points and their left and right half-peak widths are removed and filled with the window mean. This process is performed in a loop, continuously calculating the window information entropy, threshold comparison, peak point location and replacement, until the information entropy of all windows is higher than the threshold, thereby capturing all peak points.
[0075] Specifically, in this embodiment, the information entropy is compared with the threshold, and windows with information entropy lower than the threshold are screened out. These windows are marked as candidate areas containing peaks. In the marked windows, the peak points are further located by finding the maximum value. In order to eliminate the influence of the peak on subsequent analysis, the identified peak points and their left and right half-peak width data are removed and filled with the mean of the window. The above process is executed cyclically until the information entropy of all windows is higher than the threshold, thereby capturing all peak points.
[0076] S5, limit the peak energy size, the frequency interval between the two peak points must be greater than the half-peak width, and eliminate noise and unimportant signals.
[0077] Specifically, step S5 includes: determining the minimum peak energy, and eliminating peaks with energy values less than the minimum peak energy;
[0078] Confirm the half-peak width. When it is determined that the interval between the two peaks is less than the preset half-peak width, it indicates that the two peaks are actually different manifestations of the same signal component. The peak with larger energy is retained, and the maximum amplitude and its corresponding frequency within this range are recorded. All points within this range are updated to the frequency and amplitude of the maximum amplitude point, and the frequency buffer and amplitude buffer are cleared at the same time.
[0079] After the traversal is completed, the filtered peak frequency array and amplitude array are obtained from the updated frequency array and amplitude array to eliminate noise and unimportant signals.
[0080] In this embodiment, the minimum peak energy is determined. Peaks with energy values less than the minimum peak energy are eliminated. Confirm the half-peak width. If the interval between the two peaks is less than a certain half-peak width, it means that the two peaks are actually different manifestations of the same signal component. The peak with larger energy is retained to reduce repeated counting or misjudgment. The steps are as follows: traverse the frequency array x and the amplitude array y, using the index variable i. In each iteration, determine whether the difference between the current frequency x[i] and the previous frequency x[i - 1] is less than the half-peak width. If this condition is met, the current frequency x[i] and amplitude y[i] are added to the frequency buffer and the amplitude buffer until the difference between the current frequency x[i] and the previous frequency x[i - 1] is greater than the half-peak width. In this process, the maximum amplitude and its corresponding frequency within this range are recorded, and all points within this range are updated to the frequency and amplitude of the maximum amplitude point, and the frequency buffer and the amplitude buffer are cleared at the same time. After the traversal is completed, the filtered peak frequency array and amplitude array are obtained from the updated frequency array and amplitude array.
[0081] Specifically, in this embodiment, each frequency amplitude reflects the vibration intensity of the frequency component. Peaks with too small intensity are peaks that we do not care about. Peak points with smaller energy can be eliminated by comparing with the minimum energy value of the peak point. When two adjacent windows monitor the same peak, the frequency interval of the peak will be less than the half-peak width. To solve this problem, the peak points are further screened according to the size of the half-peak width.
[0082] See also Figure 2 The second embodiment of the present invention further provides a spectrum peak point detection device based on an information entropy algorithm, which includes:
[0083] The conversion unit 201 is used to obtain vibration batch data when the equipment is running, and pre-process the vibration batch data to convert the time domain data in the vibration batch data into spectrum data;
[0084] The information entropy calculation unit 202 is used to perform sliding window slicing processing on the spectrum data using a sliding window technology, segment the spectrum data, discretize the continuous data on each window data, and calculate its information entropy;
[0085] The threshold calculation unit 203 is used to bin the information entropy to obtain the boundary value and frequency of each box after binning, and use the triangular threshold method to obtain the information entropy threshold of the window with a peak value, and determine the gain coefficient according to the marked peak data according to the preset evaluation index, and fine-tune the information entropy threshold;
[0086] The peak point finding unit 204 is used to compare the information entropy of the window with the entropy threshold, confirm the window with the peak, find the extreme value, replace the extreme value and the data within the half-peak width, recalculate the window information entropy, compare the information entropy with the threshold, and repeat this step until all the peak points in the window are found;
[0087] The elimination unit 205 is used to limit the peak energy size, the frequency interval between two peak points must be greater than the half-peak width, and noise and unimportant signals are eliminated.
[0088] The above is a preferred embodiment of the present invention. It should be pointed out that a person skilled in the art can make several improvements and modifications without departing from the principle of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A spectrum peak point detection method based on information entropy algorithm, characterized in that: include: Acquire vibration batch data when the equipment is running, and pre-process the vibration batch data to convert time domain data in the vibration batch data into frequency spectrum data; The spectrum data is subjected to sliding window slicing processing by adopting sliding window technology, the spectrum data is segmented, the continuous data discretization processing is performed on each window data, and its information entropy is calculated; The information entropy is binned to obtain the boundary value and frequency of each box after binning, and the information entropy threshold of the window with a peak value is obtained by using the triangular threshold method. According to the preset evaluation index and the marked peak data, the gain coefficient is determined and the information entropy threshold is fine-tuned; Compare the information entropy of the window with the entropy threshold, confirm the window with the peak, find the extreme value, replace the data within the extreme value and the half-peak width, recalculate the window information entropy, compare the information entropy with the threshold, and repeat this step until all peak points in the window are found; The peak energy size is limited, the frequency interval between two peak points must be greater than the half-peak width, and noise and unimportant signals are eliminated; The information entropy is binned to obtain the boundary value and frequency of each bin after binning, specifically: Determine the number of bins as N, and sort them in ascending order of information entropy based on the minimum and maximum values of information entropy, divide them into N boxes with equal width, traverse the information entropy array, map each information entropy to the corresponding box, record the frequency of each box, and obtain the box boundary value and frequency array; Among them, for boxes with a frequency of 0, continue the previous non-zero frequency and remove boxes with too large a frequency; The information entropy threshold value of the window with a peak value is obtained using the triangular threshold method, specifically: Select two peak points, one of which is the left boundary value x0, y0, and the other is the maximum value point x1, y1 of the histogram; Traverse the information entropy box, take the x-axis center value of the box as x, the frequency of the box as y, and calculate the vertical distance d from the point (x, y) to the line connecting the two peak points. The vertical distance formula is: Select the x-coordinate value of the point with the largest vertical distance as the initial information entropy threshold; According to the preset evaluation indicators, based on the marked peak data, the gain coefficient is determined and the information entropy threshold is fine-tuned, specifically: Select a nearby, equally spaced array as a candidate gain coefficient, traverse the candidate gain coefficients, select the spectrum data with marked peak points as a training set, and multiply the initially set threshold by the gain coefficient to obtain an adjusted threshold; Compare the information entropy of each window with the adjusted threshold. When it is determined that the information entropy is less than the threshold, it is considered that the window with the information entropy less than the threshold has a peak. Use recall rate as the key performance evaluation indicator, select the gain coefficient when the recall rate is the highest and multiply it by the initial threshold to achieve precise fine-tuning of the threshold. The calculation formula of recall rate is: recall rate = true positive examples / (true positive examples + false negative examples).
2. The spectrum peak point detection method based on information entropy algorithm according to claim 1 is characterized in that: Obtain vibration batch data when the equipment is running, and pre-process the vibration batch data to convert the time domain data in the vibration batch data into spectrum data, specifically: Acquire vibration batch data when the equipment is running, and use a high-pass filter to filter the vibration batch data; The filtered vibration batch data is preprocessed using a Hanning window function, and the time domain data in the vibration batch data is converted into spectrum data using FFT technology; The positive frequency part of the spectrum data is retained to construct the magnitude spectrum.
3. The spectrum peak point detection method based on information entropy algorithm according to claim 1 is characterized in that: The spectrum data is subjected to sliding window slicing processing using a sliding window technique to segment the spectrum data, specifically: The sliding window technology with the window size equal to the step length is used to perform sliding window slicing processing on the spectrum data. The formula for calculating the window length is: in, To round up.
4. The spectrum peak point detection method based on information entropy algorithm according to claim 1 is characterized in that: Discretize the continuous data of each window data and calculate its information entropy, specifically: Confirm the number of intervals and calculate the interval width according to the amplitude range in the window. The calculation formula of interval width is: interval width = (maximum value - minimum value) / number of intervals; Dividing the window data into a plurality of continuous and non-overlapping intervals according to the interval width; Map the continuous data in the interval to the lower limit of the interval to generate a discretized array; For the array after discretization of each window, calculate the probability p and information entropy H(U) of the duplicate elements appearing in the window. The information entropy calculation formula is: Among them, n is the duplicate element, p i is the probability of duplicate elements appearing.
5. The spectrum peak point detection method based on information entropy algorithm according to claim 1 is characterized in that: Compare the information entropy of the window with the entropy threshold, confirm the window with the peak, find the extreme value, replace the data within the extreme value and the half-peak width, recalculate the window information entropy, compare the information entropy and the threshold, and repeat this step until all the peak points in the window are found. Specifically: Calculate the information entropy of each window, compare the window information entropy with a preset threshold, filter out windows with information entropy lower than the threshold, and identify these windows as containing peaks; The extreme points in the window are located, which are the peak points. The data of these peak points and their left and right half-peak widths are eliminated and filled with the window mean; Repeat the above steps until the information entropy of all windows is higher than the threshold and all peak points are captured.
6. The spectrum peak point detection method based on information entropy algorithm according to claim 1 is characterized in that: The peak energy size is limited, the frequency interval between the two peak points must be greater than the half-peak width, and noise and unimportant signals are eliminated. Specifically: Determine the minimum peak energy and remove peaks with energy values less than the minimum peak energy; Confirm the half-peak width. When it is determined that the interval between the two peaks is less than the preset half-peak width, it indicates that the two peaks are actually different manifestations of the same signal component. The peak with larger energy is retained, and the maximum amplitude and its corresponding frequency within this range are recorded. All points within this range are updated to the frequency and amplitude of the maximum amplitude point, and the frequency buffer and amplitude buffer are cleared at the same time. After the traversal is completed, the filtered peak frequency array and amplitude array are obtained from the updated frequency array and amplitude array to eliminate noise and unimportant signals.
7. A spectrum peak point detection device based on information entropy algorithm, characterized in that: include: A conversion unit, used to obtain vibration batch data when the equipment is running, and pre-process the vibration batch data to convert the time domain data in the vibration batch data into frequency spectrum data; An information entropy calculation unit is used to perform sliding window slicing processing on the spectrum data using a sliding window technology, segment the spectrum data, discretize the continuous data on each window data, and calculate its information entropy; A threshold calculation unit is used to bin the information entropy to obtain the boundary value and frequency of each box after binning, and use the triangular threshold method to obtain the information entropy threshold of the window with a peak value, determine the gain coefficient according to the marked peak data according to the preset evaluation index, and fine-tune the information entropy threshold; The peak point finding unit is used to compare the information entropy of the window with the entropy threshold, confirm the window with the peak, find the extreme value, replace the data within the extreme value and the half-peak width, recalculate the window information entropy, compare the information entropy with the threshold, and repeat this step until all the peak points in the window are found; The elimination unit is used to limit the peak energy size. The frequency interval between two peak points must be greater than the half-peak width to eliminate noise and unimportant signals. The information entropy is binned to obtain the boundary value and frequency of each bin after binning, specifically: Determine the number of bins as N, and sort them in ascending order of information entropy based on the minimum and maximum values of information entropy, divide them into N boxes with equal width, traverse the information entropy array, map each information entropy to the corresponding box, record the frequency of each box, and obtain the box boundary value and frequency array; Among them, for boxes with a frequency of 0, continue the previous non-zero frequency and remove boxes with too large a frequency; The information entropy threshold value of the window with a peak value is obtained using the triangular threshold method, specifically: Select two peak points, one of which is the left boundary value x0, y0, and the other is the maximum value point x1, y1 of the histogram; Traverse the information entropy box, take the x-axis center value of the box as x, the frequency of the box as y, and calculate the vertical distance d from the point (x, y) to the line connecting the two peak points. The vertical distance formula is: Select the x-coordinate value of the point with the largest vertical distance as the initial information entropy threshold; According to the preset evaluation indicators, based on the marked peak data, the gain coefficient is determined and the information entropy threshold is fine-tuned, specifically: Select a nearby, equally spaced array as a candidate gain coefficient, traverse the candidate gain coefficients, select the spectrum data with marked peak points as a training set, and multiply the initially set threshold by the gain coefficient to obtain an adjusted threshold; Compare the information entropy of each window with the adjusted threshold. When it is determined that the information entropy is less than the threshold, it is considered that the window with the information entropy less than the threshold has a peak. Use recall rate as the key performance evaluation indicator, select the gain coefficient when the recall rate is the highest and multiply it by the initial threshold to achieve precise fine-tuning of the threshold. The calculation formula of recall rate is: recall rate = true positive examples / (true positive examples + false negative examples).
