Elevator door running speed estimation method based on energy threshold algorithm
Technical Field
The invention belongs to the field of electrical control and digital signal processing, and relates to a real-time running speed estimation method of an elevator door based on an energy threshold algorithm.
Background
As a public transport means, the most essential function of an elevator is to ensure that people or goods can be stably and safely delivered to a target floor, but for a long time, the situation of casualties caused by elevator accidents frequently occurs in China, how to ensure the safe operation of the elevator can be ensured, the loss is reduced to the maximum extent, and the elevator becomes the first major affairs which needs to be solved urgently by government supervision departments, elevator manufacturers, elevator suppliers and other departments.
In the safe operation of the elevator, the opening and closing of the door and the operation speed are one of the important indexes for judging whether the elevator operates normally or not. The acceleration signal of the elevator door can be well used for calculating and estimating the real-time running speed of the elevator door, but the acceleration sensor is accompanied by various noises and interferences in the field acquisition process, so that the speed signal after integration has a large error in the acceleration signal processing process, and the result after secondary integration has serious distortion. Meanwhile, after frequency domain filtering is adopted, small-amplitude jitter signals exist in the elevator door in the static state of opening and closing the gap door and at the moment of opening and closing the door. Therefore, the accurate processing algorithm of the acceleration signal of the elevator door is a core part of estimating its real-time speed value and running state.
The patent provides an elevator door real-time running speed estimation method based on the combination of an energy threshold algorithm and a time domain frequency domain filtering algorithm, and the algorithm can accurately estimate the acceleration value, the speed value and the running state of the elevator door in real-time running. These parameters will be important indicators in normal elevator operation, safety monitoring and maintenance.
Disclosure of Invention
According to the elevator door acceleration signal processing method, the acquired elevator door acceleration signal is processed through a series of signal processing algorithms, so that accurate elevator door operation acceleration and speed values are obtained, whether the elevator is operated safely or not can be known conveniently, and guarantee is provided for accurate judgment of elevator operation, reduction of accident probability, improvement of monitoring and operation and maintenance efficiency and reduction of labor cost.
The algorithm of the patent mainly comprises the following implementation processes: firstly, carrying out trend removing item processing on actually measured elevator door switch acceleration signal data; converting the time domain signal into a frequency domain through fast Fourier transform, and carrying out frequency domain filtering; then, after Fourier inverse transformation, the transformed time domain signal is processed by adopting an energy threshold algorithm, and jitter interference signals existing at the moment of opening and closing the door of the elevator and at the gap of opening and closing the door are filtered; and finally, integrating the processed acceleration signal to obtain a real-time speed signal of the elevator door.
The invention mainly comprises the following steps:
step 1, acquiring an acceleration signal of the operation of an original elevator door through an acceleration sensor;
1-1, horizontally placing an acceleration sensor at one side of an elevator door;
1-2, manually controlling the opening and closing of the elevator door, and recording acceleration signal data of the elevator door when the elevator door is opened and closed every time through an acceleration sensor.
Step 2, trend item removing processing is carried out on the obtained acceleration signals;
2-1, calculating a trend item of the acquired acceleration signal data;
the sampling data of the elevator door acceleration signal obtained by actual measurement is { xkN is the length of the sample data, and for convenience of calculation, the sample data length is extended to N, and N is 2LL is the minimum integer for N ≧ N, let the sampling interval Δ t equal to 1, set a polynomial function:
determining polynomial functions
Each undetermined coefficient a of
j(j ═ 0, 1.. times, m), such that the polynomial function
And the sampled data x
kHas the smallest sum of squared errors E, i.e.
The condition that E has an extreme value is as follows:
taking E pairs of a in sequenceiThe partial derivatives are calculated to generate an m +1 element linear equation set:
solving the equation set to obtain m +1 undetermined coefficients aj(j ═ 0, 1.. times, m). In the above formulas, j is a set polynomial order, and the value range of j is more than or equal to 0 and less than or equal to m.
And 2-2, obtaining the acceleration signal without the linear trend term.
The formula for eliminating the linear trend term is as follows:
when m is more than or equal to 2, the curve trend item is shown. In the actual elevator door acceleration signal processing, m is usually 1,2, and 3. The sampled data is processed by polynomial trend item elimination to obtain yk。
Step 3, converting the signal into a frequency domain through fast Fourier transform, and filtering and denoising the signal;
3-1, Discrete Fourier Transform (DFT);
since the actual sampled signal is discrete and the sample length N of the sampled signal over time T is finite, { y after processing the detrending termkAs an N-point sequence y (r) (0, 1,2.. gtoren-1), a discrete algorithm using a fourier transform is required to perform fourier transform on the elevator door acceleration signal, and the expression of the Discrete Fourier Transform (DFT) is:
in the formula: y (k1) is equivalent to Y (
k 1. DELTA.f), the sampling frequency
3-2, Fast Fourier Transform (FFT);
3-2-1. due to the limitation of the length of the sampling signal and the calculation cost, the signal y (r) of the detrending term is processed by adopting fast Fourier transform:
the N-point discrete fourier transform of the N-point sequence y (r) can be expressed as:
wherein W is e-j2π/N
Using Fourier coefficient of variation W(k1)rIs periodic, i.e.
W(k1)r=Wk1(r+N)=W(k1+N)r
By virtue of its symmetry, i.e.
W(k1)r+N/2=-W(k1)r
3-2-2. the discrete fourier transform of a long sequence can be decomposed into a discrete fourier transform of a short sequence according to its periodicity.
Sample length N2LThe detrended sequence y (r) (0, 1,2.., N-1) is first divided into two groups according to the parity of r:
respectively calculate it
Discrete fourier transform of the points, the first half is obtained as:
the rear half part is:
3-2-3, repeating the step 3-2-2 to obtain the FFT result d (r) (r is 0,1,2.. N-1) of y (r).
And 3-3, carrying out frequency domain filtering on the amplitude-frequency signal.
With a finite impulse response FIR digital filter, the difference equation form of the FIR filter can be expressed as:
in the formula: d (n1) and p (n1) are respectively an input time domain signal sequence subjected to fast Fourier transform and an output frequency domain signal sequence subjected to frequency domain filtering; bk3N1 is equal to or greater than 0, and k3 is equal to 0,1,2.
The z-transform of the impulse response function h (n) of the FIR filter is the system transfer function, which can be expressed as:
then its impulse response function is:
step 4, performing inverse Fourier transform on the filtered frequency domain signal, and calculating the energy of the acceleration signal;
4-1, inverse Fourier transform of the frequency domain signal;
in the formula: f (r) is equivalent to f (r Δ t), and the sampling time interval Δ t is 1, r is 0,1,2.
4-2, normalizing the acceleration signal;
firstly, normalizing the acceleration signal with the amplitude smaller than a set threshold A, and filtering out the jitter interference noise after normalization processing; in general, the amplitude of the jitter interference noise is smaller than the normalized coefficient C, and the other useful signals are larger than C. Therefore, the acceleration signal can be further processed and distinguished from the interference signal and the useful signal after being divided by the preset normalization coefficient.
Where f (t) is f (r · Δ t).
The energy waveform of the normalized acceleration signal g (t) is obtained by squaring the normalized acceleration signal g (t), so that the difference between the jitter signal and the useful signal is larger, and the setting of the threshold B is more favorable for removing most of the jitter signal.
4-3, calculating the energy of the acceleration signal.
The energy E1 of the acceleration signal f (t) is defined as:
and squaring the amplitude of the signal after the Fourier transform.
Step 5, setting a threshold value for the running stage of the elevator, and removing a jitter noise signal;
and 5-1, distinguishing the jitter with low amplitude from the useful signal running section with high amplitude, determining the signal running section and reducing the loss of the useful signal to the maximum extent. Setting an accurate threshold B for the waveform subjected to the square processing, judging, reserving the waveform larger than the threshold, and enabling the waveform smaller than the threshold to return to zero:
the judged waveform is named as an energy signal amplitude u (t);
5-2, multiplying the amplitude of the energy signal by a normalization coefficient to obtain a final acceleration signal q (t), wherein the final acceleration signal q (t) is as follows:
q(t)=u(t)·C
step 6, integrating the final acceleration signal q (t) to obtain a corresponding real-time speed signal r (k 5):
the sampling data of the final acceleration signal q (t) is { q }k5And (k5 ═ 1,2, 3.., n), sampling time step Δ t in numerical integration is taken as an integration step, and trapezoidal numerical integration formula is:
the invention has the following beneficial effects:
according to the elevator door acceleration signal processing method, the acquired elevator door acceleration signal is processed through a series of signal processing algorithms, so that accurate elevator door operation acceleration and speed values are obtained, whether the elevator is operated safely or not can be known conveniently, and guarantee is provided for accurate judgment of elevator operation, reduction of accident probability, improvement of monitoring and operation and maintenance efficiency and reduction of labor cost.
The invention carries out trend item removing pretreatment on the obtained complex original signal, fast Fourier transform is carried out to the complex original signal, the complex original signal is filtered, then Fourier inversion is carried out to the complex original signal, the complex original signal is converted into a frequency domain and is filtered, then the complex original signal is converted into a time domain, an operation section is determined according to the energy of the complex original signal, a threshold value is set, and difficult problems, namely jitter interference signals existing at the moment of opening and closing a door of an elevator and in the gap of opening and closing the door, are removed, meanwhile, the loss of useful signals can be reduced, and the velocity signal is obtained by integration.
The invention processes and judges the on-site measured signals, has stronger anti-jamming capability under complex conditions, has better adaptability and accuracy rate aiming at the acceleration signal processing under an ideal state, and provides great help for normal operation, maintenance and safety monitoring of the elevator door by accurate speed signals.
Drawings
FIG. 1 is a graph of an elevator door acceleration raw signal;
FIG. 2 is a graph of an elevator door acceleration raw signal after detrending;
FIG. 3 is a frequency domain diagram of elevator door acceleration signal after detrending item processing;
FIG. 4 is a graph of the elevator door acceleration signal after being filtered in the frequency domain after being detrended;
FIG. 5 is a time domain diagram of the elevator door acceleration signal after frequency domain filtering;
FIG. 6 is a graph of the elevator door acceleration signal time domain after passing through an energy threshold algorithm;
fig. 7 is a velocity diagram obtained by time domain integration of the elevator door acceleration signal.
Detailed Description
The invention is further illustrated with reference to the following figures and examples.
As shown in fig. 1-7, the invention provides an algorithm for obtaining an accurate speed signal by processing an actually measured elevator door acceleration signal, adopting a time domain de-trending term, fast fourier transform to frequency domain filtering, fourier inversion to time domain, and adopting an energy threshold algorithm for de-noising and integrating, and provides an elevator door real-time operation speed estimation method based on the energy threshold algorithm.
The invention firstly obtains the disordered original acceleration signal of the elevator door shown in figure 1 through field actual measurement. FIG. 2 is a time domain diagram of the acceleration raw signal after being processed by the detrending term, and the image after being processed by the detrending term is wholly translated to a horizontal line, which means that a large amount of direct current component noise is eliminated; FIG. 3 is the frequency domain of FIG. 2 after fast Fourier transform, which is analyzed for spectral characteristics and filter parameters are set; FIG. 4 is a diagram of the band pass 8HZ and the stop band 35HZ of FIG. 3 after frequency filtering by FIR equiripple filtering; FIG. 5 is a time domain plot of FIG. 4 after an inverse Fourier transform; fig. 6 is an accurate acceleration signal diagram obtained by performing zeroing processing on a small-amplitude jitter signal existing when the elevator door is in a static state of the opening and closing gap door and the door is closed by adopting an energy threshold algorithm in fig. 5; fig. 7 is a velocity signal diagram obtained by time-domain integration of an acceleration signal diagram.
The invention processes the collected elevator door acceleration signals through a series of signal processing algorithms, and plans to obtain more accurate elevator door running acceleration and speed values as important indexes in normal running, safety monitoring and maintenance of the elevator.
The specific implementation method is as follows:
step 1, obtaining an original elevator door running acceleration signal through an acceleration sensor
1-1, horizontally placing an acceleration sensor at one side of an elevator door;
1-2, manually controlling the opening and closing of the elevator door, and recording the data of the acceleration signal when the elevator door is opened and closed every time through an acceleration sensor, as shown in the figure I.
Step 2, trend item removing processing is carried out on the obtained acceleration signals
2-1, acquiring original acceleration signal data and calculating a trend item;
the sampling data of the actually measured elevator door acceleration signal is { xkN is the length of the sample data, and the sample data length is extended to N (N is 2) for ease of calculationLL is an integer and N ≧ N), let the sampling interval Δ t equal to 1, set a polynomial function:
determining a function
Each undetermined coefficient a of
j(j ═ 0, 1.. times, m), such that the function is
And discrete data x
kHas the smallest sum of squared errors E, i.e.
The condition that E has an extreme value is as follows:
taking E pairs of a in sequenceiThe partial derivatives can generate an m +1 element linear equation set:
solving the equation set to obtain m +1 undetermined coefficients aj(j ═ 0, 1.. times, m). In the above formulas, j is a set polynomial order, and the value range of j is more than or equal to 0 and less than or equal to m.
And 2-2, obtaining an acceleration signal eliminating the linear trend term.
The formula for eliminating the linear trend term is as follows:
when m is more than or equal to 2, the curve trend term is usually taken as m is 1,2 and 3. The sampled data is processed by polynomial trend item elimination to obtain yk。
Step 3, converting the frequency domain into a frequency domain through fast Fourier transform, and filtering and denoising
3-1, Discrete Fourier Transform (DFT);
processed by detrending term { ykAs an N-point sequence y (r) (0, 1,2.. gtoren-1), performing fourier transform on the elevator door acceleration signal by using a discrete algorithm of fourier transform, where the expression of Discrete Fourier Transform (DFT) is:
in the formula: y (k1) is equivalent to Y (
k 1. DELTA.f), the sampling frequency
3-2, Fast Fourier Transform (FFT);
3-2-1, the patent adopts fast Fourier transform to process the trend removing item signal:
the N-point discrete fourier transform of the N-point sequence y (r) can be expressed as:
wherein W is e-j2π/N
Using Fourier coefficient of variation W(k1)rIs periodic, i.e.
W(k1)r=Wk1(r+N)=W(k1+N)r
By virtue of its symmetry, i.e.
W(k1)r+N/2=-W(k1)r
3-2-2. the discrete fourier transform of a long sequence can be decomposed into a discrete fourier transform of a short sequence according to its periodicity.
Sample length N2LThe detrended sequence y (r) (0, 1,2.., N-1) is first divided into two groups according to the parity of r:
respectively calculate it
Discrete fourier transform of the points, the first half is obtained as:
the rear half part is:
3-2-3, repeating the step 3-2-2 to obtain the FFT result d (r) (r is 0,1,2.. N-1) of y (r).
And 3-3, carrying out frequency domain filtering on the amplitude-frequency signal.
A finite impulse response FIR digital filter is adopted, and the difference equation of the FIR filter is as follows:
in the formula: d (n1) and p (n1) are respectively an input time domain signal sequence subjected to fast Fourier transform and an output frequency domain signal sequence subjected to frequency domain filtering; bk3N1 is equal to or greater than 0, and k3 is equal to 0,1,2.
The z-transform of the impulse response function h (n) of the FIR filter is the system transfer function:
then its impulse response function is:
step 4, carrying out inverse Fourier transform on the filtered frequency domain signal, and calculating the energy of the acceleration signal
4-1, inverse Fourier transform of the frequency domain signal;
in the formula: f (r) is equivalent to f (r Δ t), and the sampling time interval Δ t is 1, r is 0,1,2.
4-2, normalizing the acceleration signal;
firstly, normalizing the acceleration signal with the amplitude smaller than a set threshold A, and filtering out the jitter interference noise after normalization processing; in general, the amplitude of the jitter interference noise is smaller than the normalized coefficient C, and the other useful signals are larger than C. Therefore, the acceleration signal can be further processed and distinguished from the interference signal and the useful signal after being divided by the preset normalization coefficient.
Where f (t) is f (r · Δ t).
The energy waveform of the normalized acceleration signal g (t) is obtained by squaring the normalized acceleration signal g (t), so that the difference between the jitter signal and the useful signal is larger, and the setting of the threshold B is more favorable for removing most of the jitter signal.
4-3, calculating the energy of the acceleration signal.
The energy E1 of the acceleration signal f (t) is defined as:
and squaring the amplitude of the signal after the Fourier transform.
Step 5, determining the set threshold value of the running stage of the elevator, and removing the dithering noise signal
And 5-1, distinguishing the jitter with low amplitude from the useful signal running section with high amplitude, determining the signal running section and reducing the loss of the useful signal to the maximum extent. Setting an accurate threshold B according to the waveform, reserving the waveform larger than the threshold, and enabling the waveform smaller than the threshold to return to zero:
the judged waveform is named as an energy signal amplitude u (t);
5-2, multiplying the amplitude of the energy signal by a normalization coefficient to obtain a final acceleration signal q (t), wherein the final acceleration signal q (t) is as follows:
q(t)=u(t)·C
and 6, integrating the final acceleration signal q (t) to obtain a corresponding real-time speed signal r (k 5).
6-1, and the sampling data of the final acceleration signal q (t) is qk5And (k5 ═ 1,2, 3.., n), sampling time step Δ t in numerical integration is taken as an integration step, and trapezoidal numerical integration formula is:
the following needs to be noted in steps 4 and 5:
the setting of the normalization coefficient C and the threshold B needs to be judged according to the amplitude of the jitter waveform, is selected according to the actual situation, and is adjusted by the feedback of the filtering effect.