Está en la página 1de 8

Algorithms for Embedded PHM

Eric Bechhoefer
NRG Systems 110 Riggs Rd Hinesburg, VT 05461

Austin Fang
Sikorsky Aircraft Corporation 6900 Main Street Stratford, CT 06615

AbstractWidespread adoption of Prognostics Health Management (PHM) systems can be hampered by hardware cost. One way to reduce cost, and expand the applications of PHM into industry, is to use embedded microprocessors to perform PHM analysis. Embedded PHM is challenging in that micro-controllers have limited processing power and memory. Algorithms commonly used in PHM Analysis are the Time Synchronous Average, the fast Fourier transform (FFT), and bearing envelope analysis. Presented are techniques to facilitate the use of these algorithms in embedded PHM systems. For example the real FFT implemented with a table lookup and Clenshaws algorithm uses only half of the memory compared to a standard FFT, and no trigonometric functions. This resulted in up to 14X reduction in the processing time against a benchmark FFT. For the envelope analysis (a common bearing vibration analysis), a three step process using heterodyne, filtering and decimation was developed which reduces greatly the memory required while allowing an 8x reduction in processing time. These algorithms are currently running on embedded vibration monitoring systems which incorporate a MEMS accelerometer with a microcontroller for a lower cost PHM system. Keywords-Fast Fourier Transform; real fft; condition analysis; hetrodyne; embedded systems

Shaft analysis, including time synchronous analysis (TSA) and spectrum of the TSA, Residual Analysis and Energy Operator [6]. Gear Analysis, including FM0, Side Band Modulation, Narrow Band Analysis, Amplitude Modulation and Frequency Modulation Analysis ([7],[8]). Bearing Analysis using demodulation techniques [9]. This analysis is deemed necessary at the system level to ensure early detection of faults. Unfortunately, this analysis is computationally intensive and expensive from a memory resource standpoint. Consider analysis on the intermediate shaft of a commercial wind turbine, with a 7.25 Hz shaft rate. Given a sample rate of 100 KHz (common for many PHM systems), the TSA length will be (assuming radix 2 FFT): (1) Consider a design requirement where one wants 50 revolutions for the TSA, then the sample length is: ceil(50/7.25) = 7 seconds, or 700,000 data points. This intermediate shaft has two gears connected to it. The order of operations for the analysis of the shaft and gears is: Shaft Order Calculation: Gear Residual: TSA, 1 FFT 1 FFT, 1 IFFT,

I.

INTRODUCTION

Despite the proven benefit of prognostic health management (PHM) systems (see [1],[2],[3] and [4]), there have been relatively few deployments of systems. Few original equipment manufacturers have offered PHM as standard equipment. While there are a number of aftermarket installations, the total deployed PHM base is small compared to the number of potential installations. One explanation for the low penetration of PHM systems into industry is that the costs of systems are too high. Based on this assumption, a system architecture [5] was developed to lower the cost of ownership. It included the development of a MEMS based sensor incorporating microcontroller where all of the digital signal processing was performed on the sensor. Developing software to perform the analysis on a low cost, lower power microcontroller poses challenges. As an example, based on uploaded configuration, the sensor could perform:

Gear Narrowband Analysis: 1 FFT, 1 IFFT Gear AM Analysis: Gear FM Analysis: 1 Hilbert Transform 1 Hilbert Transform

The order of operations for the TSA, Energy Operator, and statistics is linear, but the FFT is n log2(n). Note that performing the FFT, setting the negative spectrum to zero, and then taking the IFFT is used to calculate the Hilbert transform. This allows a rough calculation of order of operations (TABLE I. where Linear Ops are operations on the TSA vector of length 16384, while n log2(n) relates to the calculation of the FFT, or inverse FFT. This gives an order of operations of a63n + b17 nlog2(n), where n is 16384, and a/b are some constant. While not an issue for a desktop computer, this level of analysis is typically processed on a high end DSP chip, not on a low cost

microcontroller. In order to perform this analysis on a microcontroller, improvement to the algorithms needed to be made. These improvement reduced the values of a and b so that this analysis could be implemented on a low cost microcontroller with minimum degradation in performance.
TABLE I. ANALYSIS ORDER OF OPERATIONS

frequency domain. The smearing effect, and non synchronous noise, is reduced by re-sampling the time domain signal into the angular domain:

mx

E x

mx

(3)

Analysis Shaft Gears: Residual Gears: Energy Op Gears: Narrowband Gears: AM Analysis Gears: FM Analysis

Linear Ops. 51 2 4 2 2 2

n log2(n) 1 4 0 4 4 4

The is the period of the cycle to which the gearbox operation is periodic, and E[] is the expectation (e.g. ensemble mean). Equation (3) makes the assumption that mx( ) is stationary and ergodic. The TSA uses a tachometer as a reference for shaft speed. In its simplest form, the time for one revolution is calculated based the tachometer (e.g. shaft reference). The acceleration data is re-sampled from m samples over the time interval to n number of points in one revolution (from (1)). There are three commonly used interpolation methods for re-sampling: linear interpolation, cubic spline interpolation, and band limited interpolation (see [12]). While linear, piecewise interpolation has zero second derivatives in the interpolation interval, cubic splines derive a set of polynomial equations that are smooth in the first derivative and continuous when taking the second derivative. This requires solving for n-2 linear equations with n unknowns (usually, the second derivative at the end points is set to zero so that one solves n-2 equations with n-2 unknowns). The band limited interpolation method requires defining a linear phase FIR filter of length p, the performing a convolution (order of operations n*p). Prior work ([11], [12]) showed no difference, statistically, between the performance of these TSA methods. As such, a piecewise linear TSA was implemented, with one innovation. B. Inadequacy of Existing TSA Techniques for Wind Turbine Main Rotors Recently, a PHM system was installed on a 2.05 MW wind turbine. This machine uses a double feed induction generator with full power control. This allows the generator to operate between 700 and 1500 revolutions per minute (RPM). The gearbox ratio is approximately 1:95, thus the main rotor RPM can vary from 7.4 to 15.7 RPM. During normal operations (40 second acquisition capturing 8+ revolutions of the main rotor), it was observed that RPM had two sources of variation: variation due to changes in wind speed (RPM change from 1222 to 1327, or 8%, see Error! Reference source not found.), from and variation due to wind shear and tower shadow (+/- 0.7 rpm, or 0.1 % see Figure 2.). Wind shear is a meteorological phenomenon that occurs due to the fluid viscosity of air. The result is that the wind speed that the blade experiences at the top of the rotor arc is higher than at the bottom of the rotor arc. Since turbine power is a function of the square of the wind velocity (and since this is a non-synchronous machine), it has the effect of increasing the speed of the rotor disk and consequently, the power generated as the blade sweeps through the top part of the arc. Tower shadow effect occurs as the blade passes the tower in the 180 degree position. The distribution of wind is altered by the presence of the tower. For upwind rotors, the wind directly

II.

TSA FOR EMBEEDED SYSTEMS

A. TSA Techniques Time synchronous averaging is a signal processing technique that extracts periodic waveforms from noisy data [10]. The TSA is particularly well suited for gearbox analysis, where it allows the vibration signature of the gear under analysis to be separated from other gears as well as noise sources in the gearbox that are not synchronous with that gear. Additionally, variations in shaft speed can be corrected which minimize the spreading of spectral energy into adjacent FFT bins. The model for vibration in a shaft in a gear box was given in [10] as:
xt
K k 1

X k 1 ak t cos 2 kf m t

bt

(2)

where: Xk is the amplitude of the kth mesh harmonic fm(t) is the average mesh frequency ak(t) is the amplitude modulation function of the kth mesh harmonic.
k(t) is the phase modulation function of the kth mesh harmonic. k

is the initial phase of harmonic k, and

b(t) is additive background noise. The mesh frequency is a function of the shaft rotational speed: fm = Nf, where N is the number of teeth on the gear and f is the shaft speed. This vibration model assumes that f is constant. In most systems, there is some wander in the shaft speed due to changes in load or feedback delay in the control system. This change in speed will result in smearing of amplitude energy in the

in front of the tower is redirected and thereby reduces the torque at each blade when in front of the tower. The effect of both wind shear the tower shadow causes a torque ripple [14]. The effect is seen as a 3/rev (e.g. 3 times per revolution) change in rotor speed.

3/rev effect is controlled using 16 sub samples per revolution. For example, given the 16,384 data point used to represent one revolution, the unit circle was sub-sampled 16 times, of length 1024. The resulting solution (Figure 3) significantly improved the detection of high frequency tones due to gear mesh, and presumably gear faults. The main rotor is connected to the planetary gearbox, which in this example has a 123 tooth ring gear and 3 planet gears on the carrier. The Fourier transform of the TSA should indicate a large 123 rev, with sidebands at 120 and 126. The sub-sampled TSA (red x) has less spectral smearing and can be seen to better represent the mesh energy and its sidebands (Figure 3). Further analysis using the subsampling technique using cubic spline interpolation shall be conducted to quantify the difference between linear and cubic spline interpolation.

Figure 1 Generator RPM on Wind Turbine over 40 Second Acquisition The TSA algorithm is designed to control speed changes between revolutions. The cubic spline technique can control changes in speed that are of 2nd order polynomial, while the linear interpolation technique assumes linear changes over a one revolution. Neither technique can control sinusoidal changes of speed within one revolution. The effect of the 3/rev is to introduce jitter and smear high frequencies across a number of bins in the FFT.

Figure 3 Spectrum of TSA Showing 123 Tooth Ring Gear with Sidebands III. THE FFT FOR EMBEDDED SYSTEMS

It is hard to imaging performing condition analysis without using the Fast Fourier Transform. The FFT is extensively used for calculation of frequencies amplitudes, phase information, filtering and the calculation of the Hilbert transform. Without the FFT, condition monitoring would be reduced to gross measures of noise, such as RMS or kurtosis, and would have no ability to generate actionable information (e.g. which component in the gearbox is in need of repair). The data used for vibration based PHM is real valued (e.g. acceleration), meaning that the imaginary parts for the array fi, i = 0,.. N-1, are zeros. The resulting transform, F, satisfies the condition that FN-n = Fn* (its complex conjugate). Besides being redundant information, this uses twice the memory of the original real data array, and more than twice the number of operations. Additionally, the FFT is a structured algorithm. This suggests that there should be efficiencies to be taken in the call to trigonometric function. Functions such as sine and cosine are necessary for random phase angle, but the FFT uses only a few, discrete angles.

Figure 2 Average Three per Rev Change in RPM due to Wind Shear and "Intra Rev" TSA Given the limit resources, a linear intra rev interpolation technique was developed. Because of the Nyquist condition, the minimum number of points needed to represent the 3/rev is 6 sub samples per revolution. However, the use of radix-2 FFT requires a minimum of 8 sub samples. In Figure 2, the

Finally, there are families of microcontrollers that support a hardware floating point capability for some selected math operations. This hardware support can be an advantage to significantly reduce the time required to process an algorithm. A. The FFT for Real Data The complex conjugate relationship of the Fourier transform for real value data, allows one to use only half of the Fourier data. Following [13], one can construct a data structure in which the real parts are the even data values, and the imaginary parts are the odd data values (4):

In the decimation in frequency FFT (see fftlu in the appendix), the radian angle input into the sin/cosine functions 2 /BlockSize. The Blocksize value is incremented by 2n, where n ranges from 1 to ln2(N). Thus, for a 32,768 point FFT, only 15 sine and cosine values are needed (in addition to 0 for sine, and 1,-1 for cosine). This allows the use of a direct look up value of sine/cosine based on count of the outer for loop of the FFT (see appendix, fftlu). The order of operations for a look up is 1. For the real FFT, after the FFT is called, the real and imaginary transform values must be separated from the data arrays and combined into the true transform (4). Performing decimation in time on the data arrays does this. In this process, the radian angle is initialized to 2 /N, and advanced by 2 /N radians for N/2 interactions. Trigonometric function whose arguments form a linear sequence, such as this, are efficiently calculated using Clenshaws recurrance:

Fn
where

Fne e 2 in / N Fno
N 2 1 k 0

(4)

Fne
and

f 2ke 2 ikn

N 2

(5)

cos
Fno
N 2 1 k 0

cos sin

cos sin

cos sin
(8)

f 2k 1 e

2 ikn N 2

(6)

sin

Note that F0 and FN/2 are independent real values. It is necessary to used the imaginary part of F0 to hold FN/2 so that the only the original array space is used. To conveniently (e.g. make it computationally fast) implement this on the embedded system (assuming using C or CPP), a vector data structure was defined which held two arrays: one for even data, and one for odd data. A complex vector was also defined, which had an array of real and an array of imaginary data. The real FFT (fftreal, see appendix) shallow copies the real vector into the complex vector, calls a decimation in frequency FFT of half-length, then calls an decimation in time FFT, in which the two separate transforms ((5), (6)) are recombined into the true transform (4). There are a number of benefits to using the real FFT for embedded system. Besides allocating half the memory of the FFT, the Big O order of operations for real FFT relative to the FFT is:

where =2sin2( /2), = sin( ). Since and /2 are available from the lookup table, it is possible to write the real FFT without the use of trigonometric function. The recurrence is initialized as:
nbit = NumberOfBitsNeeded(NumSamples) + 1; wtemp = sinLU(MXBIT - nbit); wpi = sinLU(MXBIT - nbit + 1); wpr = -2.0f*wtemp*wtemp; wr = 1.0f+wpr; wi = wpi;

Note that MXBIT is the maximum length of the data array in log2, which for this example was 15 (e.g. a maximum FFT length 32,768). Implementation of the recurrence in fftreal (see appendix) was tested for stability, and was found to be within the precision of the numbers themselves (e.g. 32 bit float). The update is processed as:
wtemp = wr; wr = wtemp*wpr - wi*wpi + wr; wi = wi*wpr + wtemp*wpi + wi;

ln 2

ln 2 n

(7)

For the example array of length 16,384, the real FFT is near 0.46 times faster. This has large implications for much of the analysis. For example, the residual and narrowband analysis, which perform FFT filtering (e.g. an FFT, then an inverse FFT) are now 0.462 = 0.22 or over 4x faster. Additionally, due to fewer operations, the round off errors are smaller than in the FFT. B. Use of a Lookup Table and Clenshaws Recurrance in the FFT The FFT algorithm is structured such that only specific sine and cosine values are needed. This can remove the necessity to call these trigonometric functions (which are relatively slow). From equation (4), (5) and (6), it is seen that the denominator of the complex exponential is 2 /N, where N is 2n. Since n is integer, it should be possible to take advantage of this structure.

The recurrence is approximately 50% faster than the trigonometric functions that it replaces. IV. BEARING ENVELOPE ANALYSIS FOR EMBEDDED SYSTEMS

Bearing Envelope Analysis (BEA) may be the most robust techniques used for bearing fault detection [15]. BEA is based on demodulation of high frequency resonance associated with bearing element impacts. For rolling element bearings, when the rolling elements strike a local fault on the inner or outer race, or a fault on a rolling element strikes the inner or outer race, an impact is produced. These impacts modulate a signal at the associated bearing pass frequencies, viz. Cage Pass Frequency (CPF), Ball Pass Frequency Outer Race (BPFO), Ball Pass Frequency Inner Race (BPFI), and Ball Fault Frequency (BFF). Additionally, the impact excites resonance at one or more of the bearing fundamental frequency modes. This

results in amplitude modulation of the resonant frequency in the time domain. Ideally, one wishes to band-pass filter around the bearing resonance. Selecting a window frequency that encompasses the bearing resonance does this. For example, if the bearing resonance is detected at 23KHz, then one selects a window of 22KHz to 24 KHz. One then calculates the signal envelope window by band-pass filtering from 22 to 24 KHz, then by using the Hilbert transform (e.g. taking the spectrum of the amplitude of the analytic signal). The analytic signal xa(t), is complex, composed of the real part of the original signal, x(t), and the imaginary part, which is the Hilbert transform of x(t):

Since there is a bandwidth reduction in the envelope, one should process only those data points needed for the envelope: 28,000 data points is much easier to process than 700,000 data point. The key is the mechanization to facilitate this: the low pass filter. Filtering is a type of average, where the weights are formally defined using some optimality criterion. One can use a linear phase FIR filter (b) with a normalized bandwidth: bw = (Window High Window Low)/Sample Rate. This will ensure no aliasing in the decimated signal. One can also take advantage of the trigonometric identity:

cos a

cos cf

cos a cf

cos a cf

(11)

xa t
where

xt

iH x t

(9)

which is the heterodyne, where cf center of the window frequency (e.g. in the example, (24+22)/2 or 23 KHz, the resonance of the notional bearing). The high frequency image (cos(a+cf)) will be filtered in the decimation process. Finally, the Hilbert transform needs to be created. As noted, the imaginary part of the Hilbert transform is the real part phase shifted by 90 degrees. Since sine (cf+ /2) = cosine(cf), one can easily create the imaginary part by multiplying the heterodyned signal by sine(cf). See bearing heterodyne code snippet in the Appendix. Note that since one advances sine(cf) and cosine(cf) by the omega, one can take advantages of the Clenshaws recurrence algorithm and remove those trigonometric function calls. V. IMPELMENTATION AND TIMING RESULTS

H x t

x t

(10)

There are two interesting concepts to note in equation (9): the imaginary signal is identical to the real part if a /2 phase shift is accounted for, and the spectrum of the analytic signal is non-zero for the positive frequency only. These properties will be useful in reducing the computation burden of the algorithm in an embedded system. One of the simplest algorithms for BEA was developed in [15]. The pseudo code is: 1. 2. 3. 4. 5. 6. 7. X = fft(x); Take the FFT of the vibration signal dfrq = sample_rate/length(x); Get the freq. bin width idxLw = floor(22,000/dfrq); find the indexes of the idxHi = floor(24,000/dfrq); envelope window X(1:(idxHi-idxLw+1) =X(idxLw:idxHi); Heterodyne X((idxHi-idxLw+2):end) = 0; Hilbert Transfer env = abs(ifft(X)); get the envelope

The heterodyne process, 5, copies and translates the window of interest to base-band, then low pass filters in the frequency domain, in one step. In 6, the condition necessary to calculate the Hilbert transform is performed. Finally the resulting envelope (env of 7) is easily calculated as the absolute value of the inverse FFT. Note that by low pass filtering in 5, it is possible to decimate the envelope prior to taking the spectrum. For example, if the sample rate were 100,000 samples per second, given the envelope bandwidth of 2000 Hz (24,000 KHz 22,000 KHz), the envelope could be decimated by 25. Instead of taking the spectrum of 700,000 data points, the spectrum would operate on 28,000 data points. For this paper the term spectrum will relate to Welchs method. This consists of dividing the time series data into (possibly overlapping) segments, computing a modified periodogram of each segment, and then averaging the PSD estimates. Clearly it would add cost/computational time to implement the above bearing envelope analysis. The time required for a 700,000 point FFT would be large, and there is additional code complexity required to implement a non-radix 2 FFT. Given that, there are seeds here for reducing the computational complexity of the algorithm, starting with the decimation.

The TSA was implemented using linear interpolation, where each revolution was broken into 16 block of length N/16 (were N was the TSA length). Further, each block was resampled using linear interpolation. While all three method (linear, spline and bandwidth limited) methods were implemented and tested in Matlab, no timing studies were performed. Qualitatively, the implemented methods seem to reduce jitter and capture spectral features with higher precision than the other methods. Further analysis will be conducted in the future. Earlier it was stated that families of microcontrollers existed with a hardware floating point unit (FPU) capability. Taking advantage of the FPU can greatly increase the processing capability of the microcontroller. The target microcontroller for the MEMS sensor was the AVR32UC3, 144 pin microcontroller. This part comes in an A version, and a C version with FPU support. Since these chips are identical expect for the FPU support, one can perform time studies with exactly the same software. The FPU on the AVR32UC30512C supports single precision addition, subtraction, multiplication and square root. When performing other math operations, the device resorts to software emulation. All software tests where developed on the AVR32 Studio using the GNU CPP compiler. The benchmark FFT was the four1 FFT from [13]. The array length for testing included: 1024, 2048, 4096, 8192, 16384, with a maximum array length of 32768. Time was calculated using the <time.h> header with the difftime function. Because the resolution of diff time is one second, each test was run approximately 50,000

repetitions, with the ratio taken of the test code vs. the benchmark (TABLE II. ).
TABLE II. TIME RESULTS FOR FFT

Effect of not calling trigonometric functions Effect of Real FFT vs. FFT Floating point Real FFT Emulation Aggregate improvement: vs

0.71 times 0.45 times faster 0.22 times 1/(0.71 x 0.45 x 0.22): or approximately 14x faster than benchmark.

int isPowerOfTwo (unsigned int x) { return ((x != 0) && !(x & (x - 1))); } //-------------------------------------------------unsigned NumberOfBitsNeeded ( unsigned PowerOfTwo ) { unsigned i; if ( PowerOfTwo < 2 ) { exit(1); } for ( i=0; ; i++ ) { if ( PowerOfTwo & (1 << i) ) return i; } } //-------------------------------------------------int fftlu( unsigned NumSamples, float *RealIn, float *ImagIn, float *RealOut, float *ImagOut ) { unsigned NumBits; unsigned i, j, k, n,crtBit, idx, idx1; unsigned BlockSize, BlockEnd; int PowOfTwo, good; float sinLU(unsigned idx); float cosLU(unsigned idx); float cm1, cm2, sm1, sm2, w, ar[3], ai[3]; float tr, ti; /* temp real, temp imaginary */ PowOfTwo = isPowerOfTwo(NumSamples); if (PowOfTwo) { NumBits = NumberOfBitsNeeded ( NumSamples ); //Do simultaneous data copy and bit-reversal //ordering into outputs... for ( i=0; i < NumSamples; i++ ) { j = ReverseBits ( i, NumBits ); RealOut[j] = RealIn[i]; ImagOut[j]=(ImagIn==NULL)?(float)0.0:ImagIn[i]; } //Do the FFT itself... BlockEnd = 1; crtBit = 0; //Index into the sine/cosine table for ( BlockSize = 2; BlockSize <= NumSamples; BlockSize <<= 1 ) { idx = MXBIT - crtBit; //current index into cos/sin table idx1 = idx + 1; cm1 = cosLU(idx); cm2 = cosLU(idx1); sm1 = sinLU(idx); sm2 = sinLU(idx1); w = 2.0f * cm1; for ( i=0; i < NumSamples; i += BlockSize ) { ar[2] = cm2; ar[1] = cm1; ai[2] = sm2; ai[1] = sm1; for ( j=i, n=0; n < BlockEnd; j++, n++ ) { ar[0] = w*ar[1] - ar[2];

Typically, most data intensive analysis on the sensor with the A version of the AVR32UC3 is 85 seconds of processing time, while the C version returns results within 22 seconds (this included 1 TSA analysis, 2 gear analysis, and 1 bearing analysis). Results for the bearing analysis were harder to quantify, in that the benchmark code could not be ported to the AVR32UC3. Instead, timing studies were conducted using a PC console application compiled with AVRStudio. In general, with a 6 second acquisition sampled at 105 KHz, 4096-point PSD, the optimized code was 8 times faster than benchmark. VI. CONCLUTION

Existing algorithms for fault detect in PHM function as design. PHM has shown to reduce operations and maintenance cost. It is likely, that as PHM techniques mature, PHM systems will be part of the equipment design codes. That said, the acceptance and wide scale deployment of PHM system will be delayed until the total cost of ownership is reduced. Reducing cost will require PHM systems designed around smart sensors with embedded functionality. This in turn will require improved processing techniques that meet the resource requirement of embedded systems. Presented here are techniques that were implemented on such an embedded system, with system performance equal to traditional sensors. APPENDIX Example source code for the real FFT and to demonstrate the look up table and Clenshaws recurrance.
//-----------------------------------------------unsigned ReverseBits ( unsigned index, unsigned NumBits ) { unsigned i, rev; for ( i=rev=0; i < NumBits; i++ ) { rev = (rev << 1) | (index & 1); index >>= 1; } return rev; } //------------------------------------------------

ar[2] = ar[1]; ar[1] = ar[0]; ai[0] = w*ai[1] - ai[2]; ai[2] = ai[1]; ai[1] = ai[0]; k = j + BlockEnd; tr = ar[0]*RealOut[k] - ai[0]*ImagOut[k]; ti = ar[0]*ImagOut[k] + ai[0]*RealOut[k]; RealOut[k] = RealOut[j] - tr; ImagOut[k] = ImagOut[j] - ti; RealOut[j] += tr; ImagOut[j] += ti; } } crtBit++; BlockEnd = BlockSize; } good = 1; } else{ good = 0; } return good; } //------------------------------------------------unsigned fftreal(unsigned NumSamples, float *Even, float *Odd, float *RO, float *IO) {//Calculates the Fourier transform of a set of n real-valued data points unsigned n2, nbit, i,i1,i3,np3, Pow2, good; float wtemp, wpr, wpi, wr, wi, c2, c1; float h1r, h1i, h2r, h2i; Pow2 = isPowerOfTwo(NumSamples); if (Pow2) { n2 = NumSamples>>1; for (i = 0; i < NumSamples; i++) { RO[i] = Even[i]; if (!Inv) IO[i] = -Odd[i]; else IO[i] = Odd[i]; } nbit = NumberOfBitsNeeded(NumSamples) + 1; //Initialize the recurrence algorithm for sin/cos: get theta angle wtemp = sinLU(MXBIT - nbit); wpi = sinLU(MXBIT - nbit + 1); c2 = -0.5f; good = fftluil(NumSamples, RO, IO);//call the fft wpr = -2.0f*wtemp*wtemp; //recurance wr = 1.0f+wpr; wi = wpi; c1 = 0.5f; np3 = NumSamples; for (i=1; i <= n2; i++) { i1 = i; i3 = np3 - i; //conjugate side h1r = c1 * ( RO[i1] + RO[i3] ); //The two separate transforms are h1i = c1 * ( IO[i1] - IO[i3] ); //separated out of data. h2r = -c2 * ( IO[i1] + IO[i3 ]); h2i = c2 * (RO[i1] - RO[i3]); RO[i1] = h1r - wr*h2r - wi*h2i; //Here they are recombined to form IO[i1] = h1i - wr*h2i + wi*h2r; //the true transform of the original real data. RO[i3] = h1r + wr*h2r + wi*h2i; //e.g. the butterfly operation IO[i3] = -h1i - wr*h2i + wi*h2r; wtemp = wr; wr = wtemp*wpr - wi*wpi + wr; //The recurrence. advances wi = wi*wpr + wtemp*wpi + wi; // the angle by theta } h1r = RO[0]; RO[0] = h1r - IO[0]; //Squeeze the first and last data together

IO[0] = -h1r - IO[0]; //to get them all within the original array. good = 1; } return good; } //--------------------------------------------------------------------------float sinLU(unsigned idx) { const float luSin[17] = {0.0000958738f, 0.0001917476f, 0.0003834952f, 0.0007669903f, 0.0015339802f, 0.0030679568f, 0.0061358846f, 0.0122715383f, 0.0245412285f, 0.0490676743f, 0.0980171403f, 0.1950903220f, 0.3826834324f, 0.7071067812f, 1.0000000000f, 0.0000000000f, 0.0000000000f}; return luSin[idx]; } //--------------------------------------------------------------------------float cosLU(unsigned idx) { const float luCos[17] = {0.9999999954f, 0.9999999816f, 0.9999999265f, 0.9999997059f, 0.9999988235f, 0.9999952938f, 0.9999811753f, 0.9999247018f, 0.9996988187f, 0.9987954562f, 0.9951847267f, 0.9807852804f, 0.9238795325f, 0.7071067812f, 0.0000000000f, 1.0000000000f, 1.000000f}; return luCos[idx]; } //--------------------------------------------------------------------------//bearing heterodyne cf = (hi + lw) * 0.5f; //center freq of heterodyne omega = -PI2*cf/sr; //radian frequency of heterodyne bw = hi - lw; //lw is low side of window, hi is high side nbw = bw/sr; //normalized bandwidth r = (int) (sr/bw * 0.5f); //decimation rate env = str + r * len - 1; for (i = 0; i <=env; i += r) //take every r data points (e.g. decimate) { fzr = 0.0f; fzi = 0.0f; // the real and imaginary data points wtemp = sinf(0.5f * omega); //Recurrence initialization wpi = sinf(omega); // for hetrodyne and hilbert transform wpr = -2.0f * wtemp * wtemp; wc = 1.0f+wpr; ws = wpi; for(j = 0; j < FLTLEN; j++) //filter and decimate { idx = i + j - HFLTLEN; vidx = v[idx]; //current data point fzr += wc * b[j] * vidx; //low pass filter, hetrody, real part of Hilbert fzi += ws * b[j] * vidx; //low pass filter, hetrody, imag part of Hilbert clenshaw(wpr, wpi, wc, ws); // recurrence. advances the angle by omega } env = sqrtf(fzr*fzr + fzi*fzi); //envelope psd.x[i] = env; }

REFERENCES
[1] J. Wright, Emerging Results Using IMD-HUMS in a Black Hawk Assault Battalion American Helicopter Socieity 61st Annual Forum, Grapevine, TX, June 1-3, 2005. Siyambalapitiya, D.J.T., McLaren, P.G., Reliability improvement and economic benefits of online monitoring systems for large induction machines IEEE Transactions on Industry Applications, Volume 26, Issue 6, 1990. Nilsson, J, Bertling L,Maintenance Management of Wind Power Systems Using Condition Monitoring Systems Life Cycle Cost Analysis for Two Case Studies, IEEE Transactions on Energy Conversion, Volume 22, Issue 1, 2007. WWEA, World Wind Energy Association, The Benefits of a ProActive Approach Using Preventive and Predictive Maintenance Tools Actual Examples and Case Studies www.wwindea.org/technology/ch03/estructura-en.htm

[2]

[3]

[4]

E. Bechhoefer, B. Morton, Condition Monitoring Architecture to Reduce the Total Cost of Ownership, IEEE PHM Conference, 2012, Denver. [6] G. White, Introuduction to Machine Vibration DLI Engineering, 1998 [7] McFadden, P.D., Detecting Fatigue Cracks in Gears by Amplitude and Phase Demodulation of the Meshing Vibration, J. Vib. Acoust. Stress Reliab. Design, vol. 108, no. 2, Apr. 1986, pp. 165-170. [8] Zakrajsek, J. Townsend, D., Decker, H. (1993). An Analysis of Gear Fault Detection Method as Applied to Pitting Fatigue Failure Damage. NASA Technical Memorandum 105950. [9] Randall, R. Vibration-based Condition Monitoring: Industrial, Aerospace & Automotive Application, John Wiley, New York, 2011 [10] P. McFadden A revised model for the extraction of periodic waveforms by time domain averaging, Mechanical Systems and Signal Processing 1 (1) 1987, pages 83-95 [5]

[11] H. Decker, J. Zakrajsek, Comparison of Interpolation Methods as Applied to Time Synchronous Averaging ARL- TR-1960, MFPT, April 19-22, 1999 [12] E. Bechhoefer, M. Kingsley, A Review of Time Synchronouse Averaging Algorithms, PHM Society Conference, 2009. [13] W. Press, S. Teukolsky, W. Vetterling, B. Flannery, Numerical Recipes in C, Cambridge Univesity Press, Cambrige, 1992, p512 514 [14] D. Dolan, P. Lehn, Simulation Model of Wind Turbine 3p Torque Oscillation due to Wind Shear and Tower Shadow, IEEE Transaction on Energy Conversion, Vol. 21, No. 3, September 2006. [15] R. Randall, Vibration-based Condition Monitoring: Industrial, Aerospace & Automotive Application, John Wiley, New York, 2011.

También podría gustarte