Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Document Type: Tutorial
NI Supported: Yes
Publish Date: Oct 8, 2009


Feedback


Yes No

Related Links - Developer Zone

Related Links - Products and Services

PID Control, Signal Processing and More with Real-Time Math in LabVIEW

0 ratings | 0.00 out of 5
Read in | Print | PDF

Overview

PID is still workhorse control algorithm in the market, so much that even many of the model-based control algorithms are based on PID. Learn how to implement PID controllers as well as implement industrial signal processing using several models of computation.

Introduction

 

Over the last decade, machines have greatly improved along with the vast number of applications for which they are used, from household appliances to spacecraft. It is obvious that mathematics plays a major role in bringing these innovations to life. But many mathematical theories used today were discovered centuries ago, so what has changed?

The main new development engineers are using to advance technology is the ability to embed math algorithms in embedded targets. One example is cars. Fifty years ago, car performance relied on hydraulics, mechanics, and thermodynamics. Today, a car has more than 50 (and increasing) small computers called engine control units (ECUs) that control every functional task on the car, from spark firing to cruise control to rearview mirror positioning.

When choosing which tools to implement the algorithms, you may consider different approximations, such as text-based and graphical tools. Each offers unique benefits and drawbacks. For example, when deciding between a high-level design package or a low-level C-based programming environment, consider that design software packages have all the necessary mathematical functions, and converting the algorithm to a code that can be understood by an embedded target is a long process and prone to error. On the other hand, C-based programming is very close to the hardware implementation, but it may lack the necessary math functions, so you end up writing and validating them yourself, which also takes a long time. Real-time math brings together the best of both worlds by combining high-level performance tools with the ability to deploy the same algorithms to embedded targets. This article examines the challenges of applying math on embedded systems with special emphasis on control and monitoring applications.

Control

It is estimated that more that 95 percent of the industrial controllers used in industry are based on the proportional integral derivative (PID) algorithm. Although the basic algorithm is the same, there are a number of “flavors” or small differences on PID controllers as well as different execution targets to implement them such as programmable automation controllers (PACs), programmable logic controllers (PLCs), microcontrollers, or field-programmable gate arrays (FPGAs).

Figure 1. Textual-Based Simple PI Control

NI LabVIEW software provides a programming platform capable of running several models of computation such as text-based math, data flow, or statecharts, which can run not only on desktop machines but also in embedded targets. LabVIEW offers the same tools as design packages but removes the burden of translating algorithms so they can be understood by hardware targets. You can use high-level math to enhance PID controllers with features such as integral anti-windup, gain scheduling, setpoint filtering, and more.

Control Case Study: Recursive System Identification

A specific example of improving PID controllers is the use of recursive system identification to change PID gains while the controller is running. Engineers have long used system identification techniques to identify and help with modeling. This process has typically been offline – the engineer obtains all the recorded data and then applies the system identification techniques. But the complexity of the system identification makes it difficult for embedded systems to run these algorithms. Tools capable of running real-time math, such as LabVIEW,and powerful embedded processors now help you apply these techniques so processors that run the system identification task can update controller gains.

Timken used a similar technique to automatically center a bearing on a rotating table. The main purpose of this system was to replace the human operator with an embedded system capable of centering the bearing faster and in a smaller tolerance so the bearing can be measured by a high-precision machine.

Figure 3. Timken Bearing Center Control

The control system was capable of tracking the location of the bearing and pushing it to center it. While pushing the bearing, the control system read parameters that allowed it to estimate friction and mass, so the next control iteration was closer to the final position.

Monitoring

Another important application for real-time math is the use of embedded systems for machine health monitoring. You can apply machine health monitoring to a wide range of applications, from household appliances like washing machines to structures such as bridges spanning several miles. Many of these applications involve signal processing, with frequency analysis algorithms being the most widely used. The fast Fourier transform (FFT) is the basic frequency analysis operation. Frequency analyses are useful for analyzing stationary signals where frequency features do not change over time. For example, an 1800 rpm electric motor-driven pump or fan running at a constant speed produces vibration signatures whose frequencies do not change over time.

Vibration measurements from proximity probes, velocity probes, accelerometers, and speed sensors provide key mechanical health data used for machine condition assessment and prediction. These dynamic measurements along with others such as electrical power signatures, dynamic strain and torque, and acoustics offer a sensor signal fingerprint of an industrial machine’s mechanical health. To interpret these fingerprints, signal processing techniques are used to extract features from the fingerprint that are indicative of machine component health.

 

Some vibration signals contain frequency features that persist over a long period of time and whose frequency content is limited to a narrow range or bandwidth. For example, rub and buzz noise persists in time and has limited frequency content. Some vibration signals have a short time duration, that is they are transient in nature, and have a wide bandwidth. Examples include impacts within failing roller element bearings. Some have a short time duration and narrow bandwidth, such as the decayed resonance in a run-up or coast-down sequence of turbomachinery. Still other frequency features have bandwidth that varies over time such as imbalance vibration in a variable speed machine.

 

Monitoring Case Study: Donghai Bridge

In many of these applications, embedded devices must continuously monitor signals, typically vibration, and record and analyze the data. Saving the data when an event occurs can helps prevent future machine failure by providing the information on what went wrong. The Donghai Bridge, which links Shanghai and Yangshan in China, uses a health monitoring system. After three and a half years of construction, this bridge stretches across the East China Sea with a full length of 32.50 km, a 25.32 km portion of which is above water.

To monitor the bridge’s health status better, some informative quantities, specifically the resonance frequencies, need to be tracked in real time. The design of the algorithm to estimate these frequencies is based on updates to stochastic subspace identification (RSSI), so data can be sampled from multiple channels and possibly decimated. The decimated data are then fed to the RSSI algorithm. This algorithm is updated on real time as the data acquisition is being acquired

Figure 4. Donghai Bridge - Shanghai/Yangshan, China

Real Time math benefits

The use of math on embedded devices has increased exponentially over the last decade, creating a gap between design math tools and embedded programming environments. With the NI LabVIEW programming platform, engineers can develop real-time math applications to bridge the productivity gap between design and the embedded target.

To learn more

Advanced control using Real Time math webcast

LabVIEW for industrial control and monitoring applications

 

0 ratings | 0.00 out of 5
Read in | Print | PDF

Reader Comments | Submit a comment »

 

Legal
This tutorial (this "tutorial") was developed by National Instruments ("NI"). Although technical support of this tutorial may be made available by National Instruments, the content in this tutorial may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this content with each new revision of related products and drivers. THIS TUTORIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).