Fault diagnosis of onboard automobile machine control using FFT algorithms - Embedded.com

Fault diagnosis of onboard automobile machine control using FFT algorithms


Fault Diagnosis, also known as early fault detection and classification, is an emerging field of research and development. A myriad of techniques related to diagnosis have been proposed in the literature that can be grouped as model-based, signal-based, and data-based methods.

A large variety of equipment and systems have been analyzed for health monitoring using these techniques. Keeping in view increased utilization of electrical machines in electric and hybrid automobiles, early fault detection and classification methods for machines is an area which is currently being investigated.

In general, fault detection methods require additional computation strength, high resolution, large amounts of memory, and consume more power, which increases the associated cost of embedded hardware required to implement a diagnosis algorithm. Such an algorithm should be capable of producing reasonable results using cost effective hardware, but unfortunately that comes with the compromise of lesser resolution, limited memory and low power consumption. In this article, we look at fault diagnosis by describing a method for gear faults in the DC starter machine of an automobile.

Electrical machines in automobiles
In modern automobiles, such as electric or hybrid models, electrical machines ranging from a few watts to many kilowatts are being employed for a variety of applications. Small machines are being used for power windows, wiper drives, side mirrors, seat and steering wheel adjustment, and similar utilities. However, in electric or hybrid power trains and steering gears, higher power motors are used. These perform critical operations in the automobile; for example, the steering gear motor is of significant importance. Hence, timely fault diagnosis and close to realistic prediction of future operation is mandatory.

Keeping in view the increased utilization and critical operation of electrical machines, fault diagnosis and prognosis has become an area of serious and thorough investigation during the last decade. A variety of diagnosis techniques have been presented in the literature based on both intrusive and non-intrusive methods.

Motor current signature analysis is a popular approach for machine fault diagnosis. Like any other hardware, electrical machines are prone to wear and tear. This wear and tear is reflected in the way the current and voltage is drawn into these machines. Observation, collection, and analysis of this data are the basis of fairly extensive research into fault diagnosis algorithms. This research has addressed this problem from simple classifier-based models to more involved graphical models such as Hidden Markov models. Though yielding excellent results, these models do not scale to the environments where electrical machines are deployed.

Electrical machines are, in general, deployed in environments that are constrained across memory and computational requirements. Thus, designing a model that is robust, accurate, and simple enough to deal with the variety of problems that are encountered in such environments is a significant challenge. Ali et al [1] took a significant step in this direction by training Support Vector Machines in real time on sensor networks, but their model doesn’t reflect enough on how the results were achieved. In the following sections, we discuss in detail the problem, the methods employed in Fault Diagnosis research, and finally present our approach.

Detecting faults
Simple solutions built upon models that analyze sounds to distinguish between normal and faulty motors, though tempting, are not implementable in automobiles because of significant noise generation within an automobile engine. Additionally, sound recognition is a computationally expensive process that will be significantly difficult to download to an embedded machine with limited resources. Finally, different motors with faulty conditions are bound to produce a varying level of sound effects, and scaling our algorithm to arbitrary motors would be a herculean task.

Under normal conditions, the current sinking into electrical machines follows a certain pattern. However, if the machine develops a fault, the fault will appear in the machine current and produce transients. These transients can appear in the form of sharp impulses that instantly die down or appear as high frequency harmonics. In particular, as suggested by Zaidi et al [2], the transient harmonics can have a frequency of up to 12KHz. Locating and classifying these transients in a noisy environment using low memory space and with less computational power is a significant challenge. A suitable embedded system that can provide the desired results must be identified. A pictorial explanation of gear faults with varying degrees of seriousness is shown below, courtesy of Zaidi et el [2].

Figure 1: Gear faults

Fault diagnosis models
In the field of diagnosis, fault is a condition in which equipment starts to exhibit early signs of defect. If not mitigated, these defects worsen and equipment becomes unable to perform the desired task. This condition is called the failure state. The span between fault and failure is where the opportunity timely fault diagnosis lies. In the field of Electrical Machine Fault Diagnosis, the three primary methods generally employed are Data-Based, Model-Based and Signal-Based [2].

Model-based. Model-based diagnosis relies on a theoretical analysis of the machine whose model is used to predict fault signatures. The difference between measured and simulated signatures is used as a fault detector. Residual analysis and suitable signal processing are used to define a fault index.

Data-based. Data-based diagnosis does not require any knowledge of machine parameters and model. Rather, it relies on signal processing and clustering techniques. Data sampled from the actual machine are processed to extract a set of features that are clustered in order to classify them. Next, decision process techniques are used to define a fault index. AI and pattern recognition techniques are widely used to achieve the above purposes.

Signal-based. Signal-based diagnosis looks for known fault signatures in quantities sampled from the actual machine. These signatures are then monitored by suitable signal processing. Typically, frequency analysis is used, although advanced methods and/or decision-making techniques can be of interest. Here, signal processing plays a crucial role as it can be used to enhance the signal-to-noise ratio and to normalize data in order to isolate the fault from other phenomena and to decrease the sensitivity to operating conditions.

System Design
In electrical machines that our proposed system is monitoring, the presence of high frequency harmonics in current samples is evidence of faults. In order to identify these high frequency harmonics, we need to convert the signal from the time domain into the frequency domain where it can be analyzed for the detection of high frequency components. We do this by employing Fast Fourier Transform (FFT), the algorithm of choice for converting time domain signals into the frequency domain. In particular, we take a 512-point FFT of input current samples using fixed-point 16-bit arithmetic. In addition, a significant part of the problem is noise cancellation, which is an intrinsic part of the environments where electrical machines are deployed.

Noise Cancellation. If our original signal is f(x), and the Gaussian noise added to it is given by ϵ, then the noisy signal is given by

The goal here is to predict f(x) from g(x) .

Though extensive work has been done to denoise signals, an algorithm that scales to a real-time embedded environment is a significant challenge. This challenge is overcome by taking into account a simple property of Gaussian Noise, which is that it cancels out as you average it. Concretely, averaging out the input vectors as they are received delivers an input spectrum where noise has been considerably cancelled. Figure 1 illustrates the result.

Click on image to enlarge.
Figure 2: Denoising by averaging

Pre-filtering. One the most important parts of the FFT calculation is bit-reversal, the method by which spectral components are placed at their correct positions in the spectrum. The fastest way to accomplish this task is by storing a table in Flash and indexing it at the end of every FFT calculation. In the absence of noise, this is not a cumbersome task. But in the presence of noise, where the FFT samples are being averaged out up to 50 times, this still represents substantial work to be done by the processor in real time.

This bottleneck can be eliminated by pre-filtering the input signal for frequencies that are lower than 200Hz. The threshold 200Hz has been reached through experimental observations that suggest that in the case of faults, most transients have frequency components in the KHz range. Once the low frequency components have been removed, the only information left in the spectrum is of high frequency components. These components can now be averaged out without bit-reversal, since the low frequency spectral components have already been filtered out.

Fast Fourier Transform. Once filtered, the signal is fed to theFFT engine to transform the signal into the frequency domain. The signalis then added to the previously obtained FFT vector to average it outfor noise cancellation. This process is done a number of times, anddepends entirely on the signal-to-noise ratio. Once the signal has beenaveraged a particular number of times, a simple loop is required todetect a peak in the frequency spectrum that is higher than thethreshold. This detects the presence of high frequency components.

Target environment
Thedeveloped system is primarily focused on fault detection of anautomobile starter motor. The maximum speed can go up to 2500 RPM;normally the speed remains within 1400~1500 rpm, or 25 revolutions persecond. This means that complete information about the gear can beacquired within 40ms. During this period (with a sampling frequency of10kHz), the number of acquired data points will be only 400. Thesampling rate of our ADC is tuned to 10,000 samples per second. Since weonly need 400 samples to model our frequency domain behavior, thissharply decreases our time sample space, something which is essential toperforming and storing the FFT, given the limited on-chip memory ofembedded devices.

To minimize cost while maximizing performance,we set benchmarks against different devices, and judged them on avariety of variables including clock speed, memory, andhardware-optimized components. In particular, we compared a digitalsignal processor (DSP), FPGA, and Cypress’ Programmable System on Chip(PSoC) devices. Concretely, our primary concerns with any device werecost, FFT benchmarks, pre-filtering, and memory.

FFT Benchmarks. As mentioned above, our sample space is a frame of 512 points in a16-bit unsigned integer format. Each of these samples is stored in theQ8.8 format, where the first 8 bits are for the integer part, and thelast 8 bits are used for the fractional part. We implemented the512-point FFT transform in C. The twiddle factors for the computationwere stored in the Flash to save on SRAM.

DSP versus PSoC algorithm implementation
Inour evaluation the PSoC family of devices exceeded the DSP architecturebecause of parallelization and onboard peripherals. For example, mostDSPs feature no ADC, nor can they filter the signal at the same time ascomputing the FFT since it is a single-core device. In contrast, thePSoC can accumulate filter results while simultaneously processing theFFT on the previously stored samples. This is possible because thefilter is implemented in a mini DSP that is independent of the maincore. The filter can then transfer results directly into memory usingDMA and later loaded into the FFT input space.

Click on image to enlarge.

Figure 3: System Flow Graph

Additional wiring costs
Theaddition of an external ADC entails cost as well as wiring needs. SincePSoC integrates the required peripherals available in a single chip, noexternal components for processing data are required.

Experimental setup
Thecurrent samples are obtained by coupling the ADC with a shunt resistor.The width of current samples is 8 bits each. Once 512 samples have beenobtained, the FFT routine is run to transform the time domain signalinto the frequency domain.

Click on image to enlarge.

Figure 4: Experimental setup

Thecurrent source is sampled by a Delta Sigma ADC embedded in the PSoCmachine. This is a high quality analog-to-digital converter with theadded capabilitiy of multi-sampling, i.e., the same ADC can be switchedto different sampling rates with different bit widths. This supportsdifferent scenarios where we may have to deal with multiple motors withdramatically different requirements.

While this method issignificantly powerful, this model for fault detection in electricalmachines has significant problems when it comes to dealing withtransients that are in the form of very sharp receding impulses, sincethe FFT fails to identify sharp vanishing impulses in the frequencyspectrum. A loss of information occurs at this stage, which can createsignificant hurdles in designing a system that can identify faults inelectrical machines.

This problem can be addressed by employing aWavelet Transform, an efficient technique to resolve time domainsignals into the time-frequency spectrum while preserving informationrelated to sharp impulses as well as high frequency harmonics.

Bycarefully designing features and using machine learning methods,significant improvements can be made in fault diagnostics in electricalmachines. Another trend that has recently emerged is the use ofgraphical systems for fault diagnostics and prognosis, first reported byZaidi et el [2], who used Hidden Markov Models for this purpose. Thesemodels provide a significant challenge in their porting to embeddedsystems because of extensive usage of computational resources.

1.“A Micropower Support Vector Machine Based Seizure DetectionArchitecture for Embedded Medical Device”s by Ali Shoeb, Dave Carlson,Eric Panken Timothy Denison. Published in the Proceedings of 31st AnnualInternational Conference of the IEEE EMBS, Minneapolis, Minnesota, USA,September 2-6. 2009

2. “Fault Diagnosis and Failure Diagnosisfor Electrical Machines” By Syed Sajjad Haider Zaidi – Dissertationsubmitted to Michigan State University – 2010

Salman Javaid is a graduate student in Electrical Engineering at the NationalUniversity of Science and Technology, Pakistan. He has been working withCypress' Programmable System on Chip design for the last year. Hiscurrent research involves designing robust and accurate embedded designsfor fault diagnostics in electrical machines using Cypress' PSoC.

Syed Sajjad H Zaidi is the Head of Electronics and Power Engineering Laboratories in thePakistan Navy Engineering College (PNEC, Karachi), National Universityof Sciences and Technology (NUST), Pakistan. He has a doctorate degreefrom Michigan State University in the electrical machines faultdiagnosis and prognosis using non-intrusive methods. He specializes inElectrical Machines, Signal Processing, Pattern Recognition and TimeFrequency transformation. His research interests in the areas ofcondition-based maintenance, fault prediction and estimation, systemengineering and designing.

Ahmed Majeed Khan is anengineer experienced in working with cross-functional groups to push theenvelope of technology implemented in electronic products. Mr. Khan isfrom a consumer electronics background and his expertise includesembedded systems and wireless multimedia communication. He personallydeveloped and led teams to develop several high volume, high qualityproducts. Currently, Mr. Khan is an engineer at Cypress SemiconductorCorporation, where he developed and assisted the development of multipleprogrammable solutions. He also established CY-SEECS Joint ResearchCenter at National University of Sciences and Technology (NUST) inIslamabad, Pakistan. Mr. Khan holds an MS in Electrical Engineering fromMichigan State University and has over 8 years of experience workingwith microcontrollers and embedded applications.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.