Feature

New technologies fuel an embedded-sensor processing revolution

Processing tools for sensor-rich applications span from auto-zeroing op amps to digital signal controllers and microprocessors.

By Rishi Vasuki, Microchip Technology -- EDN, 7/10/2008

Related article:

Sensor-rich designs
By Robert Cravotta, Technical Editor
Designers are adding sensors and intelligent processing to fill the holes in their end-system capabilities, and it is yielding designs that cost less to produce and operate.

Acquiring and processing sensor outputs has long been the heart of many, if not most, embedded applications. While embedded-sensor applications have historically strived to improve measurement techniques, they are now beginning to deploy complex decision-making capabilities that exhibit likenesses to how humans think and act. An analysis of these embedded applications reveals common methodologies for processing sensor data. Knowledge of these methods and their roles within the context of an evolved embedded-sensor-processing framework helps designers identify a combination of newer, more efficient analog and digital components for processing sensor data within their application.

This article proposes an embedded sensor processing framework that consists of four stages (Figure 1). To ensure that a valid measurement has taken place, data acquired from the sensor or transducer is subject to compensation. Mathematical techniques, ranging from the simple to the advanced, are used to enhance and transform the measured signal into usable information about the real world. Finally, this information, used in combination with other knowledge and awareness gathered in the past and present about the system and its environment, enables complex decision-making that serves to reduce human involvement or intervention in the application.

Not all stages of processing noted in the embedded-sensor-processing framework are required in every application that uses sensors. The framework simply acknowledges the expanded breadth and depth of embedded sensor processing. While communication protocols are not explicitly shown in the framework, it is fair to assume that such communication exists in many systems at any of the four stages. Let us now take a detailed look at each stage, to understand the processing methods in use today.

The four stages

The objective of the data-acquisition stage is to digitize the output of the sensor or transducer. It is typical to employ a low-pass filter to band limit a time-varying signal, in order to prevent aliasing in later stages of processing. If the output of the sensor has low amplitude, amplification using operational amplifiers (op amps) or PGAs (programmable gain amplifiers) may be necessary. If a unipolar, single-ended ADC digitizes the sensor output, additional level shifting may be required "a priori" to bring the dynamic range of the sensor output to within the dynamic range supported by the ADC. Finally, an ADC (either stand-alone or integrated into a microcontroller) digitizes the sensor output. High ADC resolution and a high sampling rate may be critical in some applications, while not so critical in others.

The sensor-compensation stage can take on a variety of tasks. In summary, it involves the linearization of sensor outputs that exhibit nonlinear transfer functions; automatic calibration of the sensor; compensation for gain and offset errors; compensation for temperature variations; and incorporation of diagnostic utilities. PGAs and, more recently, auto-zero op amps can perform some functions in the sensor-compensation stage, such as linearization and offset compensation. Firmware programmed into microcontrollers can also compute polynomial expressions that represent linearized sensor output. While computation of such polynomials is not typically a time-critical task, some applications do desire high accuracy from such computation.

Depending on the sensor used, the deployed application and the surrounding environment, the information-enhancement stage can take on a variety of functions. For instance, an angle can be calculated using trigonometric functions, such as the arc-tangent function in position-sensing applications like steering-angle sensors. Displacement and velocity can be easily calculated using arithmetic functions in speed-sensing applications. An FFT (fast Fourier transform) algorithm detects a signature of the sensor output, in applications that detect vibrations or those that detect the presence and concentration of hazardous gasses or chemicals. In such applications, the frequency spectrum of the sensor output serves as a signature.

Digital-filtering functions help eliminate noise or isolate the frequencies of interest in many sensor applications. When it is hard to predict the characteristics of noise or interfering signals ahead of time, adaptive-filtering techniques are employed. A common theme across all of these techniques is that raw sensor data is being transformed into the information we originally sought to capture about the system or physical property.

A typical objective of the decision-making stage is to take action in order to eliminate, minimize or pre-empt human involvement or intervention. In order to be capable of making human-like decisions, the decision-making stage needs to be aware of variables in the entire system and the surrounding environment. Typically, information gathered from various sensors in the system will feed into this stage. Further, this stage may log a history of sensor output, events and system responses into memory.

Correlating information from multiple sensors helps determine the effect one variable has on another, motivating corrective action where necessary. In cases where there is uncertainty or ambiguity regarding the sensor output, model-based approaches may also be exercised in the decision-making process. In some applications, advanced algorithms and techniques, such as pattern recognition, self-organizing maps and predictive analysis, are useful in the decision-making stage. Pattern recognition in particular has taken on a variety of forms, from simple lookup tables or correlation algorithms to recognizing spectral signatures, to learning-based neural networks and hidden Markov models.

Example applications

A discussion of applications that are at various stages of the embedded-sensor-processing framework is in order. Most applications involving sensors need the signal-conditioning elements described in the data-acquisition stage. A large number of applications also require various elements described in the sensor compensation stage. However, embedded applications are indeed new to some of the techniques underlying the information-enhancement and the decision-making stages. In the past, some of the techniques described have often been the forte of offboard DSPs.

The advent of a variety of new sensor technologies, DSCs (digital signal controllers), and subsequent cost-effective and power-efficient implementations of these elements has fueled the use of more techniques within the information-enhancement and the decision-making stages of several embedded applications in the industrial, automotive, medical, safety, and security segments. Let us review some key embedded-application examples that span all four stages of the embedded-sensor-processing framework. We will also discuss prevailing techniques and newer trends emerging in the implementation of these designs.

Machine Health Monitoring: Prolonged use of any mechanical system leads to wear and tear. Often, moving parts such as motors in pumps, gearboxes in aircraft and cars, and rollers in conveyor belts cause vibrations in the entire system. Vibration and associated friction can cause the machine to heat up. The level of vibration and heat will also depend on how fast the machine is operating, how often the motion speeds are changed, how long it is operating continuously, as well as the ambient conditions. Under these circumstances, it is obvious that the wear and tear on the machine will cause it to stop normal functionality at some point in time. One critical question to answer is when. Can we predict the machine's downtime? Can we monitor the condition of the plant to ensure that we run maintenance procedures only at the appropriate times when the subsystem is most likely to break down? The objectives of these questions are two-fold: we cannot afford downtime and we cannot afford expensive maintenance schedules that increase our variable costs of operation.

To answer these questions, machine or plant health-monitoring applications mount vibration, temperature, and sometimes pressure sensors at critical locations in the machine. Using DSP operations such as the FFT to identify a signature of the vibration, the designer can help relate the frequency of vibration to a failure mode. Further—if one has access to test results or reliability information—data from multiple sensors and models, based on reliability information, can be used to predict the appropriate time for maintenance. The system can provide audio or visual indications to inform an operator of needed maintenance. Note that today such analysis is not always performed within the machine, but rather in offboard DSPs and computers.

The introduction of cost-effective and low-power DSCs, such as Microchip's dsPIC, and high-performance microcontrollers has brought DSP performance to a microcontroller-centric architecture, allowing designers to embed the intelligence directly near the sensor. Further, if these DSCs are also controlling the machine or motor, it becomes easier to track when and how long these machines have been in operation since the last round of maintenance was performed. Combined with data from the vibration sensor and the temperature sensor, maintenance dates may be predicted and a machine can be appropriately flagged for maintenance, without a maintenance engineer having to interrogate the vibration sensor using an offboard device that performs the same analysis.

Process Control Automation: When pouring cream into a cup of coffee, the human eye perceives an adequate change in the color of the stimulating liquid as well as a change in fluid level. The brain ensures that the hand does not pour more than required or cause a spill. The simple yet precise nature of this everyday task provides a perfect example of how the human brain receives visual messages from the eye and controls the pouring action of the hand. The eyes, the brain, and the hand act as one closed-loop control system. This demonstrates the heart of process-control automation and machine-vision applications.

The introduction of low-cost CMOS image sensors has driven a proliferation of cameras or vision sensors in process automation. The camera and the robotic arm in an assembly line act as the controlled sensor and actuator. A processor executes simple pattern-recognition algorithms to detect changes in image color. Additional sensors may be used to detect liquid levels or container weight. Image capture and storage may require some level of encoding or decoding (such as JPEG), while pattern recognition requires simple to complex compare-match events based on known frames of reference. The resultant actuation of stepper motors requires simple features commonly available on microcontrollers and DSCs.

Similar examples also exist in the automotive world. Vision systems used for aiding in lane navigation or parking also use vision sensors or cameras. Pattern-recognition algorithms detect the white or yellow markings on the road and use these as frames of reference, when monitoring the activity of other vehicles in the vicinity or calculating distance from other cars.

Biometric Identification: An increasing number of security systems are incorporating biometric identification. This class of applications, too, has benefited from the cost reductions in the image sensor market. A biometric identification system needs to detect the true identity of a person given a variety of choices. Just like humans, these systems are now beginning to recognize a familiar face or voice. In addition, fingerprints provide another signature unique to a person. Biometric identification systems are typically processing-intensive and based on a variety of pattern-recognition algorithms that require feature extraction and clustering, among other tasks. Voice-recognition systems use hidden Markov or proprietary models, and can incorporate training to improve the system's recognition accuracy.

Environmental Health and Safety: With growing concerns about industrial and automotive emissions and their impact on global warming, monitoring environmental health and safety is becoming more important for governments. Monitoring applications use several types of sensors, including a variety of gas, smoke and chemical detectors, temperature sensors, and others. Gas detectors have been in use in safety systems for years. Typically, a gas detector attempts to detect trace concentrations of specific gases.

Many gas-detection techniques utilize the FFT algorithm, and each gas has a specific signature in the frequency domain. Safety systems may not only detect concentrations of one or more gasses and chemicals, but also monitor changes in these concentrations over a period. Several such sensors may be placed in different parts of a city or state to monitor the environmental health in the area over time.

Correlating data across many such sensors provides us with knowledge of the changes in the larger area over time. If certain sensors record disparate data, indicating high or increasing concentrations of chemicals, it may point to a problem that can be traced earlier than normal. A common problem when attempting to detect multiple gases in safety applications is the generation of false alarms. These can be decreased by utilizing a network of gas sensors and recognizing patterns in their outputs at any given time.

Implementing the sensor framework

We have seen a variety of embedded applications that point to a trend toward sensor-based applications moving from making better measurements to providing human-like decisions. Let us now review some notes on the implementation of these applications. In the applications described above, often the prevailing implementation uses an off-board DSP or microprocessor. Recent introductions of many cost-effective DSCs with small form factors allow the DSP intelligence to be brought into embedded systems with sensors and enables autonomous decision making. It is noted that, while DSCs enable a single-chip implementation, this does not mean that analog components can be eliminated from the signal chain.

Even where DSCs can be used, the presence or absence of analog components very much depends on the amplification needs of the sensor output, ease of offset compensation, anti-aliasing filtering requirements and several other factors. Another aspect is that, historically, microcontrollers have always been able to execute an algorithm that used DSP techniques, albeit slower than DSPs. Users have tended to favor microcontrollers over DSPs where power consumption was an important factor. In recent times, pin-, peripheral-, tool- and sometimes code-compatible 16- and 32-bit microcontrollers and DSCs are enabling users to find and choose the solution appropriate for their application.

In summary, embedded sensor processing has broadened to include more techniques aimed at enhancing the sensor information and making human-like decisions. While both analog and discrete components, and microcontrollers and communication interfaces continue to play a key role in embedded sensor applications, DSCs are playing a key role in implementing cost-effective embedded sensor applications that exhibit human-like decision-making qualities. Using a compatible line of microcontrollers and DSCs can aid the designer when the objective is to create several products with incremental additions of features and functionality.

Author information

Rishi Vasuki is principal product marketing engineer with Microchip Technology’s Digital Signal Controller Division (DSCD), where he is responsible for systems analysis and product development for the Company’s dsPIC DSCs. In prior positions he has developed software, embedded firmware, development boards, and technical collateral for audio and security applications. He has a bachelor of engineering degree in electronics and communication from University of Mysore (1998), a master of science degree in electrical engineering from SUNY Stony Brook (2001), and is currently pursuing an MBA from the University of Phoenix. He regularly writes articles for the electronic trade press, and has been an active student member of the IEEE.



EDN Resource Center

ADVERTISEMENT

ADVERTISEMENT

Feedback Loop


Post a CommentPost a Comment

There are no comments posted for this article.

Related Content

 

By This Author

There are no additional articles written by this author.


ADVERTISEMENT

Knowledge Center


Events

ARM Developers' Conference
Dates: 10/7/2008 - 10/9/2008
Location: Santa Clara, CA

ARM Developers' Conference 2008
Dates: 10/7/2008 - 10/9/2008
Location: Santa Clara, CA

The 6th International System-on-Chip (SoC) Conference, Exhibit & Workshops
Dates: 11/5/2008 - 11/7/2008
Location: Newport Beach, CA

WinHEC 2008: Windows Hardware Engineering Conference
Dates: 11/5/2008 - 11/7/2008
Location: Los Angeles, CA

RoboDevelopment Conference and Exposition 2008
Dates: 11/18/2008 - 11/19/2008
Location: Santa Clara Convention Center, Santa Clara, CA

Submit an EventSubmit an Event




Technology Quick Links

EDN Marketplace


©1997-2008 Reed Business Information, a division of Reed Elsevier Inc. All rights reserved.
Use of this Web site is subject to its Terms of Use | Privacy Policy

Please visit these other Reed Business sites