Frequency correction method and device, computer device and storage medium
By determining the offset parameter in the time-frequency amplitude matrix using the difference between the target amplitude and adjacent amplitudes, the instantaneous frequency of rotating machinery is corrected, thus solving the problem of frequency resolution limitation and improving the accuracy of frequency extraction and the accuracy of rotating machinery state identification.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING ZHONGKE DONGREN TECH CO LTD
- Filing Date
- 2026-03-31
- Publication Date
- 2026-06-09
AI Technical Summary
In existing technologies, the frequency resolution limitation of the time-frequency amplitude matrix results in low instantaneous frequency accuracy of vibration signals, which cannot accurately reflect the state and faults of rotating machinery.
By acquiring the time-frequency amplitude matrix and frequency sequence of the vibration signal of rotating machinery, the offset parameter is determined by using the difference between the target amplitude, the first adjacent amplitude, and the second adjacent amplitude, and the instantaneous frequency is corrected to construct a more accurate frequency sequence.
It improves the accuracy of the instantaneous frequency of vibration signals, breaks through the frequency resolution limitation in the time-frequency amplitude matrix, and achieves more accurate frequency extraction and rotating machinery state identification.
Smart Images

Figure CN122171019A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a frequency correction method, apparatus, computer device, and storage medium. Background Technology
[0002] In the monitoring of the operating status or fault diagnosis of rotating machinery, the dominant frequency contained in the vibration signal of the rotating machinery can reflect the instantaneous rotational speed and its change process. Therefore, accurately extracting the frequency-time curve of the vibration signal is of great significance for identifying the condition and faults of rotating machinery.
[0003] In related technologies, the frequency with the largest amplitude in the time-frequency amplitude matrix of the vibration signal is selected as the instantaneous frequency at a certain time point by a peak-finding algorithm, thereby constructing the trajectory of the instantaneous frequency changing with time.
[0004] However, since the frequency resolution of the time-frequency amplitude matrix is limited by the window, the frequencies in the time-frequency amplitude matrix are quantized into a finite number of frequencies, resulting in a step-like change in the instantaneous frequencies extracted from each time point in the time-frequency amplitude matrix. Therefore, the accuracy of the extracted frequencies is low. Summary of the Invention
[0005] This application provides a frequency correction method, apparatus, computer device, and storage medium, which can overcome the limitation of frequency resolution in the time-frequency amplitude matrix on the accuracy of instantaneous frequency, thereby improving frequency accuracy. The technical solution is as follows.
[0006] On the one hand, a frequency correction method is provided, the method comprising: The time-frequency amplitude matrix and frequency sequence of the vibration signal of rotating machinery are obtained. The time-frequency amplitude matrix includes the amplitude of the vibration signal at multiple frequencies at multiple time points, and the frequency sequence indicates the first instantaneous frequency of the vibration signal at each of the multiple time points, wherein the first instantaneous frequency belongs to the multiple frequencies. For each of the plurality of time points, based on the time-frequency amplitude matrix and the frequency sequence, the target amplitude, the first adjacent amplitude, and the second adjacent amplitude of the vibration signal at that time point are determined; wherein, the target amplitude is the amplitude at the first instantaneous frequency at that time point, the first adjacent amplitude is the amplitude at the previous frequency at the first instantaneous frequency at that time point, and the second adjacent amplitude is the amplitude at the next frequency at the first instantaneous frequency at that time point. The offset parameter is determined based on the difference between the target amplitude, the first adjacent amplitude, and the second adjacent amplitude. The first instantaneous frequency at the time point is corrected according to the offset parameter to obtain the second instantaneous frequency at the time point.
[0007] Optionally, the time-frequency amplitude matrix includes multiple units, each unit representing the amplitude of the vibration signal at a frequency at a given time point; the process of determining the frequency sequence includes: Based on the amplitude and frequency corresponding to multiple units in the time-frequency amplitude matrix, the path with the lowest path cost is searched in the time-frequency amplitude matrix. The path includes a unit corresponding to each of the multiple time points. The path cost is used to measure the degree of unreasonableness of taking the frequency corresponding to each unit in the path as the instantaneous frequency of each time point. The frequency sequence is constructed based on the time points and frequencies corresponding to multiple units in the path.
[0008] Optionally, the step of searching for the path with the lowest path cost in the time-frequency amplitude matrix based on the amplitude and frequency corresponding to multiple units in the time-frequency amplitude matrix includes: Based on the amplitude corresponding to each unit in the time-frequency amplitude matrix, the observation cost of each unit is determined, and the observation cost is negatively correlated with the amplitude corresponding to the unit. Based on the frequency corresponding to each unit in the time-frequency amplitude matrix, the transfer cost of jumping from each unit at each time point to each unit at the next time point is determined. The transfer cost is positively correlated with the frequency difference, which refers to the difference between the frequencies corresponding to two units. Based on the observation cost of each unit and the transfer cost between the multiple units, the path with the lowest path cost is searched in the time-frequency amplitude matrix. The path cost is positively correlated with the observation cost of the units in the path and is also positively correlated with the transfer cost between the units in the path.
[0009] Optionally, determining the transition cost from each unit at each time point to each unit at the next time point based on the frequency corresponding to each unit in the time-frequency amplitude matrix includes: For the first unit at any time point and the second unit at the next time point, determine the absolute difference between the frequency corresponding to the first unit and the frequency corresponding to the second unit; If the absolute difference is not greater than a preset threshold, the weighting factor is multiplied by the square of the absolute difference to obtain the transfer cost from the first unit to the second unit. If the absolute difference is greater than the preset threshold, the transfer cost from the first unit to the second unit is determined to be infinite.
[0010] Optionally, the number of the plurality of time points is N; the step of searching for the path with the lowest path cost in the time-frequency amplitude matrix based on the observation cost of each unit and the transfer cost between the plurality of units includes: For each unit at the first time point, the observation cost of the unit is determined as the cumulative cost of the unit, and the cumulative cost of the unit is used to measure the degree of unreasonableness of selecting the unit as a path unit on the path; For each unit at time point k, the target preceding unit of the unit is determined among multiple units at time point k-1. The target preceding unit is the unit with the smallest sum of cumulative cost and transfer cost to the unit. The observation cost of the unit, the cumulative cost of the target preceding unit, and the transfer cost from the target preceding unit to the unit are added together to obtain the cumulative cost of the unit. Here, k is an integer greater than 1 and not greater than N. The unit with the lowest cumulative cost among multiple units at the Nth time point is determined as the Nth path unit, the target preceding unit of the kth path unit is determined as the (k-1)th path unit, and so on until the 1st path unit is obtained. The path formed from the 1st path unit to the Nth path unit is determined as the path with the lowest path cost.
[0011] Optionally, constructing the frequency sequence based on the time points and frequencies corresponding to multiple units in the path includes: Determine the frequency index of the frequency corresponding to multiple units in the path, the frequency index being used to indicate the frequency; The frequency sequence is obtained by sorting the frequency indices corresponding to the multiple units in the path according to the chronological order of their corresponding time points.
[0012] Optionally, the frequency sequence includes frequency indices of the vibration signal at multiple time points, the frequency indices of the time points indicating the first instantaneous frequency at the time point; The step of determining the offset parameter based on the difference between the target amplitude, the first adjacent amplitude, and the second adjacent amplitude includes: The index offset parameter is determined based on the difference between the target amplitude, the first adjacent amplitude, and the second adjacent amplitude. The step of correcting the first instantaneous frequency at the time point according to the offset parameter to obtain the second instantaneous frequency at the time point includes: The frequency index at the time point is corrected according to the index offset parameter to obtain the corrected frequency index. The corrected frequency index is converted into the second instantaneous frequency at the time point.
[0013] Optionally, determining the index offset parameter based on the difference between the target amplitude, the first adjacent amplitude, and the second adjacent amplitude includes: Subtract the second adjacent amplitude from the first adjacent amplitude to obtain the first difference; The second difference is obtained by subtracting twice the target amplitude from the sum of the first adjacent amplitude and the second adjacent amplitude; The index offset parameter is obtained by multiplying the scaling factor, the first difference, and the reciprocal of the second difference.
[0014] Optionally, after correcting the first instantaneous frequency at the time point according to the offset parameter to obtain the second instantaneous frequency at the time point, the method further includes: The second instantaneous frequencies at the multiple time points are smoothed to obtain the third instantaneous frequencies at the multiple time points.
[0015] Optionally, smoothing the second instantaneous frequencies at the plurality of time points to obtain the third instantaneous frequencies at the plurality of time points includes: For each of the plurality of time points, M neighboring time points are selected centered on the time point, where M is an odd number greater than 1; wherein, each neighboring time point and the second instantaneous frequency of each neighboring time point constitute a data point; the M neighboring time points include the time point. Polynomial fitting is performed on the M data points to obtain a P-order polynomial, where P is an integer greater than 1. The function value of the P-order polynomial at the specified time point is determined to obtain the third instantaneous frequency at that time point.
[0016] Optionally, after correcting the first instantaneous frequency at the time point according to the offset parameter to obtain the second instantaneous frequency at the time point, the method further includes at least one of the following: Based on the second instantaneous frequency at the multiple time points, a frequency curve of the vibration signal is generated, which is used to reflect the change of the instantaneous frequency of the vibration signal over time. Based on the second instantaneous frequency at the multiple time points, a rotational speed curve of the vibration signal is generated, which reflects the change of the rotational speed of the vibration signal over time.
[0017] On the other hand, a frequency correction device is provided, the device comprising: The acquisition module is used to acquire the time-frequency amplitude matrix and frequency sequence of the vibration signal of the rotating machinery. The time-frequency amplitude matrix includes the amplitude of the vibration signal at multiple frequencies at multiple time points, and the frequency sequence indicates the first instantaneous frequency of the vibration signal at each of the multiple time points, wherein the first instantaneous frequency belongs to the multiple frequencies. The first determining module is configured to, for each of the plurality of time points, determine, based on the time-frequency amplitude matrix and the frequency sequence, the target amplitude, the first adjacent amplitude, and the second adjacent amplitude of the vibration signal at that time point; wherein, the target amplitude is the amplitude at the first instantaneous frequency at that time point, the first adjacent amplitude is the amplitude at the previous frequency at the first instantaneous frequency at that time point, and the second adjacent amplitude is the amplitude at the next frequency at the first instantaneous frequency at that time point; The second determining module is used to determine the offset parameter based on the difference between the target amplitude, the first adjacent amplitude, and the second adjacent amplitude; The correction module is used to correct the first instantaneous frequency at the time point according to the offset parameter to obtain the second instantaneous frequency at the time point.
[0018] Optionally, the time-frequency amplitude matrix includes multiple units, each unit representing the amplitude of the vibration signal at a frequency at a given time point; the device further includes a frequency sequence determination module, used for: Based on the amplitude and frequency corresponding to multiple units in the time-frequency amplitude matrix, the path with the lowest path cost is searched in the time-frequency amplitude matrix. The path includes a unit corresponding to each of the multiple time points. The path cost is used to measure the degree of unreasonableness of taking the frequency corresponding to each unit in the path as the instantaneous frequency of each time point. The frequency sequence is constructed based on the time points and frequencies corresponding to multiple units in the path.
[0019] Optionally, the frequency sequence determination module is used to: Based on the amplitude corresponding to each unit in the time-frequency amplitude matrix, the observation cost of each unit is determined, and the observation cost is negatively correlated with the amplitude corresponding to the unit. Based on the frequency corresponding to each unit in the time-frequency amplitude matrix, the transfer cost of jumping from each unit at each time point to each unit at the next time point is determined. The transfer cost is positively correlated with the frequency difference, which refers to the difference between the frequencies corresponding to two units. Based on the observation cost of each unit and the transfer cost between the multiple units, the path with the lowest path cost is searched in the time-frequency amplitude matrix. The path cost is positively correlated with the observation cost of the units in the path and is also positively correlated with the transfer cost between the units in the path.
[0020] Optionally, the frequency sequence determination module is used to: For the first unit at any time point and the second unit at the next time point, determine the absolute difference between the frequency corresponding to the first unit and the frequency corresponding to the second unit; If the absolute difference is not greater than a preset threshold, the weighting factor is multiplied by the square of the absolute difference to obtain the transfer cost from the first unit to the second unit. If the absolute difference is greater than the preset threshold, the transfer cost from the first unit to the second unit is determined to be infinite.
[0021] Optionally, the number of the plurality of time points is N; the frequency sequence determination module is used for: For each unit at the first time point, the observation cost of the unit is determined as the cumulative cost of the unit, and the cumulative cost of the unit is used to measure the degree of unreasonableness of selecting the unit as a path unit on the path; For each unit at time point k, the target preceding unit of the unit is determined among multiple units at time point k-1. The target preceding unit is the unit with the smallest sum of cumulative cost and transfer cost to the unit. The observation cost of the unit, the cumulative cost of the target preceding unit, and the transfer cost from the target preceding unit to the unit are added together to obtain the cumulative cost of the unit. Here, k is an integer greater than 1 and not greater than N. The unit with the lowest cumulative cost among multiple units at the Nth time point is determined as the Nth path unit, the target preceding unit of the kth path unit is determined as the (k-1)th path unit, and so on until the 1st path unit is obtained. The path formed from the 1st path unit to the Nth path unit is determined as the path with the lowest path cost.
[0022] Optionally, the frequency sequence determination module is used to: Determine the frequency index of the frequency corresponding to multiple units in the path, the frequency index being used to indicate the frequency; The frequency sequence is obtained by sorting the frequency indices corresponding to the multiple units in the path according to the chronological order of their corresponding time points.
[0023] Optionally, the frequency sequence includes frequency indices of the vibration signal at multiple time points, the frequency indices of the time points indicating the first instantaneous frequency at the time point; The second determining module is used for: The index offset parameter is determined based on the difference between the target amplitude, the first adjacent amplitude, and the second adjacent amplitude. The correction module is used for: The frequency index at the time point is corrected according to the index offset parameter to obtain the corrected frequency index. The corrected frequency index is converted into the second instantaneous frequency at the time point.
[0024] Optionally, the second determining module is configured to: Subtract the second adjacent amplitude from the first adjacent amplitude to obtain the first difference; The second difference is obtained by subtracting twice the target amplitude from the sum of the first adjacent amplitude and the second adjacent amplitude; The index offset parameter is obtained by multiplying the scaling factor, the first difference, and the reciprocal of the second difference.
[0025] Optionally, the device further includes a smoothing module for: The second instantaneous frequencies at the multiple time points are smoothed to obtain the third instantaneous frequencies at the multiple time points.
[0026] Optionally, the smoothing module is used for: For each of the plurality of time points, M neighboring time points are selected centered on the time point, where M is an odd number greater than 1; wherein, each neighboring time point and the second instantaneous frequency of each neighboring time point constitute a data point; the M neighboring time points include the time point. Polynomial fitting is performed on the M data points to obtain a P-order polynomial, where P is an integer greater than 1. The function value of the P-order polynomial at the specified time point is determined to obtain the third instantaneous frequency at that time point.
[0027] Optionally, the device further includes a curve generation module for implementing at least one of the following: Based on the second instantaneous frequency at the multiple time points, a frequency curve of the vibration signal is generated, which is used to reflect the change of the instantaneous frequency of the vibration signal over time. Based on the second instantaneous frequency at the multiple time points, a rotational speed curve of the vibration signal is generated, which reflects the change of the rotational speed of the vibration signal over time.
[0028] On the other hand, a computer device is provided, the computer device including a processor and a memory, the memory storing at least one computer program, the at least one computer program being loaded and executed by the processor to perform the operations performed by the frequency correction method as described above.
[0029] On the other hand, a computer-readable storage medium is provided that stores at least one computer program, which is loaded and executed by a processor to perform the operations performed by the frequency correction method as described above.
[0030] On the other hand, a computer program product is provided, including a computer program loaded and executed by a processor to perform the operations performed by the frequency correction method as described above.
[0031] The solution provided in this application addresses the issue that the instantaneous frequencies of the vibration signal at each time point in the frequency sequence belong to multiple discrete frequencies in the time-frequency amplitude matrix, resulting in low accuracy. Therefore, this application, based on the frequency sequence, for each time point, utilizes the difference between the target amplitude at that time point, the first adjacent amplitude at the previous frequency, and the second adjacent amplitude at the next frequency to reflect the amplitude variation relationship between adjacent frequencies. This variation relationship characterizes the continuous amplitude variation of the frequency, thereby determining the offset parameter of the instantaneous frequency at that time point. The offset parameter is then used to correct the instantaneous frequency at that time point, resulting in a more accurate instantaneous frequency. This effectively overcomes the limitation of frequency resolution in the time-frequency amplitude matrix on the accuracy of the instantaneous frequency, improving the accuracy of the extracted frequency. Attached Figure Description
[0032] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0033] Figure 1 This is a schematic diagram of an implementation environment provided in an embodiment of this application; Figure 2 This is a flowchart of a frequency correction method provided in an embodiment of this application; Figure 3 This is a flowchart of another frequency correction method provided in the embodiments of this application; Figure 4This is a flowchart of a method for determining a time-frequency amplitude matrix provided in an embodiment of this application; Figure 5 This is a flowchart of another method for determining the time-frequency amplitude matrix provided in an embodiment of this application; Figure 6 This is a flowchart of another method for determining the time-frequency amplitude matrix provided in an embodiment of this application; Figure 7 This is a flowchart of another method for determining the time-frequency amplitude matrix provided in an embodiment of this application; Figure 8 This is a schematic diagram of the structure of a frequency correction device provided in an embodiment of this application; Figure 9 This is a schematic diagram of another frequency correction device provided in the embodiments of this application; Figure 10 This is a schematic diagram of the structure of a terminal provided in an embodiment of this application; Figure 11 This is a schematic diagram of the structure of a server provided in an embodiment of this application. Detailed Implementation
[0034] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.
[0035] It is understood that the terms "first," "second," etc., used in this application may be used to describe various concepts herein, but unless otherwise stated, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, without departing from the scope of this application, a first time point may be referred to as a second time point, and similarly, a second time point may be referred to as a first time point.
[0036] "At least one" refers to one or more time points. For example, at least one time point can be one time point, two time points, three time points, or any integer number of time points greater than or equal to one. "Multiple" refers to two or more time points. For example, multiple time points can be two time points, three time points, or any integer number of time points greater than or equal to two. "Each" refers to each of the at least one time point. For example, each time point refers to each of the multiple time points. If the multiple time points are three time points, then each time point refers to each of the three time points.
[0037] It should be noted that the information (including but not limited to user equipment information, user personal information, etc.), data (including but not limited to data used for analysis, data stored, data displayed, etc.) and signals (including but not limited to signals transmitted between user terminals and other devices) involved in this application have all been fully authorized by the user or relevant parties, and the collection, use and processing of the relevant data shall comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0038] The frequency correction method provided in this application can be executed by a computer device, which can be at least one of a terminal and a server. The following is a schematic diagram illustrating the implementation environment of the frequency correction method provided in this application. See also... Figure 1 , Figure 1 This is a schematic diagram of an implementation environment provided in an embodiment of this application. The implementation environment includes: a terminal 101 and a server 102.
[0039] In some embodiments, terminal 101 may run a client application with a target application that provides the function of correcting the instantaneous frequency of the rotating machinery based on the time-frequency amplitude matrix and frequency sequence of the vibration signal of the rotating machinery. This application embodiment does not limit the implementation form of the target application; for example, it may be an application that requires downloading and installation, a mini-program that does not require installation, a web application, etc.
[0040] In this embodiment, terminal 101 can be installed at one or more monitoring locations on the rotating machinery to acquire vibration signals from the rotating machinery. Server 102 provides background services for the target application. After acquiring the vibration signals from the rotating machinery, terminal 101 transmits the vibration signals to server 102. Server processes the vibration signals into a time-frequency amplitude matrix and a frequency sequence, and then corrects the instantaneous frequency of the rotating machinery based on the time-frequency amplitude matrix and frequency sequence. The corrected instantaneous frequency is then sent to terminal 101 for output.
[0041] In other embodiments, the terminal 101 itself may also acquire the vibration signal of the rotating machinery and process the vibration signal into a time-frequency amplitude matrix and a frequency sequence, and then correct the instantaneous frequency of the rotating machinery based on the time-frequency amplitude matrix and the frequency sequence.
[0042] Terminal 101 can be a computer device such as a vibration sensor with signal processing and output display functions, a mobile phone, a tablet computer, a multimedia playback device, a PC (Personal Computer), a wearable device, a VR (Virtual Reality) device, an AR (Augmented Reality) device, or a MR (Mixed Reality) device.
[0043] Server 102 can be a standalone physical server, a server cluster consisting of multiple physical servers, or a distributed file system. It can also be a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. Server 102 and terminal 101 are directly or indirectly connected via wired or wireless communication.
[0044] Figure 2 This is a flowchart of a frequency correction method provided in an embodiment of this application. This embodiment is executed by a computer device. See also... Figure 2 The method includes the following steps.
[0045] 201. The computer equipment acquires the time-frequency amplitude matrix and frequency sequence of the vibration signal of rotating machinery. The time-frequency amplitude matrix includes the amplitude of the vibration signal at multiple frequencies at multiple time points, and the frequency sequence indicates the first instantaneous frequency of the vibration signal at each of the multiple time points, and the first instantaneous frequency belongs to multiple frequencies.
[0046] Rotating machinery refers to mechanical equipment with rotating parts during operation, such as motors, fans, and compressors.
[0047] Vibration signals of rotating machinery refer to the signals of vibrations generated during the operation of rotating machinery that change over time. Vibration signals are typically composed of the superposition of multiple components of different frequencies, with the dominant frequency component being considered as the frequency component related to the rotational speed of the machinery. Vibration signals can be acquired by vibration sensors installed on the rotating machinery. These vibration signals are time-domain signals, with the horizontal axis representing time and the vertical axis representing the vibration amplitude. The vibration amplitude is the numerical value of the vibration signal at a specific point in time and can be used to reflect the displacement, velocity, or acceleration of the rotating machinery.
[0048] The time-frequency amplitude matrix is obtained by performing a short-time Fourier transform (STFT) on the vibration signal. The time-frequency amplitude matrix can be understood as a two-dimensional matrix, with the horizontal axis representing time and the vertical axis representing frequency. The value of each element in the time-frequency amplitude matrix represents the amplitude of the corresponding frequency at a given time point, and the amplitude represents the energy of the frequency.
[0049] A frequency sequence indicates the first instantaneous frequency of a vibration signal at multiple time points. It is a sequence of instantaneous frequencies extracted from multiple discrete time points in the time-frequency amplitude matrix. At a given time point, the vibration signal generates multiple frequency components, such as those generated by the rotation of rotating machinery or by noise. The first instantaneous frequency is the dominant frequency component of the vibration signal at that particular time point. This first instantaneous frequency can be considered as the rotational frequency of the rotating machinery and is directly related to its rotational speed. This frequency sequence reflects the change of the dominant frequency in the vibration signal over time.
[0050] In one possible implementation, a computer device performs a short-time Fourier transform on the vibration signal to obtain a time-frequency amplitude matrix. The multiple columns of the time-frequency amplitude matrix correspond to multiple time points, and the multiple rows correspond to multiple frequencies. Therefore, a single element in the time-frequency amplitude matrix represents the amplitude of the vibration signal at a specific frequency at a given time point. It should be noted that different time points correspond to the same multiple frequencies, and each frequency has a corresponding amplitude at each time point.
[0051] 202. For each of multiple time points, the computer device determines the target amplitude, the first adjacent amplitude, and the second adjacent amplitude of the vibration signal at that time point based on the time-frequency amplitude matrix and the frequency sequence.
[0052] The target amplitude is the amplitude at the first instantaneous frequency at each time point, the first adjacent amplitude is the amplitude at the previous frequency at the first instantaneous frequency at that time point, and the second adjacent amplitude is the amplitude at the next frequency at the first instantaneous frequency at that time point.
[0053] In this embodiment, the frequency sequence is determined based on a time-frequency amplitude matrix. Multiple frequencies in this matrix are discrete, and the first instantaneous frequency of the vibration signal at each time point in the frequency sequence belongs to these discrete frequencies within the time-frequency amplitude matrix, resulting in low accuracy. Therefore, steps 202-204 are used to correct the first instantaneous frequency at each time point.
[0054] For any given time point among multiple time points, the computer searches the time-frequency amplitude matrix for the amplitude at a first instantaneous frequency at that time point, and uses the found amplitude as the target amplitude for that time point. The discrete frequencies in the time-frequency amplitude matrix are arranged in ascending order. The computer determines the previous frequency and the next frequency among the multiple frequencies at the first instantaneous frequency. The search in the time-frequency amplitude matrix for the amplitude at the previous frequency at the first instantaneous frequency at that time point is used as the first adjacent amplitude for that time point. Similarly, the search in the time-frequency amplitude matrix for the amplitude at the next frequency at the first instantaneous frequency at that time point is used as the second adjacent amplitude for that time point.
[0055] For example, taking time point t as an example, the frequency at the first instant of time point t is: First instantaneous frequency The previous frequency is First instantaneous frequency The previous frequency is Therefore, the target amplitude is equal to the x-coordinate of the time-frequency amplitude matrix, where the y-coordinate is t. The amplitude at point t, the first adjacent amplitude is equal to the amplitude at point t on the time-frequency amplitude matrix, where the x-axis is t and the y-axis is t. The amplitude at point t, the second adjacent amplitude is equal to the amplitude at point t on the time-frequency amplitude matrix, where the x-axis is t and the y-axis is t. The amplitude at that point.
[0056] 203. The computer equipment determines the offset parameter based on the difference between the target amplitude, the first adjacent amplitude, and the second adjacent amplitude.
[0057] The offset parameter reflects the offset of the first instantaneous frequency at a given time point, and it indicates the offset direction and amount.
[0058] Since the actual instantaneous frequencies (dominant frequencies) at various time points typically form a continuously varying curve, and the currently determined first instantaneous frequency is an approximate sample of this continuous curve, if the currently determined first instantaneous frequency happens to coincide with the actual instantaneous frequency, then the target amplitude at that first instantaneous frequency will generally exhibit symmetry or smoothness between adjacent frequencies. However, when the first instantaneous frequency deviates from the actual instantaneous frequency, the symmetry or smoothness between adjacent frequencies will be broken, meaning the target amplitude will tilt to one side in frequency distribution. The degree of asymmetry in the target amplitude reflects the direction and extent of the deviation of the first instantaneous frequency relative to the actual instantaneous frequency.
[0059] Therefore, the difference between the target amplitude at a given time point, the first adjacent amplitude, and the second adjacent amplitude can quantify the degree of amplitude asymmetry, thereby inferring the offset of the first instantaneous frequency relative to the true instantaneous frequency, which is the offset parameter. Subsequently, the original first instantaneous frequency can be corrected based on this offset parameter.
[0060] 204. The computer equipment corrects the first instantaneous frequency at the time point according to the offset parameter to obtain the second instantaneous frequency at the time point.
[0061] After obtaining the offset parameter, the computer equipment corrects the first instantaneous frequency at that time point based on the offset parameter, thereby obtaining a more accurate second instantaneous frequency. This moves the finally determined instantaneous frequency from the position of the discrete frequency to a position closer to the true frequency, achieving refinement of the instantaneous frequency and improving the accuracy and continuity of frequency tracking.
[0062] The method provided in this application addresses the issue that the instantaneous frequencies of the vibration signal at each time point in the frequency sequence belong to multiple discrete frequencies in the time-frequency amplitude matrix, resulting in low accuracy. Therefore, this application, based on the frequency sequence, for each time point, utilizes the difference between the target amplitude at that time point, the first adjacent amplitude at the previous frequency, and the second adjacent amplitude at the next frequency to reflect the amplitude variation relationship between adjacent frequencies. This variation relationship characterizes the continuous amplitude variation of the frequency, thereby determining the offset parameter of the instantaneous frequency at that time point. The offset parameter is then used to correct the instantaneous frequency at that time point, resulting in a more accurate instantaneous frequency. This effectively overcomes the limitation of frequency resolution in the time-frequency amplitude matrix on the accuracy of the instantaneous frequency, improving the accuracy of the extracted frequency.
[0063] The above Figure 2 The diagram shown is only the basic process of this application. The following is a further explanation of the solution provided in this application based on a specific implementation method. Figure 3 This is a flowchart of another frequency correction method provided in this application embodiment. This application embodiment is executed by a computer device. See also... Figure 3 The method includes the following steps.
[0064] 301. Computer equipment acquires the time-frequency amplitude matrix of the vibration signal of rotating machinery, the time-frequency amplitude matrix including the amplitude of the vibration signal at multiple frequencies at multiple time points.
[0065] Rotating machinery refers to mechanical equipment with rotating parts during operation. The time-frequency amplitude matrix is obtained by performing a short-time Fourier transform on the vibration signal. The horizontal axis of the time-frequency amplitude matrix represents time, and the vertical axis represents frequency. The value of each element in the time-frequency amplitude matrix represents the amplitude of the corresponding frequency at a point in time.
[0066] The process of obtaining the time-frequency amplitude matrix in step 301 is the same as the process of obtaining the time-frequency amplitude matrix in step 201 above, and will not be repeated here.
[0067] 302. The computer device searches for the path with the lowest path cost in the time-frequency amplitude matrix based on the amplitude and frequency corresponding to multiple units in the time-frequency amplitude matrix. The path includes one unit corresponding to each time point in multiple time points. The path cost is used to measure the degree of unreasonableness of taking the frequency corresponding to each unit in the path as the instantaneous frequency of each time point.
[0068] The time-frequency amplitude matrix comprises multiple elements, each representing the amplitude of the vibration signal at a specific frequency at a given time point. It can be understood as follows: the time-frequency amplitude matrix consists of multiple elements, each element's value representing the amplitude of the vibration signal at a specific frequency at a given time point, and each element in the time-frequency amplitude matrix is processed as a separate element. Alternatively, the time-frequency amplitude matrix can be viewed as a two-dimensional grid, with each column corresponding to a discrete time point. Each row corresponds to a discrete frequency. Each cell in a two-dimensional grid Represents a point in time At frequency The amplitude.
[0069] The algorithm jumps sequentially along the time points in the time-frequency amplitude matrix, selecting one unit at each time point to obtain a corresponding unit. Finally, the selected units are arranged in the order of the time points to form a path. Selecting a unit at a given time point is equivalent to selecting the frequency corresponding to that unit as the first instantaneous frequency at that time point. After selecting units for all time points, a set of first instantaneous frequencies arranged according to time points is obtained, thus forming a frequency sequence. Therefore, the path search process is essentially the process of determining the first instantaneous frequency at each time point.
[0070] Path cost quantifies the rationality of multiple units within a path. For a single unit, a larger amplitude is more rational; for two adjacent units, a smaller amplitude difference is more rational. Path cost is a quantified measure determined based on the amplitude of a unit and the amplitude difference between adjacent units. A smaller path cost indicates that using the frequencies of each unit in the path as instantaneous frequencies is more rational, while a larger path cost indicates that using the frequencies of each unit in the path as instantaneous frequencies is less rational.
[0071] Therefore, by searching for the path with the lowest path cost in the time-frequency amplitude matrix, a relatively more reasonable instantaneous frequency can be found at each time point, thus obtaining a frequency trajectory that has both high amplitude and continuous change in time.
[0072] In one possible implementation, the process by which the computer device searches for the path with the lowest path cost in the time-frequency amplitude matrix includes the following steps 3021-3023.
[0073] 3021. Based on the amplitude corresponding to each unit in the time-frequency amplitude matrix, determine the observation cost of each unit. The observation cost is negatively correlated with the amplitude corresponding to the unit.
[0074] Here, observation cost represents the degree of unreasonableness in using the frequency corresponding to a given unit as the instantaneous frequency at the corresponding time point. The larger the amplitude corresponding to a unit, the smaller the observation cost, and the more reasonable it is to use the frequency corresponding to that unit as the instantaneous frequency at the corresponding time point. Conversely, the smaller the amplitude corresponding to a unit, the larger the observation cost, and the more unreasonable it is to use the frequency corresponding to that unit as the instantaneous frequency at the corresponding time point.
[0075] Optionally, the computer device uses the following formula (1) to determine the observation cost for each unit.
[0076] ;Formula (1) in, The observation cost of a unit, This indicates the amplitude corresponding to the unit.
[0077] 3022. Based on the frequency corresponding to each unit in the time-frequency amplitude matrix, determine the transfer cost from each unit at each time point to each unit at the next time point. The transfer cost is positively correlated with the frequency difference, which refers to the difference between the frequencies corresponding to two units.
[0078] Here, the transfer cost from one unit to another represents the frequency at a given time point. Jump to the frequency of the next time point The physical resistance (i.e., the degree of unreasonableness) is considered. For any two cells at adjacent time points, the computer determines the frequency difference between these two cells, and based on this frequency difference, determines the transfer cost to jump from one cell to the next. The larger the frequency difference, the greater the transfer cost; the smaller the frequency difference, the smaller the transfer cost.
[0079] Optionally, for the first unit at any time point and the second unit at the next time point, the absolute difference between the frequency corresponding to the first unit and the frequency corresponding to the second unit is determined; if the absolute difference is not greater than a preset threshold, the weighting factor is multiplied by the square of the absolute difference to obtain the transfer cost from the first unit to the second unit; if the absolute difference is greater than the preset threshold, the transfer cost from the first unit to the second unit is determined to be infinite.
[0080] In other words, when the frequency jump amplitude does not exceed the physical allowable range, the transfer cost is calculated according to a preset formula to ensure that the larger the frequency jump amplitude, the larger the transfer cost. When the frequency jump amplitude exceeds the physical allowable range, the transfer cost is directly assigned to infinity so that paths that do not conform to physical laws are directly excluded during path search.
[0081] Optionally, the computer device uses the following formula (2) to determine the transfer cost from one unit to another.
[0082] ;Formula (2) in, This indicates the frequency corresponding to the first element, which is the element at time point t-1. This indicates the frequency corresponding to the second unit, which is the unit at time point t. This represents the transfer cost from the first unit to the second unit. Indicates the weighting factor. This represents the square of the absolute difference between the frequency corresponding to the first unit and the frequency corresponding to the second unit. It represents infinity.
[0083] In this implementation, a preset threshold is used to constrain the absolute difference between the frequencies of two units. When the absolute difference between the frequencies of two units is no greater than the preset threshold, the transfer cost between the two units is calculated based on the square of the absolute difference. When the absolute difference between the frequencies of two units is greater than the preset threshold, the transfer cost between the two units is directly set to infinity. This approach enhances the ability to distinguish small frequency changes by using the square of the absolute difference, improving the precision of path selection. Furthermore, by introducing a preset threshold constraint, unreasonable transfers with excessively large frequency differences can be directly eliminated, thus avoiding excessive frequency jumps in the path and improving the rationality of path selection.
[0084] 3023. Based on the observation cost of each unit and the transfer cost between multiple units, search for the path with the lowest path cost in the time-frequency amplitude matrix. The path cost is positively correlated with the observation cost of the units in the path, and the path cost is also positively correlated with the transfer cost between the units in the path.
[0085] Path cost depends on the observation cost of each cell in the path and the transfer cost between cells. The higher the observation cost of a cell in the path, the higher the path cost. Conversely, the lower the observation cost of a cell in the path, the lower the path cost. Similarly, the higher the transfer cost between cells in the path, the higher the path cost.
[0086] In this implementation, the observation cost is negatively correlated with the amplitude of the cell, while the transfer cost from one cell to another is positively correlated with the frequency difference between the two cells. The path cost of the entire path depends on both the observation cost and the transfer cost. Therefore, searching for a path based on this path cost not only prioritizes cells with higher amplitudes but also penalizes paths with drastic frequency changes, effectively preventing frequency jumps between adjacent cells in the path. Thus, through the synergistic effect of the observation cost and the transfer cost, the finally searched path maintains both high amplitude and good continuity, thereby improving the accuracy of the searched path and, consequently, the accuracy of the extracted frequency sequence.
[0087] In one possible implementation, the process of searching for a path based on observation cost and transfer cost in step 3023 above includes: For each unit at the first time point, the observation cost of the unit is determined as the cumulative cost of the unit, which is used to measure the unreasonableness of selecting the unit as a path unit on the path. For each unit at the kth time point, the target preceding unit of the unit is determined among multiple units at the (k-1)th time point. The target preceding unit is the unit with the smallest sum of cumulative cost and transfer cost to that unit. The observation cost of the unit, the cumulative cost of the target preceding unit, and the transfer cost from the target preceding unit to the unit are added together to obtain the cumulative cost of the unit; where k is an integer greater than 1 and not greater than N. The unit with the smallest cumulative cost among multiple units at the Nth time point is determined as the Nth path unit, and the target preceding unit of the kth path unit is determined as the (k-1)th path unit, until the first path unit is obtained. The path formed from the first path unit to the Nth path unit is determined as the path with the lowest path cost.
[0088] In this context, the target preceding unit of each unit at time point k is selected from multiple units at time point k-1, and the cumulative cost of the target preceding unit is used to measure the degree of unreasonableness in selecting the unit as a path unit on the path.
[0089] The above implementation method is divided into a forward accumulation phase and a backward backtracking phase.
[0090] Forward accumulation phase: Determine the cumulative cost of each unit and the target preceding unit for each unit.
[0091] Starting from the first time point t=1, the calculation proceeds from front to back according to the order of the time points.
[0092] For the first time point t=1, take the unit at the first time point... For example, directly using the unit The observation cost as a unit The cumulative cost. The unit at the first time point has no target preceding unit.
[0093] For the k-th time point t=k, take the unit at the k-th time point as an example. For example, first iterate through each unit at the (k-1)th time point to reach any unit at the (k-1)th time point. For example, determine the unit The cumulative cost and from the unit To unit The sum of the transfer costs yields the unit. The selection cost is calculated by obtaining the selection cost of each unit at time point k-1 after completing the traversal. The unit with the smallest selection cost at time point k-1 is selected as the unit. The target pre-cell unit. Then, the unit... The observation cost and the unit The cost of selecting the target preceding unit is added together to obtain the unit. The cumulative cost. In this way, we can obtain the target preceding unit and the cumulative cost for each unit at the k-th time point.
[0094] It should be noted that, in this embodiment, starting from the first time point t=1, the cumulative cost of each unit at each time point is calculated from front to back according to the order of the time points. Therefore, when determining the unit at the k-th time point... When calculating the cumulative cost, it is possible to obtain the value at the (k-1)th time point that has already been determined to be completed. The cumulative cost.
[0095] After determining the target preceding unit and cumulative cost of each unit at the k-th time point, the same method is used to continue determining the target preceding unit and cumulative cost of each unit at the (k+1)-th time point, and so on, until the target preceding unit and cumulative cost of each unit at the N-th time point (that is, the last time point) are determined, thus obtaining the cumulative cost and target preceding unit of each unit at each time point.
[0096] Optionally, each frequency in the time-frequency amplitude matrix has a frequency index. For each cell, after determining the target preceding cell, the frequency index of the target preceding cell is recorded, and the target preceding cell can be determined based on the frequency index.
[0097] Optionally, the computer device uses the following formula (3) to determine the cumulative cost of the unit.
[0098] ;Formula (3) in, This represents the cumulative cost of unit k at time point t. This represents the observation cost of unit k at time point t. This represents the cost of selecting the target preceding unit for unit k at time point t. This represents the cumulative cost of unit j at time point t-1. This represents the transfer cost from unit j at time point t-1 to unit k at time point t.
[0099] Backtracking phase: Backtracking is performed according to the target preceding unit of each unit to obtain the path.
[0100] Starting from the last time point t=N, backtrack from the end to the beginning according to the order of the time points.
[0101] For the Nth time point t=N, among the multiple units at the Nth time point, determine the unit with the smallest cumulative cost and take that unit as the last path unit on the path, that is, the Nth path unit.
[0102] For the k-th time point t=k, the unit is selected at the (k+1)-th time point. Taking the (k+1)th path unit as an example, among the multiple units at the kth time point, the unit is determined. The target preceding unit is used as the kth path unit on the path.
[0103] It should be noted that in the aforementioned forward accumulation phase, the target preceding unit for each cell has already been determined. Therefore, in the backward backtracking phase, the determined target preceding unit can be directly obtained. For example, in the forward accumulation phase, the frequency index of the target preceding unit for each cell is recorded. In the backward backtracking phase, the cell can be determined based on the recorded frequency index. The target front-end unit.
[0104] After determining the k-th path unit, the same method is used to determine the (k-1)-th path unit, and so on, until the 1-th path unit is determined. This process is repeated to obtain the N-th path unit, the (N-1)-th path unit, and so on until the 1-th path unit. The path formed from the 1-th path unit to the N-th path unit is the path with the lowest path cost.
[0105] In this implementation, the cumulative cost of each unit and its target predecessor unit are determined first, from front to back. Then, the unit with the minimum cumulative cost at the last time point is taken as the path unit at the last time point. Next, starting from the path unit at the last time point, the path units at each time point are traced backward according to their target predecessor units, thus searching for a complete path. This method searches for paths by combining forward accumulation and backward backtracking. This not only allows for path searching globally, avoiding the pitfalls of getting trapped in local optima when using forward point-by-point selection, but also improves search efficiency.
[0106] 303. The computer device constructs a frequency sequence based on the time points and frequencies corresponding to multiple units in the path. The frequency sequence indicates the first instantaneous frequency of the vibration signal at each of the multiple time points, and the first instantaneous frequency belongs to multiple frequencies.
[0107] Specifically, by arranging the frequencies corresponding to multiple units in the path in the order of their corresponding time points from first to last, and taking each of the sequentially arranged frequencies as the first instantaneous frequency at each time point, a frequency sequence can be obtained. This frequency sequence indicates the first instantaneous frequency of the vibration signal at each of the multiple time points, and the first instantaneous frequency at each time point is the frequency component of the vibration signal that dominates at that time point.
[0108] In related technologies, the peak-finding method is used to take the frequency corresponding to the maximum amplitude at each time point as the instantaneous frequency, without considering the continuity constraint in the time dimension. However, in the vibration signal of rotating machinery, the spectrum often contains noise, multiple frequency components, and closely spaced order components, so the amplitude of the dominant frequency may not be at its maximum at some time points. In this case, the peak-finding method may misidentify local noise peaks as instantaneous frequencies, resulting in abrupt changes in the extracted frequency between different time points.
[0109] In this implementation, the amplitude at a specific frequency at a given time point in the time-frequency amplitude matrix is treated as a single unit. Based on the amplitudes corresponding to each unit in the matrix, a path with the lowest cost is searched among multiple units. This path encompasses the more reasonable instantaneous frequencies at each time point, thus constructing a more accurate frequency sequence. This method avoids the instability caused by relying solely on local peaks in traditional point-by-point peak-finding methods. The resulting frequency sequence considers not only the amplitude of individual units but also the continuity and rationality of the time dimension, effectively suppressing misjudgments caused by noise, reducing frequency jumps, and improving the accuracy of the frequency sequence.
[0110] In one possible implementation, the computer device determines the frequency indices of multiple units in the path, which are used to indicate frequencies; the frequency indices of the multiple units in the path are sorted according to the chronological order of the time points corresponding to the multiple units in the path to obtain a frequency sequence. The frequency sequence includes the frequency indices of the vibration signal at multiple time points, where the frequency index of each time point indicates the frequency at the first instant at that time point.
[0111] In this context, the frequency index can be understood as the position number of multiple discrete frequencies in the time-frequency amplitude matrix. In the time-frequency amplitude matrix, the frequencies are not continuous but discretized into multiple equally spaced frequencies arranged in ascending order. Each frequency corresponds to a unique position number, which is the frequency index. For example, the 0th frequency point, the 1st frequency point, and so on up to the Kth frequency point; each frequency index uniquely corresponds to a specific frequency.
[0112] Furthermore, a definite mapping relationship exists between the frequency index and the frequency, which is typically determined by both the sampling frequency and the transform length. In scenarios based on the short-time Fourier transform, the frequency interval is fixed, and its size is determined by the sampling frequency and the transform length. Specifically, if the sampling frequency is... If the transform length is N, then the interval between two adjacent frequencies is The frequency corresponding to the k-th frequency index can be represented as Therefore, through this mapping relationship, the frequency can be determined based on the frequency index.
[0113] In this embodiment, the frequencies corresponding to multiple units in the path are taken as the first instantaneous frequencies at the corresponding time points of the multiple units. The frequency indices of these first instantaneous frequencies are then arranged sequentially according to the time points corresponding to the multiple units in the path, from earliest to latest, to obtain the frequency sequence. For example, this frequency sequence can be represented as follows: , The index representing the first instantaneous frequency at time point t.
[0114] In this implementation, the frequency corresponding to each unit in the path is represented by a frequency index, and the frequency index is sorted according to the time order to construct the frequency sequence, which reduces the complexity of the frequency sequence and helps to improve the efficiency of data processing.
[0115] 304. For each of multiple time points, the computer device determines the target amplitude, the first adjacent amplitude, and the second adjacent amplitude of the vibration signal at that time point based on the time-frequency amplitude matrix and the frequency sequence.
[0116] The target amplitude is the amplitude at the first instantaneous frequency at a given time point, the first adjacent amplitude is the amplitude at the previous frequency at the first instantaneous frequency at a given time point, and the second adjacent amplitude is the amplitude at the next frequency at the first instantaneous frequency at a given time point.
[0117] Where time point is denoted as t, the target amplitude, the first adjacent amplitude and the second adjacent amplitude at time point can be represented by the following formulas (4)-(6).
[0118] ;Formula (4) ;Formula (5) ;Formula (6) in, Indicates the first adjacent amplitude. This represents the amplitude of the previous frequency at the first instant of time t. The frequency index is the frequency of the first instant. It is the frequency index of the previous frequency of the first instantaneous frequency. Indicates the target amplitude. It represents the amplitude of the frequency at the first instant at time point t. Indicates the second adjacent amplitude. This represents the amplitude of the next frequency at the first instant of time t. This is the frequency index of the next frequency after the first instantaneous frequency.
[0119] 305. The computer device determines the index offset parameter based on the difference between the target amplitude, the first adjacent amplitude, and the second adjacent amplitude.
[0120] The frequency sequence includes frequency indices of the vibration signal at multiple time points, with each time point's frequency index indicating the first instantaneous frequency at that point. The index offset parameter reflects the offset of the frequency index at the first instantaneous frequency at that time point, indicating both the direction and amount of the offset.
[0121] In one possible implementation, the computer device subtracts the second adjacent amplitude from the first adjacent amplitude to obtain a first difference; subtracts twice the target amplitude from the sum of the first and second adjacent amplitudes to obtain a second difference; and multiplies the scaling factor, the first difference, and the reciprocal of the second difference to obtain an index offset parameter.
[0122] The computer equipment constructs three data points based on the target amplitude, the first adjacent amplitude, and the second adjacent amplitude of the vibration signal at a given time point: , , Based on these three data points, construct a quadratic polynomial passing through these three data points: The parabola vertex of the quadratic polynomial is determined relative to the frequency index using the principle of extrema. index offset parameter The derivation process is as follows.
[0123] The formula for determining the vertex of a parabola is: ;Formula (7).
[0124] Substituting the three data points above into the quadratic polynomial, we can determine the coefficients a and b of the quadratic polynomial: ;Formula (8) ;Formula (9) Substituting the above formulas (8) and (9) into formula (7), we can obtain the parabola vertex relative to the frequency index. index offset parameter
[0125] ;Formula (10) Therefore, the index offset parameter can be determined according to formula (10), which is the product of the scaling factor, the reciprocal of the first difference, and the second difference. Optionally, the value range of this index offset parameter is within... between.
[0126] In this implementation, a first difference and a second difference are constructed based on the target amplitude, the first adjacent amplitude, and the second adjacent amplitude. The index offset parameter is determined based on these first and second differences. This approach utilizes the amplitude's variation trend within a local range to reflect the true frequency's positional distribution among discrete frequency points, achieving accurate estimation of the frequency offset with lower computational complexity. Compared to interpolation methods, this method reduces the complexity of determining the index offset parameter and improves its efficiency.
[0127] 306. The computer equipment corrects the frequency index of the time point according to the index offset parameter to obtain the corrected frequency index, and converts the corrected frequency index into the second instantaneous frequency of the time point.
[0128] Here, the frequency index at that time point refers to the frequency index of the first instantaneous frequency in the frequency sequence at that time point. The computer device adds the frequency index of the first instantaneous frequency to the index offset parameter to obtain the corrected frequency index, and converts the corrected frequency index into the second instantaneous frequency at that time point.
[0129] In one possible implementation, the computer device uses the following formulas (11)-(12) to determine the second instantaneous frequency.
[0130] ;Formula (11) ;Formula (12) in, The frequency index represents the frequency at the first instant. Indicates the index offset parameter. Indicates the corrected frequency index. Indicates the second instantaneous frequency. The sampling frequency of the short-time Fourier transform is represented by , and N represents the transform length of the short-time Fourier transform.
[0131] In this embodiment, frequency is represented as a frequency index. An index offset parameter is first determined based on the difference in amplitude between adjacent cells. Then, the frequency index is corrected using the index offset parameter, and finally, the corrected frequency index is converted back to a frequency. This method achieves sub-pixel-level frequency correction for multiple discrete frequencies, obtaining results closer to the true frequency position, thereby significantly improving the accuracy of frequency confirmation.
[0132] It should be noted that steps 305-306 above determine the offset parameter based on the difference between the target amplitude, the first adjacent amplitude, and the second adjacent amplitude; and correct the first instantaneous frequency at the time point according to the offset parameter to obtain the second instantaneous frequency at the time point.
[0133] 307. The computer equipment smooths the second instantaneous frequency at multiple time points to obtain the third instantaneous frequency at multiple time points.
[0134] By executing steps 301-306 above, the computer device can obtain a more accurate second instantaneous frequency of the vibration signal at each of multiple time points. The computer device can then smooth the second instantaneous frequency at these multiple time points to obtain a smoother third instantaneous frequency, thereby reducing high-frequency jitter in the instantaneous frequency.
[0135] In this embodiment of the application, after frequency correction is completed, the instantaneous frequencies at multiple time points after correction are smoothed, so that the instantaneous frequencies at multiple time points are more continuous and smooth in the time dimension, reducing jitter caused by noise interference or calculation errors, thereby suppressing local abnormal fluctuations and further improving the accuracy of the determined frequency.
[0136] In one possible implementation, the process of smoothing the second instantaneous frequency at multiple time points by the computer device includes: for each of the multiple time points, selecting M neighboring time points centered on that time point, where M is an odd number greater than 1; wherein each neighboring time point and the second instantaneous frequency of each neighboring time point constitute a data point, and the M neighboring time points include that time point; performing polynomial fitting on the M data points to obtain a P-order polynomial, where P is an integer greater than 1; and determining the function value of the P-order polynomial at the time point to obtain the third instantaneous frequency at that time point.
[0137] Taking time point t as an example among multiple time points, select M neighboring time points centered on time point t. Here, M = 2n + 1, and the M neighboring time points include time point t, the n time points preceding time point t, and the n time points following time point t.
[0138] Based on M neighboring time points and their second instantaneous frequencies, M data points are constructed, with the x-axis representing the time point and the y-axis representing the second instantaneous frequency. Then, the least squares method is used to fit a P-order polynomial to the M data points, resulting in a P-order polynomial. The function value of this P-order polynomial at time point t is determined, and this function value is used as the third instantaneous frequency at time point t, thus obtaining the smoothed instantaneous frequency.
[0139] Optionally, the number of neighborhood time points M and the order P of the polynomial can be determined experimentally or otherwise. For example, M equals 9 and P equals 3.
[0140] In this implementation, M neighboring time points are selected centered on the current time point. A polynomial fit is then performed on the data points corresponding to these M neighboring time points, and the instantaneous frequency at each time point is adjusted according to the fitted polynomial. This method can model the frequency change trend within a local range, thereby smoothing the frequency at a given time point. Compared to simple averaging methods, it better preserves local shape features and transient changes, improving the accuracy of smoothing frequencies across multiple time points.
[0141] It should be noted that the embodiments of this application are described by taking the execution of step 307 after step 306 as an example. In another embodiment, step 307 may not be executed, that is, the second instantaneous frequency may not be smoothed.
[0142] The method provided in this application addresses the issue that the instantaneous frequencies of the vibration signal at each time point in the frequency sequence belong to multiple discrete frequencies in the time-frequency amplitude matrix, resulting in low accuracy. Therefore, this application, based on the frequency sequence, for each time point, utilizes the difference between the target amplitude at that time point, the first adjacent amplitude at the previous frequency, and the second adjacent amplitude at the next frequency to reflect the amplitude variation relationship between adjacent frequencies. This variation relationship characterizes the continuous amplitude variation of the frequency, thereby determining the offset parameter of the instantaneous frequency at that time point. The offset parameter is then used to correct the instantaneous frequency at that time point, resulting in a more accurate instantaneous frequency. This effectively overcomes the limitation of frequency resolution in the time-frequency amplitude matrix on the accuracy of the instantaneous frequency, improving the accuracy of the extracted frequency.
[0143] In some embodiments, based on the above embodiments, after performing step 306, a frequency curve or a rotational speed curve may also be generated.
[0144] (1) Based on the second instantaneous frequency at multiple time points, generate the frequency curve of the vibration signal. The frequency curve is used to reflect the change of the instantaneous frequency of the vibration signal over time.
[0145] In this context, the horizontal axis of the frequency curve of the vibration signal represents the time point, and the vertical axis represents the second instantaneous frequency.
[0146] After obtaining the second instantaneous frequency at multiple time points, the computer device maps each time point to its second instantaneous frequency, forming multiple discrete data points. The horizontal axis of each data point represents the time point, and the vertical axis represents the second instantaneous frequency. Connecting the data points in chronological order yields a frequency curve. Alternatively, curve fitting can be performed on the multiple discrete data points to obtain a smoother, continuous frequency curve across time points, thus visually reflecting the change of the instantaneous frequency of the vibration signal over time.
[0147] (2) Based on the second instantaneous frequency at multiple time points, the rotational speed curve of the vibration signal is generated. The rotational speed curve is used to reflect the change of rotational speed of the vibration signal over time.
[0148] In this context, the horizontal axis of the vibration signal's rotational speed curve represents the time point, and the vertical axis represents the rotational speed corresponding to the second instantaneous frequency.
[0149] After obtaining the second instantaneous frequency at multiple time points, the computer equipment converts the second instantaneous frequency at each time point into rotational speed, and establishes a one-to-one correspondence between each time point and its rotational speed, forming multiple discrete data points. The horizontal axis of each data point represents the time point, and the vertical axis represents the rotational speed. Connecting the data points in chronological order yields the rotational speed curve. Alternatively, curve fitting can be performed on multiple discrete data points to obtain a smoother, continuous rotational speed curve at different time points, thus intuitively reflecting the change of rotational speed of rotating machinery over time.
[0150] It should be noted that there is a direct correspondence between the speed curve and the frequency curve mentioned above. They are different representations of the same physical process. The speed curve can be regarded as the result of scaling the frequency curve.
[0151] In some embodiments, based on the above embodiments, after performing step 307, a frequency curve or a rotational speed curve may also be generated.
[0152] (1) Based on the third instantaneous frequency at multiple time points, generate the frequency curve of the vibration signal. The frequency curve is used to reflect the change of the instantaneous frequency of the vibration signal over time.
[0153] The process of generating a frequency curve based on the third instantaneous frequency is the same as the process of generating a frequency curve based on the second instantaneous frequency, and will not be repeated here.
[0154] (2) Based on the third instantaneous frequency at multiple time points, the rotational speed curve of the vibration signal is generated. The rotational speed curve is used to reflect the change of rotational speed of the vibration signal over time.
[0155] The process of generating the speed curve based on the third instantaneous frequency is the same as the process of generating the speed curve based on the second instantaneous frequency, and will not be repeated here.
[0156] In this embodiment, frequency curves or rotational speed curves are generated based on instantaneous frequencies corrected at multiple time points. These curves can intuitively reflect the dynamic characteristics of rotating machinery during operation, providing an important basis for condition monitoring and fault diagnosis of rotating machinery. Compared to curves obtained based on the original discrete instantaneous frequencies, the frequency curves or rotational speed curves generated by this method are smoother and more accurate, accurately reflecting the changing trends of rotating machinery and improving the reliability of condition monitoring and fault diagnosis of rotating machinery.
[0157] Figure 4 This is a flowchart illustrating a method for determining a time-frequency amplitude matrix according to an exemplary embodiment. See also: Figure 4 This method is performed by a computer device and includes the following steps: 401. Computer equipment determines the vibration signal of rotating machinery and at least two anchor points of the vibration signal, each anchor point representing a time point and a frequency.
[0158] The computer equipment can be vibration sensors, mobile phones, tablets, multimedia playback devices, PCs, wearable devices, VR devices, AR devices, MR devices, or independent physical servers, server clusters composed of multiple physical servers, distributed file systems, or cloud servers. Rotating machinery can be mechanical equipment with rotating parts, such as helicopter spindles, aircraft engines, electric vehicle motors, steam turbines, and compressors. Rotating machinery relies on rotational motion to operate, generating vibration signals during operation. These vibration signals are commonly used for condition monitoring and fault diagnosis of rotating machinery. The vibration signal is a time-frequency signal, with time on the x-axis and vibration amplitude on the y-axis. The vibration signal can be collected by vibration sensors installed on the rotating machinery.
[0159] In this embodiment, to determine the time-frequency amplitude matrix of the vibration signal, the computer device first determines the vibration signal and at least two anchor points, which can also be called prior points. Each anchor point includes a time point and a frequency. Additionally, the computer device can acquire other relevant parameters of the vibration signal, such as the sampling frequency.
[0160] Optionally, the user manually inputs at least two sets of data on a computer device, and the computer device determines at least two anchor points based on these two sets of data. Each set of data includes a time point and a frequency, where the frequency refers to the target frequency to be reached at that time point. Each set of data can then serve as an anchor point. Alternatively, each set of data includes a time point and a rotational speed. By converting the rotational speed to a frequency, at least two anchor points corresponding to the at least two sets of data can be determined.
[0161] In this embodiment, the anchor point is used as a priori input to infer a more suitable target window length and time-frequency resolution, so as to generate a clearer time-frequency map.
[0162] In some embodiments, the computer device may filter out abnormal anchor points that are outside the time point range from at least two anchor points in order to avoid invalid anchor points affecting the process of determining the target window length.
[0163] 402. Computer equipment determines the average rate of change of frequency between at least two anchor points.
[0164] At least two anchor points not only provide location information, but their rate of frequency change also directly reflects the rate of rotational speed change of the vibration signal. Therefore, the computer equipment determines the average rate of frequency change between at least two anchor points. The average rate of frequency change describes how quickly the frequency changes over time.
[0165] Taking two anchor points as an example, the ratio between the frequency difference and the time difference between these two anchor points is the rate of frequency change between them.
[0166] When the computer equipment has determined more than two anchor points, the ratio between the frequency difference and the time difference between each pair of adjacent anchor points is determined as the frequency change rate between the two adjacent anchor points, thus obtaining multiple frequency change rates. Then, the average value of the multiple frequency change rates is determined to obtain the average frequency change rate between the at least two anchor points.
[0167] That is, at least two anchor points are: And the number of anchor points is n, where n is an integer greater than 2. The average frequency change rate between at least two anchor points is determined using the following formula (13): ;Formula (13) in, This represents the average rate of change of frequency. This represents the frequency of the i-th anchor point. This represents the frequency of the (i+1)th anchor point. This represents the time point of the i-th anchor point. This represents the time point of the (i+1)th anchor point. This represents the average value, where i is an integer greater than 0 and less than n.
[0168] 403. The computer equipment determines the target window length based on the average frequency change rate, and the target window length is negatively correlated with the absolute value of the average frequency change rate.
[0169] The window length of an STFT represents the number of signal sampling points required to perform one STFT operation, and it determines both the frequency resolution and the time resolution. A longer window length results in higher frequency resolution and lower time resolution, making it more suitable for stationary signals. Conversely, a shorter window length results in lower frequency resolution and higher time resolution, making it more suitable for transient, non-stationary signals.
[0170] However, using a fixed window length, such as 1 second, cannot simultaneously handle the complex conditions of "rapid acceleration" and "steady-state operation." For example, if the window length is too long, when the signal frequency changes rapidly, the energy in the time-frequency graph will be stretched, resulting in "energy smearing." Or, due to frequency discreteness, the true frequency may not be located in the frequency grid points but may be assigned to adjacent grid points, causing a "pick-up fence effect" in the time-frequency graph. Moreover, since the path search process after determining the time-frequency amplitude matrix is highly dependent on the energy concentration of the time-frequency graph, if the window length is inappropriate and the time-frequency graph exhibits "energy smearing" or "pick-up fence effect," the cost function of the subsequent path search algorithm will become invalid, resulting in "lockout" or "jump."
[0171] Therefore, in this embodiment of the application, the optimal target window length is adaptively determined based on the average frequency change rate of at least two anchor points of the vibration signal, rather than being limited to using a fixed window length, and without blindly trying and failing.
[0172] Among them, the target window length is negatively correlated with the absolute value of the average frequency change rate; that is, the absolute value of the average frequency change rate... The larger the value, the longer the target window will be. The shorter the length, the more automatically it can prevent "energy smearing" from appearing on the time-frequency graph, and the absolute value of the average frequency change rate... The smaller the value, the longer the target window is. The longer the length, the higher the frequency resolution will be automatically.
[0173] 404. The computer equipment uses the target window length to perform a short-time Fourier transform on the vibration signal to obtain the time-frequency amplitude matrix of the vibration signal.
[0174] The time-frequency amplitude matrix consists of multiple rows and columns. Each column corresponds to a time point, and each row corresponds to a frequency. Each cell in the time-frequency amplitude matrix represents the time-frequency distribution amplitude of the vibration signal at the corresponding frequency at the corresponding time point. It should be noted that different time points correspond to the same multiple frequencies, and each frequency corresponds to an amplitude at each time point.
[0175] This application provides a method for adaptively determining the window length based on prior guidance. It uses at least two anchor points of the vibration signal as prior points and determines a target window length negatively correlated with the absolute value of the average frequency change rate based on the average frequency change rate between these two anchor points. This approach balances complex operating conditions where "rapid acceleration" and "steady-state operation" coexist, allowing the time-frequency amplitude matrix to automatically present a more suitable time-frequency resolution under different operating conditions. Specifically, it ensures that when the absolute value of the average frequency change rate is large, the target window length is shorter, automatically preventing "energy smearing" in the time-frequency graph; conversely, when the absolute value of the average frequency change rate is small, the target window length is longer, automatically improving frequency resolution. Furthermore, this application is no longer limited to using a fixed window length for STFT of rotating machinery vibration signals, improving flexibility and eliminating the need for multiple trials of different window lengths, avoiding blind trial and error, and reducing unnecessary processing load.
[0176] Figure 5 This is a flowchart illustrating another method for determining the time-frequency amplitude matrix according to an exemplary embodiment, see [link to flowchart]. Figure 5 This method, executed by a computer device, provides a more detailed explanation of the process for determining the time-frequency amplitude matrix. The method includes the following steps: 501. Computer equipment determines the vibration signal of rotating machinery and at least two anchor points of the vibration signal, each anchor point representing a time point and a frequency.
[0177] 502. Computer equipment determines the average rate of change of frequency between at least two anchor points.
[0178] Steps 501-502 are the same as steps 401-402, and will not be repeated here.
[0179] 503. The computer equipment determines the target window length based on the average frequency change rate, and the target window length is negatively correlated with the square root of the absolute value of the average frequency change rate.
[0180] In some embodiments, using non-stationary signal processing theory, assuming the window function is a Gaussian window (i.e., when using a Gaussian window for STFT), the theoretically optimal window length is determined. The computer device then determines the target window length based on the average frequency change rate. The target window length is negatively correlated with the square root of the absolute value of the average frequency change rate, ensuring that the absolute value of the average frequency change rate is... The larger the value, the longer the target window will be. The shorter the length, the more automatically it can prevent the "energy smearing" phenomenon from appearing on the time-frequency graph, and the absolute value of the average frequency change rate... The smaller the value, the longer the target window is. The longer the window, the better the frequency resolution. Furthermore, considering that a larger frequency change rate necessitates a shorter window length, it cannot be simply shortened linearly according to a reciprocal relationship. Instead, a more "gentle" shortening method is used. Therefore, the target window length is set to be negatively correlated with the square root of the absolute value of the average frequency change rate, rather than negatively correlated with the absolute value of the average frequency change rate itself. This allows for the suppression of "energy smearing" without excessively sacrificing frequency resolution, resulting in a more stable vibration signal and less sensitivity to noise.
[0181] In some embodiments, the target window length can be expressed in the form of "number of sampling points" or "time length," with different units. The time length is equal to the quotient of the number of sampling points and the sampling frequency.
[0182] In some embodiments, the process of determining the target window length may include any of the following methods: 1. Determine the ratio between the first preset coefficient and the absolute value of the average frequency change rate, and determine the square root of this ratio as the target window length.
[0183] That is, the target window length is expressed in the form of "time length" and is determined by the following formula (14): ;Formula (14) in, The target window length is expressed in the form of "time duration". This represents the first preset coefficient. This is a constant related to the window function, and its value can be 1 or 2, etc. This represents the average rate of change of frequency.
[0184] 2. Determine the ratio between the first preset coefficient and the absolute value of the average frequency change rate, and determine the target window length by multiplying the square root of this ratio by the sampling frequency of the vibration signal.
[0185] That is, the target window length is expressed in the form of "number of sampling points", and the target window length is determined by the following formula (15): ;Formula (15) in, The target window length is expressed in the form of "number of sampling points". Indicates the sampling frequency of the vibration signal. This represents the first preset coefficient. This is a constant related to the window function, and its value can be 1 or 2, etc. This represents the average rate of change of frequency.
[0186] 504. The computer equipment determines the target overlap rate that matches the target window length. The target overlap rate is negatively correlated with the target window length.
[0187] When performing STFT on a vibration signal, it is necessary to determine not only the window length but also the overlap rate. The overlap rate represents the ratio between the number of sampling points reused between two adjacent windows and the window length. The overlap rate affects the continuity of frequency changes over time. The higher the overlap rate, the smoother and more continuous the time-frequency plot; the lower the overlap rate, the worse the continuity of the time-frequency plot.
[0188] The computer equipment determines the overlap rate that matches the target window length based on the target window length. The target overlap rate is negatively correlated with the target window length. Then, the target window length and the target overlap rate are used to perform STFT on the vibration signal to obtain the time-frequency amplitude matrix of the vibration signal. This allows for the use of a higher target overlap rate for STFT when the target window length is short, thereby increasing the sampling density of the time axis. Conversely, a lower target overlap rate is used for STFT when the target window length is long, in order to reduce redundancy and the amount of processing required for the STFT process.
[0189] For example, the computer device sets a first overlap rate and a second overlap rate, where the first overlap rate is greater than the second overlap rate. The first overlap rate can be 87.5% or other values, and the second overlap rate can be 60% or other values, etc. The first overlap rate is a high overlap rate, suitable for cases with a short target window length, while the second overlap rate is a normal or low overlap rate, suitable for cases with a long target window length. Therefore, determining a target overlap rate that matches the target window length, where the target overlap rate is negatively correlated with the target window length, includes: determining the first overlap rate as the target overlap rate when the target window length is less than a window length threshold; or, determining the second overlap rate as the target overlap rate when the target window length is not less than a window length threshold.
[0190] The example above uses two overlap rates as an example. The computer device can automatically switch between the two overlap rates based on the relationship between the target window length and the window length threshold. In other examples, the computer device can also establish a mapping relationship between the target window length and the overlap rate, and determine the target overlap rate that matches the target window length based on this mapping relationship.
[0191] For example, if the mapping relationship is continuous, the computer device determines the mapping function between the target window length and the overlap rate. Using this mapping function, the target window length is calculated to obtain the target overlap rate matching the target window length. Alternatively, if the mapping relationship is discrete, it includes multiple window length intervals and the corresponding overlap rate for each interval, with more than two window length intervals. After determining the target window length, the computer device identifies the window length interval to which the target window length belongs from the multiple intervals and determines the overlap rate corresponding to that interval as the target overlap rate.
[0192] 505. The computer equipment uses the target window length and target overlap rate to perform a short-time Fourier transform on the vibration signal to obtain the time-frequency amplitude matrix of the vibration signal.
[0193] In this embodiment, based on the determined target window length, the target overlap rate matching the target window length is adaptively determined. When the target window length is short, a higher target overlap rate is automatically adopted to increase the sampling density of the time axis to compensate for the information loss caused by the decrease in frequency resolution. When the target window length is long, a lower target overlap rate is automatically adopted to reduce redundancy and thus reduce the processing load of the STFT process.
[0194] Figure 6 This is a flowchart illustrating another method for determining the time-frequency amplitude matrix according to an exemplary embodiment, see [link to flowchart]. Figure 6 This method, executed by a computer device, describes the process of determining a time-frequency amplitude matrix when the anchor point is undetermined. The method includes the following steps: 601. In the absence of a known anchor point for the vibration signal of rotating machinery, the computer equipment determines the vibration signal and its total duration, maximum duration, and minimum duration.
[0195] The above Figure 4 and Figure 5 The illustrated embodiment assumes that the computer device has identified at least two anchor points for the vibration signal. In another scenario, the computer device does not have anchor points for the vibration signal. In this case, the computer device determines the time-frequency amplitude matrix of the vibration signal using a fallback strategy.
[0196] The computer equipment acquires the total, maximum, and minimum durations of vibration signals. The total duration is used as a proxy variable for "operating condition dynamics," and a heuristic mapping function automatically adapts to the target window length, ensuring robustness in blind testing modes without defined anchor points. The maximum duration is the upper limit of the window length; using the maximum duration as a constraint prevents excessively long target windows, which could lead to severe energy smearing in the transient phase and easy loss of lock-up during rapid speed changes. The minimum duration is the lower limit of the window length; using the minimum duration as a constraint prevents excessively short target windows, which could result in poor frequency resolution, overly coarse spectrograms, noise sensitivity, or computational instability.
[0197] 602. The computer equipment determines the quotient between the total duration and the second preset coefficient to obtain the recommended duration, where the second preset coefficient is greater than 1.
[0198] The second preset coefficient can be an empirical scaling factor, which maps the total duration of the vibration signal to a reference order of magnitude of a recommended duration. The second preset coefficient can also represent the number of time-scale units into which the entire vibration signal is to be divided.
[0199] 603. The computer device selects a target window length based on the recommended duration, maximum duration, and minimum duration, so that the target window length is not greater than the maximum duration and not less than the minimum duration.
[0200] In some embodiments, if the recommendation duration is no greater than the maximum duration and no less than the minimum duration, the recommendation duration is determined as the target window length. Alternatively, if the recommendation duration is greater than the maximum duration, the recommendation duration has exceeded the upper limit of the window length, and the maximum duration is determined as the target window length. Alternatively, if the recommendation duration is less than the minimum duration, the recommendation duration has fallen below the lower limit of the window length, and the minimum duration is determined as the target window length.
[0201] In some embodiments, the target window length can be expressed in the form of "number of sampling points" or "time length," with different units. The time length is equal to the quotient of the number of sampling points and the sampling frequency.
[0202] In some embodiments, the target window length is expressed in the form of "time length". The computer device determines the maximum value between the recommended duration and the minimum duration as the first duration, and the minimum value between the maximum duration and the first duration as the target window length. That is, the target window length is determined using the following formula (16): ;Formula (16) in, Indicates the length of the target window. Indicates the total duration of the vibration signal. Indicates the maximum duration. Indicates the minimum duration. This represents the second preset coefficient. Indicates the maximum value. This represents the minimum value. Indicates the first duration.
[0203] In other embodiments, the target window length is expressed in the form of "number of sampling points". The computer device determines the first duration as the maximum value between the recommended duration and the minimum duration, and determines the target window length as the product of the minimum value between the maximum duration and the first duration and the sampling frequency of the vibration signal. That is, the target window length is determined using the following formula (17): ;Formula (17) in, Indicates the length of the target window. Indicates the sampling frequency of the vibration signal. Indicates the total duration of the vibration signal. Indicates the maximum duration. Indicates the minimum duration. This represents the second preset coefficient. Indicates the maximum value. This represents the minimum value. Indicates the first duration.
[0204] In this embodiment, vibration signals with shorter total durations are considered to imply high dynamics, so a smaller target window length is used; while vibration signals with longer total durations are considered to imply steady state, so a longer target window length is used.
[0205] 604. The computer equipment uses the target window length to perform a short-time Fourier transform on the vibration signal to obtain the time-frequency amplitude matrix of the vibration signal.
[0206] Step 604 is similar to steps 404 and 504-505, and will not be repeated here.
[0207] This application provides a scheme for obtaining the target window length based on the total duration of the vibration signal without anchor points. A smaller target window length is used for vibration signals with shorter total durations, and a longer target window length is used for vibration signals with longer total durations. This achieves robust mapping based on the global dynamic characteristics of the vibration signal, automatically adapting to the target window length and ensuring robustness in blind testing mode. Furthermore, constraining the target window length with maximum and minimum durations prevents excessively long target windows from causing severe energy smearing in the transient segment and easy loss of lock-up during rapid speed changes. It also prevents excessively short target windows from causing problems such as poor frequency resolution, overly coarse spectrograms, noise sensitivity, or computational instability.
[0208] It should be noted that this application provides two solutions: whether at least two anchor points of the vibration signal are determined or the anchor points of the vibration signal are not determined, a suitable target window length can be determined, and then STFT is performed on the vibration signal based on the target window length. Figure 4 and Figure 5 The proposed scheme can be called a "high-precision scheme". Considering that the target window length can be expressed in the form of "number of sampling points" or "time length", the computer equipment can determine the same target window length in both schemes to ensure that the processing flow after determining the target window length is universal.
[0209] For example, if computer equipment uniformly uses the form of "number of sampling points" to represent the target window length, then before performing STFT, it is usually necessary to multiply the time length by the sampling frequency, convert it into the number of sampling points, and configure the STFT parameters according to the number of sampling points.
[0210] Figure 7 This is a flowchart of another time-frequency amplitude matrix determination method provided according to an embodiment of this application. See also... Figure 7 In this embodiment, the method for determining the time-frequency amplitude matrix is illustrated using a computer device as an example. The method includes the following steps: 701. The computer equipment determines the maximum rate of change of the target frequency in the vibration signal of the rotating machinery based on the maximum rate of change of the rotating speed. The maximum rate of change of the rotating speed indicates the physical limit of the rotational speed of the rotating machinery, and the target frequency is the vibration frequency in the vibration signal that is related to the rotational speed.
[0211] In this embodiment, the computer device acquires the vibration signal of the rotating machinery and the inherent maximum rate of change of rotational speed of the machinery. The maximum rate of change of rotational speed refers to the maximum acceleration (or deceleration) that the rotating machinery can physically achieve, usually expressed in RPM / s. It is a physical limit determined by the dynamic characteristics of the machinery itself (such as maximum torque, moment of inertia, etc.). The target frequency refers to the frequency component in the vibration signal that has a fixed proportional relationship with the rotational speed, such as the fundamental frequency (1st order) of the rotating shaft or other harmonic orders. Based on the proportional relationship between the rotational speed and the target frequency, and the maximum rate of change of rotational speed, the computer device calculates the maximum rate of change of the target frequency in the vibration signal. This maximum rate of change reflects the maximum possible change in the target frequency per unit time under physical limits.
[0212] In some embodiments, the computer device may calculate the maximum rate of change of the target frequency using the following formula (18).
[0213] ;Formula (18) in, The maximum rate of change of the target frequency; This represents the maximum rate of change of rotational speed of the rotating machinery. The order of the target frequency. The order represents the ratio between the frequency of the vibration or noise and the rotational frequency of the reference axis (usually the spindle).
[0214] For example, if the maximum speed change rate of a motor is 3000 RPM / s, and it is tracking the fundamental frequency (order 1), then the maximum speed change rate of the target frequency is 50 Hz / s. This value provides an objective physical basis for subsequent window length selection and transfer cost setting, avoiding the blindness of traditional methods that rely on empirically preset parameters.
[0215] 702. The computer equipment determines the length of the first window based on the maximum rate of change of the target frequency, with the constraint that the frequency change of the signal within a single time window is less than the frequency resolution of the short-time Fourier transform.
[0216] In this embodiment, the computer device needs to determine the first window length used for time-frequency analysis. The determination of the first window length is based on a physical constraint: ensuring that within any single time window, the change in target frequency due to rotational speed variation is less than the smallest frequency interval that the short-time Fourier transform itself can resolve. If the window length is too long, the frequency change within the window will exceed the frequency resolution, leading to spectral energy smearing and blurred peaks. Accordingly, the computer device calculates the maximum permissible window length that satisfies the requirement of "frequency change within the window being less than the frequency resolution" based on the maximum rate of change of the target frequency obtained in step 701, combined with the above constraint, and then selects a window length less than or equal to this maximum permissible window length as the first window length. This process ensures that the spectrum within each time window maintains a clear single-peak shape.
[0217] In this embodiment of the application, the computer device measures the frequency change of the signal within a single time window. Frequency resolution less than that of short-time Fourier transform As a constraint, the maximum rate of change based on the target frequency. Frequency resolution of short-time Fourier transform and permissible smearing coefficient Determine the maximum allowable window length that satisfies the constraints. Maximum permissible window length Equal to the allowable smearing coefficient With the maximum rate of change The square root of the ratio. Then, the computer device determines the first window length as any value that does not exceed (is less than or equal to) the maximum permissible window length.
[0218] Wherein, the frequency change of the signal within a single time window is Frequency resolution of short-time Fourier transform With window length The relationship between them is However, considering the need for sufficiently clear spectral peaks in practical engineering, the frequency variation within the window is typically required to be much smaller than the frequency resolution. Therefore, an allowable smearing factor is introduced. , is used to indicate the permissible frequency of application, and its value ranges from greater than 0 to less than 1. The smaller the value, the more strictly the smearing is suppressed, and the shorter the window length needs to be. The specific value can be preset according to the requirements for spectral peak clarity in actual applications. For example, in scenarios requiring high-precision tracking, a value of [value] can be set. The value is 0.1 or 0.2, and this application does not limit this to the embodiments.
[0219] Accordingly, to ensure that the signal within the window is approximately stable, it must meet the following requirements. , can be rewritten as The length of the time window can be obtained by organizing the data. That is, the maximum allowable window length that satisfies the constraints. (Permissible application coefficient) With the maximum rate of change (The square root of the ratio).
[0220] The solution provided in this application uses the constraint that the frequency change of the signal within a single time window is less than the frequency resolution. Based on the maximum rate of change of the target frequency, the frequency resolution, and the allowable smearing coefficient, the maximum allowable window length that satisfies this constraint is determined, and any value not exceeding this maximum allowable window length is used as the first window length. This determination method has clear physical meaning and mathematical basis. The maximum allowable window length is equal to the square root of the ratio of the allowable smearing coefficient to the maximum rate of change. This formula quantitatively gives the upper limit of the window length to ensure that the spectrum within the window does not undergo severe smearing under a given maximum rate of change of frequency. By selecting a window length less than this upper limit, it is ensured that the signal within each time window is approximately stable, and the spectral energy is concentrated rather than dispersed. This provides a clear, tail-free time-frequency feature map for subsequent path search, fundamentally solving the energy smearing problem caused by improper window length selection under high dynamic conditions and improving the reliability of speed extraction.
[0221] For example, when At that time, the maximum allowable window length is approximately 0.141 seconds. If the sampling rate is 12000 Hz, a window length of 512 points can be selected (corresponding to...). This value is much less than 0.141 seconds, fully satisfying the constraints. This determination method fundamentally solves the energy smearing problem caused by improper window length selection under high dynamic conditions.
[0222] 703. The computer device performs a short-time Fourier transform on the vibration signal based on a time window of the first window length and a first step length to obtain a first time-frequency amplitude matrix. The first step length is smaller than the first window length. The first time-frequency amplitude matrix indicates the distribution of the vibration signal amplitude with time and frequency.
[0223] In this embodiment, after determining the first window length, the computer device also needs to set a first step length. This step length must be smaller than the first window length, meaning that adjacent time windows overlap, and the overlap rate is high. Using a step length smaller than the window length is to improve the temporal density of the time-frequency analysis, making the generated time frames sufficiently dense to capture details during rapid changes in rotational speed. Then, the computer device performs frame processing on the vibration signal of the rotating machinery according to the first window length and the first step length, performs a Fourier transform on each frame signal segment (or sub-signal), and takes the amplitude of the transform result. The computer device then arranges the amplitudes of each frame in chronological order, thus forming the first time-frequency amplitude matrix. This first time-frequency amplitude matrix includes multiple units (points), each unit corresponding to a time point and a frequency, and the value of each unit is the amplitude of the corresponding frequency at the corresponding time point. That is, the first time-frequency amplitude matrix uses time and frequency as two-dimensional coordinates, and the value of each unit reflects the energy strength of the frequency component at that moment, providing a data foundation for subsequent path searching.
[0224] In some embodiments, the ratio of the first step length to the first window length is less than a preset value. This ensures that the overlap rate is higher than a certain level. For example, if the preset overlap rate is 87.5%, then the first step length should be 1 / 8 of the first window length. This high overlap rate setting gives the time-frequency matrix a high temporal density, enabling it to meticulously depict every minute fluctuation during rapid changes in rotational speed.
[0225] The solution provided in this application frames the vibration signal based on a first window length and a first step length. After windowing each frame, a Fourier transform is performed, and the spectra of each frame are arranged in chronological order. This standardized processing flow ensures the integrity and reproducibility of the time-frequency analysis. The setting that the first step length is less than the first window length ensures overlap between adjacent time windows, resulting in a high temporal density in the time-frequency amplitude matrix, capable of meticulously depicting every minute fluctuation during rapid changes in rotational speed. Frame-based processing ensures that the signal is analyzed by stabilizing each segment, windowing effectively suppresses spectral leakage, and arranging the spectrum in chronological order visually presents the distribution of signal energy with time and frequency. Through this systematic processing, a time-frequency amplitude matrix with both clear spectral peaks and high temporal resolution is generated, laying a solid data foundation for subsequent accurate path searching.
[0226] Specifically, vibration signal It is a length of For a discrete digital signal with a sampling rate of 12kHz and a duration of 1 second, then Point. The length of the first window is... Points, for example, 512 points. The first step is of length [missing information]. Points, for example, 64 points, correspond to That is, the first step length is 1 / 8 of the first window length, at which point the overlap rate is 87.5%. Then, the computer equipment, based on the first window length and the first step length, transmits the original vibration signal... The signal is divided into several overlapping segments (which can be called "frames"), for example, the first frame is taken as... arrive Since the step size is 64 points, the second frame takes... arrive ; Take the 3rd frame arrive This process continues until the vibration signal ends. Thus, we obtain... Frame signal segment, Then, for each frame of signal, the computer multiplies it by a smoothing window function (such as a Hanning window) to reduce spectral leakage (i.e., reduce spurious frequency components caused by signal truncation). Then, for each windowed frame, the computer performs a Fast Fourier Transform (FFT) and calculates its amplitude. For example, performing an FFT on the first frame yields a complex result. Then perform the modulo operation: , to obtain a length of The vector of (one-sided spectrum) represents the energy at different frequencies at that moment. This process is repeated to obtain the spectral amplitude vector for each frame of the signal. Then, the computer device stacks the spectral amplitude vectors obtained from each frame in chronological order to form the first time-frequency amplitude matrix. First time-frequency amplitude matrix The number of rows represents the number of time frames; the first time-frequency amplitude matrix The number of columns is the number of frequency points, usually 1. First time-frequency amplitude matrix The unit in Indicates the first At frame time, the frequency is The vibration amplitude at that location.
[0227] In some embodiments, before performing the short-time Fourier transform, in order to ensure that the first and last frames of the signal also have complete window length data, the computer device can also perform continuation processing on the boundaries of the vibration signal. This continuation processing may include at least one of even-symmetric continuation, mirror continuation, and periodic continuation.
[0228] Even-symmetric continuation (boundary='even' / Symmetric Padding) refers to mirror reflection with the signal endpoints as the axis of symmetry. For example, for a vibration signal [a, b, c, d, e], in the leftward continuation: with index 0 as the axis, the first point to the left is the mirror image of index 1, i.e., b; the next point to the left is the mirror image of index 2, i.e., c, and so on. In the rightward continuation: with index 4 as the axis, the first point to the right is the mirror image of index 3, i.e., d; the next point to the right is the mirror image of index 2, i.e., c. This method ensures that the first derivative is continuous at the endpoints (smooth waveform transition) without abrupt changes, thus introducing minimal high-frequency noise.
[0229] Mirror padding, similar to even symmetry, is also a reflection, but it typically refers to including the endpoint itself as the axis. For example, in the vibration signal [a, b, c, d, e], during leftward padding: with index 0 as the axis, the first point on the left can be a mirror image of index 0 itself (a) or a mirror image of index 1 (b), with slight differences in implementation across different libraries. The difference between even symmetric padding and mirror padding is that even symmetric padding usually does not copy the endpoint itself, while mirror padding sometimes copies the endpoint.
[0230] Periodic padding / wrap-around refers to assuming the signal is periodic and connecting the end of the signal to the beginning. For example, for a vibration signal [a, b, c, d, e], in the leftward extension: take the last data point of the signal, i.e., the first point on the left is e, the second point is d, and so on. In the rightward extension: take the first data point of the signal, i.e., the first point on the right is a, the second point is b, and so on.
[0231] The computer equipment, based on a set mode (e.g., boundary='even'), responds to vibration signals. The front-end and back-end were added respectively. The length of the data is used to obtain the expanded signal. Then, in the expanded signal The signal is divided into frames. This way, even frames covering the very beginning and end of the original signal can be fully captured in the extended signal. The data is processed by taking points, and then windowing and fast Fourier transform are performed on each extracted frame (which may contain virtual data with extensions) to finally generate a time-frequency amplitude matrix.
[0232] The solution provided in this application extends the boundary of the vibration signal before performing the short-time Fourier transform, specifically including at least one of even-symmetric extension, mirror extension, or periodic extension. This preprocessing step solves the problem of spectral distortion caused by truncation at the beginning and end of the signal. Traditional zero-padding introduces abrupt changes at the signal boundary, resulting in high-frequency artifacts in the spectrum, affecting the frequency positioning accuracy at the start moment, i.e., the "start-off" phenomenon. Even-symmetric extension maintains the continuity of the signal at the endpoints, while mirror extension and periodic extension can effectively smooth the boundary transition, allowing the signal segment at the boundary to obtain complete data support, thereby obtaining accurate spectral analysis results. Through this boundary processing, reliable time-frequency information is ensured from the first frame to the last frame of signal acquisition, making the rotational speed extraction stable throughout the entire time range without edge blind spots.
[0233] This application provides a method for obtaining a time-frequency amplitude matrix. By introducing the maximum rate of change of rotational speed of the rotating machinery as a physical limit, the maximum rate of change of the target frequency related to rotational speed in the vibration signal is determined, providing an objective physical basis for subsequent parameter settings and avoiding the blindness of relying on empirically preset parameters in traditional methods. Then, with the frequency change of the signal within a single time window being less than the frequency resolution as a constraint, the first window length is determined based on this maximum rate of change, ensuring that the spectrum within each time window can still maintain a clear peak shape when the rotational speed changes rapidly, effectively suppressing the energy smearing phenomenon caused by traditional long time windows. On this basis, a short-time Fourier transform is performed using a first step length smaller than the first window length, which can generate a high-time-density first time-frequency amplitude matrix, so that the frequency transition details during rapid rotational speed changes can be completely preserved.
[0234] Through steps 701 to 703 described above, this embodiment of the application achieves the acquisition of the time-frequency amplitude matrix under highly dynamic operating conditions. However, in practical applications, the characteristics of the vibration signal (such as signal-to-noise ratio and spectral contrast) and the operating state of the machinery (such as the current rate of change of rotational speed) may change dynamically with the operating conditions, making it difficult for fixed parameter settings to maintain optimal performance in all scenarios. In some embodiments, the computer device can adaptively adjust the algorithm parameters as described above. Specifically, the computer device acquires at least one of the local spectral peak contrast of the first time-frequency amplitude matrix and the current rate of change of rotational speed of the rotating machinery; then, based on at least one of the local spectral peak contrast and the current rate of change of rotational speed, it adjusts at least one of the first window length, the first step length, and the smoothing weighting coefficient.
[0235] Among them, the local spectral peak contrast indicates the prominence of the spectral peak energy corresponding to the target frequency relative to its surrounding background energy within a local region of the time-frequency amplitude matrix, reflecting the signal quality at the current moment. The current rotational speed change rate can be obtained through the above... Figure 3The frequency sequence determined in the embodiments is obtained through real-time estimation of the first difference, reflecting the current dynamic characteristics of the machinery. Based on this information, the computer device dynamically adjusts at least one of the first window length, the first step length, and the smoothing weight coefficient. The first window length and the first step length are positively correlated with the local spectral peak contrast; that is, when the local spectral peak contrast is high, the window length and step size can be increased to improve frequency resolution and computational efficiency. The smoothing weight coefficient is negatively correlated with the local spectral peak contrast; that is, when the local spectral peak contrast is high, the smoothing weight is decreased to give more confidence to the observed data. The first window length, the first step length, and the smoothing weight coefficient are negatively correlated with the current rate of change of rotational speed; that is, when the rate of change of rotational speed is large, the window length and step size are decreased to improve time resolution and decrease the smoothing weight to allow for larger jumps.
[0236] This adaptive mechanism enables the algorithm to dynamically optimize parameter configuration based on real-time operating conditions: pursuing higher accuracy and efficiency when the signal is clear and changes smoothly, and prioritizing tracking stability when the signal is ambiguous and changes drastically. Through this intelligent parameter adjustment, the algorithm can adapt to different operating stages and conditions, always maintaining optimal performance and further improving the stability and accuracy of speed acquisition.
[0237] Figure 8 This is a schematic diagram of the structure of a frequency correction device provided in an embodiment of this application. See also... Figure 8 The device includes: The acquisition module 801 is used to acquire the time-frequency amplitude matrix and frequency sequence of the vibration signal of the rotating machinery. The time-frequency amplitude matrix includes the amplitude of the vibration signal at multiple frequencies at multiple time points, and the frequency sequence indicates the first instantaneous frequency of the vibration signal at each of the multiple time points, and the first instantaneous frequency belongs to multiple frequencies. The first determining module 802 is used to determine, for each of multiple time points, the target amplitude, the first adjacent amplitude, and the second adjacent amplitude of the vibration signal at the time point based on the time-frequency amplitude matrix and the frequency sequence; wherein, the target amplitude is the amplitude at the first instantaneous frequency at the time point, the first adjacent amplitude is the amplitude at the previous frequency at the first instantaneous frequency at the time point, and the second adjacent amplitude is the amplitude at the next frequency at the first instantaneous frequency at the time point; The second determining module 803 is used to determine the offset parameter based on the difference between the target amplitude, the first adjacent amplitude, and the second adjacent amplitude; The correction module 804 is used to correct the first instantaneous frequency at a time point according to the offset parameter to obtain the second instantaneous frequency at the time point.
[0238] The frequency correction device provided in this application addresses the issue that the instantaneous frequencies of the vibration signal at each time point in the frequency sequence belong to multiple discrete frequencies in the time-frequency amplitude matrix, resulting in low accuracy. Therefore, this application, based on the frequency sequence, for each time point, utilizes the difference between the target amplitude at that time point, the first adjacent amplitude of the previous frequency at that time point, and the second adjacent amplitude of the next frequency at that time point to reflect the amplitude variation relationship between adjacent frequencies. Based on this variation relationship, the continuous amplitude variation characteristics of the frequency are characterized, thereby determining the offset parameter of the instantaneous frequency at that time point. The offset parameter is then used to correct the instantaneous frequency at that time point, resulting in a more accurate instantaneous frequency. This effectively overcomes the limitation of frequency resolution in the time-frequency amplitude matrix on the accuracy of the instantaneous frequency, improving the accuracy of the extracted frequency.
[0239] Optionally, see Figure 9 The time-frequency amplitude matrix comprises multiple units, each representing the amplitude of the vibration signal at a frequency at a given time point; the device also includes a frequency sequence determination module 805, used for: Based on the amplitude and frequency corresponding to multiple units in the time-frequency amplitude matrix, the path with the lowest path cost is searched in the time-frequency amplitude matrix. The path includes one unit corresponding to each time point in multiple time points. The path cost is used to measure the degree of unreasonableness of taking the frequency corresponding to each unit in the path as the instantaneous frequency of each time point. A frequency sequence is constructed based on the time points and frequencies corresponding to multiple units in the path.
[0240] Optionally, see Figure 9 The frequency sequence determination module 805 is used for: Based on the amplitude corresponding to each cell in the time-frequency amplitude matrix, the observation cost of each cell is determined, and the observation cost is negatively correlated with the amplitude corresponding to the cell. Based on the frequency corresponding to each unit in the time-frequency amplitude matrix, the transfer cost from each unit at each time point to each unit at the next time point is determined. The transfer cost is positively correlated with the frequency difference, which refers to the difference between the frequencies corresponding to two units. Based on the observation cost of each unit and the transfer cost between multiple units, the path with the lowest path cost is searched in the time-frequency amplitude matrix. The path cost is positively correlated with the observation cost of the units in the path, and the path cost is also positively correlated with the transfer cost between the units in the path.
[0241] Optionally, see Figure 9 The frequency sequence determination module 805 is used for: For the first unit at any time point and the second unit at the next time point, determine the absolute difference between the frequency corresponding to the first unit and the frequency corresponding to the second unit; If the absolute difference is not greater than a preset threshold, the weighting factor is multiplied by the square of the absolute difference to obtain the transfer cost from the first unit to the second unit. If the absolute difference is greater than a preset threshold, the transfer cost from the first unit to the second unit is determined to be infinite.
[0242] Optionally, see Figure 9 The number of time points is N; the frequency sequence determination module 805 is used for: For each unit at the first time point, the observation cost of the unit is determined as the cumulative cost of the unit. The cumulative cost of the unit is used to measure the irrationality of selecting the unit as a path unit on the path. For each unit at time point k, the target preceding unit is determined among multiple units at time point k-1. The target preceding unit is the unit with the smallest sum of cumulative cost and transfer cost to the unit. The cumulative cost of the unit is obtained by adding the observation cost of the unit, the cumulative cost of the target preceding unit, and the transfer cost from the target preceding unit to the unit. Here, k is an integer greater than 1 and not greater than N. The unit with the lowest cumulative cost among multiple units at the Nth time point is determined as the Nth path unit, the target preceding unit of the kth path unit is determined as the (k-1)th path unit, and so on until the 1st path unit is obtained. The path formed from the 1st path unit to the Nth path unit is determined as the path with the lowest path cost.
[0243] Optionally, see Figure 9 The frequency sequence determination module 805 is used for: Determine the frequency index of the frequency corresponding to multiple units in the path; the frequency index is used to indicate the frequency. The frequency sequence is obtained by sorting the frequency indices corresponding to the time points of multiple units in the path according to their chronological order.
[0244] Optionally, see Figure 9 The frequency sequence includes frequency indices of the vibration signal at multiple time points, with the frequency index at each time point used to indicate the first instantaneous frequency at that time point. The second determining module 803 is used for: The index offset parameter is determined based on the difference between the target amplitude, the first adjacent amplitude, and the second adjacent amplitude. Calibration module 804 is used for: The frequency index at the time point is corrected according to the index offset parameter to obtain the corrected frequency index. The corrected frequency index is converted into the second instantaneous frequency at the time point.
[0245] Optionally, see Figure 9 The second determining module 803 is used for: Subtract the second adjacent amplitude from the first adjacent amplitude to obtain the first difference; The second difference is obtained by subtracting twice the target amplitude from the sum of the first and second adjacent amplitudes. Multiply the scaling factor, the first difference, and the reciprocal of the second difference to obtain the index offset parameter.
[0246] Optionally, see Figure 9 The device also includes a smoothing module 806, used for: The second instantaneous frequencies at multiple time points are smoothed to obtain the third instantaneous frequencies at multiple time points.
[0247] Optionally, see Figure 9 Smoothing module 806 is used for: For each of the multiple time points, select M neighboring time points centered on the time point, where M is an odd number greater than 1; each neighboring time point and its second instantaneous frequency constitute a data point; the M neighboring time points include this time point; Polynomial fitting is performed on the M data points to obtain a P-order polynomial, where P is an integer greater than 1. By determining the function value of the P-order polynomial at time points, the third instantaneous frequency at those time points is obtained.
[0248] Optionally, see Figure 9 The device also includes a curve generation module 807 for performing at least one of the following: Based on the second instantaneous frequency at multiple time points, a frequency curve of the vibration signal is generated. The frequency curve is used to reflect the change of the instantaneous frequency of the vibration signal over time. Based on the second instantaneous frequency at multiple time points, a rotational speed curve of the vibration signal is generated. The rotational speed curve is used to reflect the change of rotational speed of the vibration signal over time.
[0249] It should be noted that the frequency correction device provided in the above embodiments is only an example of the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the computer device can be divided into different functional modules to complete all or part of the functions described above. In addition, the frequency correction device and the frequency correction method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.
[0250] This application also provides a computer device, which includes a processor and a memory. The memory stores at least one computer program, which is loaded and executed by the processor to perform the operations performed in the frequency correction method of the above embodiments.
[0251] Optionally, the computer device is provided as a terminal. Figure 10 A schematic diagram of the structure of a terminal 1000 provided in an exemplary embodiment of this application is shown.
[0252] Terminal 1000 includes a processor 1001 and a memory 1002.
[0253] Processor 1001 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. Processor 1001 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field Programmable Gate Array), and PLA (Programmable Logic Array). Processor 1001 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 1001 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, processor 1001 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.
[0254] The memory 1002 may include one or more computer-readable storage media, which may be non-transitory. The memory 1002 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in the memory 1002 are used to store at least one computer program, which is used by the processor 1001 to implement the frequency correction method provided in the method embodiments of this application.
[0255] In some embodiments, the terminal 1000 may also optionally include: a peripheral device interface 1003 and at least one peripheral device. The processor 1001, memory 1002, and peripheral device interface 1003 can be connected via a bus or signal line. Each peripheral device can be connected to the peripheral device interface 1003 via a bus, signal line, or circuit board. Optionally, the peripheral device includes at least one of: a radio frequency circuit 1004, a display screen 1005, a camera assembly 1006, an audio circuit 1007, and a power supply 1008.
[0256] Peripheral device interface 1003 can be used to connect at least one I / O (Input / Output) related peripheral device to processor 1001 and memory 1002. In some embodiments, processor 1001, memory 1002 and peripheral device interface 1003 are integrated on the same chip or circuit board; in some other embodiments, any one or two of processor 1001, memory 1002 and peripheral device interface 1003 can be implemented on separate chips or circuit boards, which is not limited in this embodiment.
[0257] The radio frequency (RF) circuit 1004 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The RF circuit 1004 communicates with communication networks and other communication devices via electromagnetic signals. The RF circuit 1004 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals back into electrical signals. Optionally, the RF circuit 1004 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, etc. The RF circuit 1004 can communicate with other devices via at least one wireless communication protocol. This wireless communication protocol includes, but is not limited to: metropolitan area networks (MANs), various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks (WLANs), and / or WiFi (Wireless Fidelity) networks. In some embodiments, the RF circuit 1004 may also include circuitry related to NFC (Near Field Communication), which is not limited in this application.
[0258] Display screen 1005 is used to display a UI (User Interface). This UI may include graphics, text, icons, videos, and any combination thereof. When display screen 1005 is a touch display screen, it also has the ability to collect touch signals on or above its surface. These touch signals can be input as control signals to processor 1001 for processing. In this case, display screen 1005 can also be used to provide virtual buttons and / or a virtual keyboard, also known as soft buttons and / or a soft keyboard. In some embodiments, there may be one display screen 1005, disposed on the front panel of terminal 1000; in other embodiments, there may be at least two display screens, disposed on different surfaces of terminal 1000 or in a folded design; in still other embodiments, display screen 1005 may be a flexible display screen, disposed on a curved or folded surface of terminal 1000. Furthermore, display screen 1005 may be configured as a non-rectangular, irregular shape, i.e., a non-rectangular screen. The display screen 1005 can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).
[0259] The camera assembly 1006 is used to acquire images or videos. Optionally, the camera assembly 1006 includes a front-facing camera and a rear-facing camera. The front-facing camera is disposed on the front panel of the terminal 1000, and the rear-facing camera is disposed on the back of the terminal 1000. In some embodiments, there are at least two rear-facing cameras, which are any one of a main camera, a depth-sensing camera, a wide-angle camera, and a telephoto camera, to achieve background blurring by fusion of the main camera and the depth-sensing camera, panoramic shooting by fusion of the main camera and the wide-angle camera, VR (Virtual Reality) shooting, or other fusion shooting functions. In some embodiments, the camera assembly 1006 may also include a flash. The flash may be a single-color temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm light flash and a cool light flash, which can be used for light compensation at different color temperatures.
[0260] The audio circuit 1007 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, converting the sound waves into electrical signals that are input to the processor 1001 for processing, or input to the radio frequency circuit 1004 for voice communication. For stereo sound acquisition or noise reduction purposes, multiple microphones may be used, each positioned at a different location on the terminal 1000. The microphone may also be an array microphone or an omnidirectional microphone. The speaker is used to convert electrical signals from the processor 1001 or the radio frequency circuit 1004 into sound waves. The speaker may be a conventional diaphragm speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can convert electrical signals not only into audible sound waves but also into inaudible sound waves for purposes such as distance measurement. In some embodiments, the audio circuit 1007 may also include a headphone jack.
[0261] The power supply 1008 is used to power the various components in the terminal 1000. The power supply 1008 can be AC power, DC power, a disposable battery, or a rechargeable battery. When the power supply 1008 includes a rechargeable battery, the rechargeable battery can support wired charging or wireless charging. The rechargeable battery can also be used to support fast charging technology.
[0262] Those skilled in the art will understand that Figure 10 The structure shown does not constitute a limitation on terminal 1000 and may include more or fewer components than shown, or combine certain components, or use different component arrangements.
[0263] Optionally, the computer device is provided as a server. Figure 11 This is a schematic diagram of a server structure provided in an embodiment of this application. The server 1100 can vary significantly due to different configurations or performance. It may include one or more Central Processing Units (CPUs) 1101 and one or more memories 1102. The memories 1102 store at least one computer program, which is loaded and executed by the processor 1101 to implement the methods provided in the above-described method embodiments. Of course, the server may also have wired or wireless network interfaces, a keyboard, and input / output interfaces for input and output. The server may also include other components for implementing device functions, which will not be elaborated upon here.
[0264] This application also provides a computer-readable storage medium storing at least one computer program, which is loaded and executed by a processor to implement the operations performed by the frequency correction method of the above embodiments.
[0265] This application also provides a computer program product, including a computer program loaded and executed by a processor to perform the operations performed by the frequency correction method of the above embodiments.
[0266] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.
[0267] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present application should be included within the protection scope of the present application.
Claims
1. A frequency correction method, characterized in that, The method includes: The time-frequency amplitude matrix and frequency sequence of the vibration signal of rotating machinery are obtained. The time-frequency amplitude matrix includes the amplitude of the vibration signal at multiple frequencies at multiple time points, and the frequency sequence indicates the first instantaneous frequency of the vibration signal at each of the multiple time points, wherein the first instantaneous frequency belongs to the multiple frequencies. For each of the plurality of time points, based on the time-frequency amplitude matrix and the frequency sequence, the target amplitude, the first adjacent amplitude, and the second adjacent amplitude of the vibration signal at that time point are determined; wherein, the target amplitude is the amplitude at the first instantaneous frequency at that time point, the first adjacent amplitude is the amplitude at the previous frequency at the first instantaneous frequency at that time point, and the second adjacent amplitude is the amplitude at the next frequency at the first instantaneous frequency at that time point. The offset parameter is determined based on the difference between the target amplitude, the first adjacent amplitude, and the second adjacent amplitude. The first instantaneous frequency at the time point is corrected according to the offset parameter to obtain the second instantaneous frequency at the time point.
2. The method according to claim 1, characterized in that, The time-frequency amplitude matrix includes multiple units, each unit representing the amplitude of the vibration signal at a frequency at a given time point; The process of determining the frequency sequence includes: Based on the amplitude and frequency corresponding to multiple units in the time-frequency amplitude matrix, the path with the lowest path cost is searched in the time-frequency amplitude matrix. The path includes a unit corresponding to each of the multiple time points. The path cost is used to measure the degree of unreasonableness of taking the frequency corresponding to each unit in the path as the instantaneous frequency of each time point. The frequency sequence is constructed based on the time points and frequencies corresponding to multiple units in the path.
3. The method according to claim 2, characterized in that, The step of searching for the path with the lowest path cost in the time-frequency amplitude matrix based on the amplitude and frequency corresponding to multiple units in the matrix includes: Based on the amplitude corresponding to each unit in the time-frequency amplitude matrix, the observation cost of each unit is determined, and the observation cost is negatively correlated with the amplitude corresponding to the unit. Based on the frequency corresponding to each unit in the time-frequency amplitude matrix, the transfer cost of jumping from each unit at each time point to each unit at the next time point is determined. The transfer cost is positively correlated with the frequency difference, which refers to the difference between the frequencies corresponding to two units. Based on the observation cost of each unit and the transfer cost between the multiple units, the path with the lowest path cost is searched in the time-frequency amplitude matrix. The path cost is positively correlated with the observation cost of the units in the path and is also positively correlated with the transfer cost between the units in the path.
4. The method according to claim 3, characterized in that, The step of determining the transition cost from each unit at each time point to each unit at the next time point based on the frequency corresponding to each unit in the time-frequency amplitude matrix includes: For the first unit at any time point and the second unit at the next time point, determine the absolute difference between the frequency corresponding to the first unit and the frequency corresponding to the second unit; If the absolute difference is not greater than a preset threshold, the weighting factor is multiplied by the square of the absolute difference to obtain the transfer cost from the first unit to the second unit. If the absolute difference is greater than the preset threshold, the transfer cost from the first unit to the second unit is determined to be infinite.
5. The method according to claim 3, characterized in that, The number of the plurality of time points is N; the search for the path with the lowest path cost in the time-frequency amplitude matrix based on the observation cost of each unit and the transfer cost between the plurality of units includes: For each unit at the first time point, the observation cost of the unit is determined as the cumulative cost of the unit, and the cumulative cost of the unit is used to measure the degree of unreasonableness of selecting the unit as a path unit on the path; For each unit at time point k, the target preceding unit of the unit is determined among multiple units at time point k-1. The target preceding unit is the unit with the smallest sum of cumulative cost and transfer cost to the unit. The observation cost of the unit, the cumulative cost of the target preceding unit, and the transfer cost from the target preceding unit to the unit are added together to obtain the cumulative cost of the unit. Here, k is an integer greater than 1 and not greater than N. The unit with the lowest cumulative cost among multiple units at the Nth time point is determined as the Nth path unit, the target preceding unit of the kth path unit is determined as the (k-1)th path unit, and so on until the 1st path unit is obtained. The path formed from the 1st path unit to the Nth path unit is determined as the path with the lowest path cost.
6. The method according to claim 2, characterized in that, The construction of the frequency sequence based on the time points and frequencies corresponding to multiple units in the path includes: Determine the frequency index of the frequency corresponding to multiple units in the path, the frequency index being used to indicate the frequency; The frequency sequence is obtained by sorting the frequency indices corresponding to the multiple units in the path according to the chronological order of their corresponding time points.
7. The method according to claim 1, characterized in that, The frequency sequence includes frequency indices of the vibration signal at multiple time points, wherein the frequency indexes at each time point are used to indicate the first instantaneous frequency at that time point; The step of determining the offset parameter based on the difference between the target amplitude, the first adjacent amplitude, and the second adjacent amplitude includes: The index offset parameter is determined based on the difference between the target amplitude, the first adjacent amplitude, and the second adjacent amplitude. The step of correcting the first instantaneous frequency at the time point according to the offset parameter to obtain the second instantaneous frequency at the time point includes: The frequency index at the time point is corrected according to the index offset parameter to obtain the corrected frequency index. The corrected frequency index is converted into the second instantaneous frequency at the time point.
8. The method according to claim 7, characterized in that, The step of determining the index offset parameter based on the difference between the target amplitude, the first adjacent amplitude, and the second adjacent amplitude includes: Subtract the second adjacent amplitude from the first adjacent amplitude to obtain the first difference; The second difference is obtained by subtracting twice the target amplitude from the sum of the first adjacent amplitude and the second adjacent amplitude; The index offset parameter is obtained by multiplying the scaling factor, the first difference, and the reciprocal of the second difference.
9. The method according to any one of claims 1 to 8, characterized in that, After correcting the first instantaneous frequency at the time point according to the offset parameter to obtain the second instantaneous frequency at the time point, the method further includes: The second instantaneous frequencies at the multiple time points are smoothed to obtain the third instantaneous frequencies at the multiple time points.
10. The method according to claim 9, characterized in that, The smoothing process of the second instantaneous frequencies at the plurality of time points to obtain the third instantaneous frequencies at the plurality of time points includes: For each of the plurality of time points, M neighboring time points are selected centered on the time point, where M is an odd number greater than 1; wherein, each neighboring time point and the second instantaneous frequency of each neighboring time point constitute a data point; the M neighboring time points include the time point. Polynomial fitting is performed on the M data points to obtain a P-order polynomial, where P is an integer greater than 1. The function value of the P-order polynomial at the specified time point is determined to obtain the third instantaneous frequency at that time point.
11. The method according to any one of claims 1 to 8, characterized in that, After correcting the first instantaneous frequency at the time point according to the offset parameter to obtain the second instantaneous frequency at the time point, the method further includes at least one of the following: Based on the second instantaneous frequency at the multiple time points, a frequency curve of the vibration signal is generated, which is used to reflect the change of the instantaneous frequency of the vibration signal over time. Based on the second instantaneous frequency at the multiple time points, a rotational speed curve of the vibration signal is generated, which reflects the change of the rotational speed of the vibration signal over time.
12. A frequency correction device, characterized in that, The device includes: The acquisition module is used to acquire the time-frequency amplitude matrix and frequency sequence of the vibration signal of the rotating machinery. The time-frequency amplitude matrix includes the amplitude of the vibration signal at multiple frequencies at multiple time points, and the frequency sequence indicates the first instantaneous frequency of the vibration signal at each of the multiple time points, wherein the first instantaneous frequency belongs to the multiple frequencies. The first determining module is configured to, for each of the plurality of time points, determine, based on the time-frequency amplitude matrix and the frequency sequence, the target amplitude, the first adjacent amplitude, and the second adjacent amplitude of the vibration signal at that time point; wherein, the target amplitude is the amplitude at the first instantaneous frequency at that time point, the first adjacent amplitude is the amplitude at the previous frequency at the first instantaneous frequency at that time point, and the second adjacent amplitude is the amplitude at the next frequency at the first instantaneous frequency at that time point; The second determining module is used to determine the offset parameter based on the difference between the target amplitude, the first adjacent amplitude, and the second adjacent amplitude; The correction module is used to correct the first instantaneous frequency at the time point according to the offset parameter to obtain the second instantaneous frequency at the time point.
13. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing at least one computer program, which is loaded and executed by the processor to perform the operations of the frequency correction method as described in any one of claims 1 to 11.
14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one computer program, which is loaded and executed by a processor to perform the operations of the frequency correction method as described in any one of claims 1 to 11.
15. A computer program product, comprising a computer program, characterized in that, The computer program is loaded and executed by a processor to perform the operations of the frequency correction method as described in any one of claims 1 to 11.