Disclosure of Invention
The invention aims to provide a fan monitoring anti-shake correction method to solve the problem of data shake in the prior art, and the specific technical scheme is as follows:
a fan monitoring anti-shake correction method comprises the following steps:
step S1: acquiring a data stream during fan monitoring, and intercepting the data stream by utilizing a window with a length value of L to obtain intercepted data, wherein the intercepted data comprises current epoch data and historical epoch data;
step S2: correcting the intercepted data and outputting correction data of the current epoch;
step S3: the window length at the time of calculating the next epoch correction data is set, and the setting rule is as follows:
step S3.1: if the window length value L of the current epoch is more than 2, executing the step S3.2, otherwise executing the step S3.3;
step S3.2: obtaining the sensitivity threshold by equation 6), obtaining the first data difference and the second data difference for different epochs by equation 7), and equation 6) and equation 7) are as follows:
thres=N*std(f') 6);
wherein thres represents a sensitivity threshold; n represents a multiple; std represents standard deviation of returned truncated data; f' represents intercepting data; Δf' 1 Representing a first data difference; Δf' 2 Representing a second data difference value; f' (k) represents intercepting data with current epoch k in the data;
if Δf' 1 <thres<Δf' 2 Taking the window length value L=1 of the current epoch and returning to the step S1 to calculate the next epoch, otherwise, entering the step S3.3;
step S3.3:
when L is less than L max When the window length value L of the current epoch is increased by one unit length, the step S1 is returned to calculate the next epoch; l (L) max Representing a set window length maximum;
when L is greater than or equal to L max When the window length value L of the current epoch is unchanged, and the step S1 is returned to calculate the next epoch.
Preferably, the step S2 includes a step S2.1, a step S2.2, and a step S2.3;
s2.1, carrying out mean value processing on intercepted data to obtain a mean value; the average value and the intercepted data are differentiated to obtain residual errors;
s2.2, processing the residual error to obtain a Fourier transform series;
and S2.3, superposing the mean value and the Fourier transform series to obtain a correction sequence, and outputting correction data according to the correction sequence.
In the above technical solution, in step S2.1, the mean value of the intercepted data is obtained by performing mean value processing on the intercepted data according to formula 1), where formula 1) is as follows:
wherein mean represents the mean of the truncated data; l represents the length value of the current epoch window; f' (k) represents data of which the current epoch is k in the truncated data.
In the above technical solution, in the step S2.1, the residual error is obtained by the formula 2), and the formula 2) is as follows:
f 0 =f'-mean 2);
wherein f 0 Representing the residual error; f' represents intercepting data; mean represents the mean of the truncated data.
In the above technical solution, in the step S2.2, the fourier transform progression is obtained by formula 3), and formula 3) is as follows:
where ft (t) represents the Fourier transform series; a, a 0 Representing the cosine component amplitude when n=0; level represents the fourier decomposition level; a, a n Representing the amplitude of each level of cosine component; b n Representing the sinusoidal component amplitude; n represents the number of stages; omega represents an angular frequency; t represents the sine and cosine function time axis.
In the above technical solution, in the step S2.2, the levels, ω, and t are calculated by the formula 4), and the formula 4) is as follows:
wherein ceil represents an integer returned to not less than the target value; l represents the length value of the current epoch window; p is a proportionality coefficient; num represents the number of discrete data points; t represents the period length of the fitted sine and cosine function employed by the fourier transform series.
The above technical scheme is preferable, the proportionality coefficient p epsilon [0.5,1].
In the above technical solution, in step S2.3, a correction sequence is obtained according to formula 5), and the last bit of the correction sequence is taken as the correction data output of the current epoch, and formula 5) is as follows:
ft'(t)=ft(t)+mean 5);
wherein ft' (t) represents the correction sequence; mean represents the mean of the truncated data; ft (t) represents the Fourier transform series.
In the above technical solution, preferably, in step S3.2, the multiple N is 5-8.
Preferably, in the above technical solution, in the step S3.3, L max 15-20.
The technical scheme of the invention has the following beneficial effects:
(1) According to the invention, the window with the length value adjusted in a self-adaptive manner can be used for stabilizing the data to obtain the correction data of all epochs monitored by the fan, and breakpoint identification and data fault handling can be carried out, namely, the window length, the sensitivity threshold self-adaptive function and the data stabilizing preprocessing function are increased, the data are preprocessed, so that the corrected data meet the condition of subsequent processing, and the sensitivity threshold is set along with the real-time data standard deviation.
(2) The invention takes the Fourier series as the kernel, utilizes the Fourier series rapid transformation principle to form a low-pass filtering algorithm, and aims to eliminate high-frequency components in data and reserve low-frequency components so as to resist data jitter, and the theory that the low-frequency components reflect the real position information of the fan cabin; the Fourier series does not have any self-adaptive capacity, and does not have the countermeasure of breakpoint identification and data fault, so that only the data meeting the Dirichlet (Dirichlet) condition can be processed.
(3) The N is 5-8, so that the rough error can be effectively removed (if N is too large, the threshold effect is lost); l of the invention max 15-20, the invention is realized by reasonably selecting L max Can reject invalid data if L max Too large can lead to the data being more fit with the original data, so that the correction effect is lost, and too small can lead to the loss of useful information, so that the correction data presents a stable straight line.
In addition to the objects, features and advantages described above, the present invention has other objects, features and advantages. The present invention will be described in further detail with reference to the drawings.
Detailed Description
Embodiments of the invention are described in detail below with reference to the attached drawings, but the invention can be implemented in a number of different ways, which are defined and covered by the claims.
Examples:
a fan monitoring anti-shake correction method comprises the following steps:
step S1: obtaining a data stream f (k) (the data stream is original data and can be divided into current epoch data and historical epoch data according to time sequence), wherein k=0, 1,2 … Q; the data is sent in real time and in time sequence; intercepting a data stream by using a window with a length value of L to obtain intercepted data, wherein the intercepted data comprises current epoch data and history epoch data, and specifically comprises the following steps: { f (k) |k=q } represents data of the current epoch; { f (k) |0 is less than or equal to k < Q } represents the data of the history epoch, and the epoch interval time in the embodiment is determined by the hardware configuration parameter (the value of the window initial length value in the embodiment is taken as 1, and the value of the window length value L determines the number of intercepted history epoch data).
Step S2: the intercepted data is corrected, and the correction data of the current epoch is output, and the step S2 of the embodiment includes the steps S2.1, S2.2 and S2.3, specifically as follows:
step S2.1, comprising a first step and a second step,
in the first step, mean processing is performed on the intercepted data by the formula 1), so as to obtain a mean value mean, wherein the formula 1) is as follows:
wherein mean represents the mean of the truncated data; l represents a window length value of a current epoch; f' (k) represents intercepting data of a current epoch k in the data; i is an integer value on [0, L-1 ].
Second, the average value and the intercepted data are subjected to difference through a method of 2) to obtain residual error f 0 Formula 2) is as follows:
f 0 =f'-mean 2);
wherein f' represents intercepting data; mean represents the mean of the truncated data.
Step S2.2, residual error f by 3) 0 The fourier transform series ft (t) is obtained by processing, and expression 3) is as follows:
wherein a is 0 Representing the cosine component amplitude when n=0; level represents the fourier decomposition level; a, a n Representing the amplitude of each level of cosine component; b n Representing sinusoidal component amplitudeThe method comprises the steps of carrying out a first treatment on the surface of the n represents the number of stages; omega represents an angular frequency; t represents the sine and cosine function time axis.
In equation 3), the parameters level, ω, and t of the fourier series are obtained by equation 4), and equation 4) is as follows:
wherein ceil represents an integer returned to not less than the target value; l represents the length value of the current window; p is a proportionality coefficient, and the value range of p in the embodiment is 0.5,1, namely p is 0.5, 1; num represents the number of discrete data points; t represents the period length of the fitted sine and cosine function employed by the fourier transform series.
Preferably, in the formula 3),
step S2.3 (residual superposition), the mean value in step S2.1 and the fourier transform series in step S2.2 are used to perform superposition to obtain a corrected sequence ft ' (t) (by adding the mean value to the fourier transform series, the data magnitude is restored to the magnitude of the original data), the corrected data of the current epoch is output according to the corrected sequence ft ' (t), specifically, the corrected sequence ft ' (t) is obtained by equation 5), and equation 5) is as follows:
ft'(t)=ft(t)+mean 5);
wherein mean represents the mean of the truncated data; ft (t) represents the Fourier transform series; the sequence length of the correction sequence ft '(T) is num (i.e. the number of discrete data points), and the last bit of the correction sequence (i.e. ft' (T) |t=2/T) is taken as the anti-shake correction data output of the current epoch original data.
Step S3: the adaptive window, i.e. the window length when calculating the next epoch correction data, is set as follows:
step S3.1: if the window length L of the current epoch is more than 2, executing the step S3.2, otherwise executing the step S3.3, namely when the total data amount (added with the data of the current epoch) is more than or equal to 3, performing data jump judgment (namely, the step S3.2), otherwise, after increasing the window length of the current epoch by one unit (namely, L+1), returning the window length of the current epoch to the calculation of the next epoch (namely, the step S3.3);
step S3.2, firstly, calculating the sensitivity threshold thres through the intercepted data in the formula 6) and the step S1, wherein the formula 6) is as follows:
thres=N*std(f') 6):
wherein N represents a multiple, N in the embodiment is 5-8 (preferably 5); std represents standard deviation of returned truncated data;
obtaining the first data difference delta f|of different epochs through 7) 1 And a second data difference Deltaf 2 Formula 7) is as follows:
wherein Δf| 1 Representing a first data difference; Δf| 2 Representing a second data difference value; f' (k) represents the data of the current epoch k in the truncated data.
When Deltaf| 1 <thres<Δf| 2 When the current window length value L=1 is taken, the step S1 is returned to calculate the next epoch, otherwise, the step S3.3 is entered; i.e. the sensitivity threshold thres satisfies the sum Δf| 1 Δf| 2 When the relation of (a) indicates that the current data has a fault with the historical data, the historical data no longer has a reference value, and the window needs to be reset by L (i.e. take l=1).
Step S3.3:
when L is less than L max When the current window length value is increased by one unit length (namely L+1), returning to the step S1 to calculate the next epoch; l (L) max Represents a set maximum window length, L in this embodiment max The value is 15-20 (preferably 20).
When L is greater than or equal to L max When the current window length value is unchanged, returning to the step S1 to calculate the next epoch。
Step S4: the data of this embodiment are all processed immediately after being sent, and the original data of all epochs are processed to obtain the correction data of all epochs.
The test results of the anti-shake correction method of this embodiment are as follows:
the test of this embodiment adopts three types of data sets, each representing three types of data sets with stable, step and intense jitter, and as shown in fig. 2 to 4, the three-dimensional coordinates are corrected by the method, and the scattering degree of the positioning result has good correction effect, and the specific test results are as follows:
test results for stationary dataset: as shown in fig. 2, fig. 2 shows (fig. 2 is a plane display, and the three-dimensional display is not good, so that the plane display is adopted in the embodiment) that the correction method of the embodiment has the effect of processing a stable data set, wherein, a circular pixel represents a real-time measurement value of a sensor, a vertical coordinate distance unit is meter (m), a horizontal coordinate represents an epoch, a unit is second(s), a triangle pixel is a result after real-time anti-jitter processing, a physical meaning of data is a distance length between two points, namely, a vector length of a real-time center coordinate and an initial center coordinate, a standard deviation std=0.016 of original data of the data set in fig. 2, a standard deviation std=0.003 of data after anti-jitter is reduced by 79%.
Test results for step dataset: as shown in fig. 3, fig. 3 shows (in a plane) the test effect of a data set with a step, mainly showing the following ability and reaction speed of the method; as shown in fig. 3, it can be seen that an obvious fault appears in the original data near 600 epoch, the physical meaning is that after the data is lost, the time span is discontinuous, a step phenomenon occurs, in order to prevent the deviation between the processed data and the real data caused by the interference of the new data by the history data, the tracking speed of the method is faster by the self-adaptive sensitive threshold, the triangle pixels in fig. 3 basically conform to the trend of the circular pixel distribution, the amplified part in fig. 3 shows the self-adaptive capability, the high fluctuation data and the stable and efficient smooth data are processed successively in a continuous time, the standard deviation of the front part (before 600 epoch) of the data set is std=0.038, the standard deviation of the rear part (after 600 epoch) is std=0.026, and the standard deviation of the corresponding anti-jitter processing results is 0.014 and 0.003 respectively.
Test results of the severely dithered dataset: as shown in fig. 4, fig. 4 shows (in a plane display) the effect of the method in this embodiment under the condition of large data fluctuation, the standard deviation std=0.023 of the data, and the standard deviation std=0.011 after processing, it can be seen that compared with the stable data, the fluctuation data also has more obvious jitter at low frequency, for the purpose of displacement monitoring, the fluctuation in low frequency needs to be kept as a sign of the detection target early warning, in physical sense, when the wind speed reaches a higher value, the integral structure of the fan also has the beat, and monitoring the beat is just a means for avoiding the fan blade from striking the tower, so that the early warning is true and is not affected by the high-frequency fluctuation introduced by the shaking of the equipment, and the anti-jitter processing is a convenient choice by the method.
The above description is only of the preferred embodiments of the present invention and is not intended to limit the present invention, but various modifications and variations can be made to the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.