Global TMW:
Login  |  Register          Free Newsletter Subscription
Subscribe
Email
Print
Reprint
Learn RSS

Consider Fuzzy Logic in Test Applications

A fuzzy-logic controller can cut your calibration time on an RF monitoring system when you implement multiple nonlinear components.

William Drago, L3 Communications - Narda Microwave East, Hauppauge, NY -- Test & Measurement World, 10/15/2000

Despite its widespread use in control systems, you rarely see fuzzy logic used in test applications. I used fuzzy logic to control a nonlinear amplifier in my test system, and it worked, but it was like trying to move a pebble with a bulldozer. Although fuzzy logic wasn’t the best choice for my application, it can be a good choice for applications involving multiple nonlinear components.

At my company, we manufacture an antenna-monitoring system for cellular base stations. The system, essentially a dedicated spectrum analyzer, monitors a transmitter’s signal quality at frequencies from 824 MHz to 894 MHz.

Before we ship a monitoring system, we calibrate it with known power levels generated by a known ATE system (Fig. 1). The ATE system consists of an RF signal generator, an RF amplifier, and an RF power meter. A PC running HP VEE (now renamed Agilent VEE) controls the signal generator and power meter over an IEEE 488 port. The PC communicates with the UUT over a
serial port.

In concept, the calibration process is simple. The ATE system sets the power level for input to the UUT, then reads its output. The ATE system calculates correction factors that it sends to the UUT, and the UUT reports the correct value. The calibration process requires the ATE system to change the UUT’s input power in 1-dB increments.

Not a Straight Line

Unfortunately, nonlinearity in the RF amplifier’s gain complicates the process. If the gain were linear, then a 1-dB change in input power would always produce a 1-dB change in output power. Instead, a 1-dB change can produce a change in output power by as much as 3 dB. Figure 2 shows a typical curve of gain vs. output power.

   The ATE system’s software corrects any deviation from the desired input power level by adjusting the RF signal source’s amplitude while the power meter measures the amplifiers output. At power levels below 0.1 W, the RF signal source’s output drives the UUT directly. Therefore, a 1-dB change in the RF source’s power level results in a 1-dB change at the UUT’s input. When the UUT’s input power must exceed 0.1 W, however, the ATE system switches on the power amplifier. Now, the ATE software needs to compensate for the amplifier’s gain nonlinearity.

I had several choices for adjusting the UUT’s input power to get the desired output power. I could plot the amplifier’s gain vs. power (Fig. 2) and calculate a curve-fitting algorithm in the ATE software to linearize the gain. Then, the software would “know” the gain of the amplifier at each particular point and set the signal generator’s output accordingly. But unfortunately, we have several amplifiers on the production line. A test operator would have to intervene and tell the software which amplifier’s output power to linearize.

TMW00_1015F3fig1.gif (14955 bytes)
Figure 1. A PC controls a power meter and signal generator to adjust the amplifier’s output power.
TMW00_1015F3fig2.gif (21176 bytes)
Figure 2. The RF power amplifier’s gain is nonlinear.
As another option, I could have assumed the amplifiers would have a linear gain throughout their output power range. The software could eventually find the correct power level after a series of overshoots and undershoots. I tried this method, and it works, but it has problems.

For example, I was unhappy with the time required to reach the desired power level because the ATE system required about 11 adjustments to bring the amplifier’s output to within tolerance. (Each adjustment required about 3 s.) I needed some kind of “smart” software that, by being aware of the amplifier’s nonlinear gain, could minimize the number of adjustments required to reach the desired power level. By using fuzzy logic, I reduced the number of adjustments from around 11 to four or five, cutting calibration time by about 20 s per production unit.

Make the Rules

Using a set of simple rules and simple math, fuzzy logic can bring a nonlinear system into equilibrium just as quickly as mathematically complex traditional methods such as PID (proportional integral derivative). You can implement a fuzzy-logic algorithm in hardware using specialized ICs or, as in my application, purely in software. In either case, the algorithm is called a fuzzy-logic controller. (See “What Is Fuzzy Logic?” below.)

The ATE system needs at least two pairs of power settings to calculate the amplifier’s change in gain. Each pair consists of a known setting (the signal generator’s output) and one measurement (the amplifier’s output). To set a power level, the ATE software starts with a base setting of the signal generator’s output level (Pin). The software then calculates the amplifier’s gain, Pout (dB)–Pin (dB), where the power meter measures Pout.

To calculate a change in gain, the software changes the signal source’s output power and then recalculates the gain. If the gain between the two input power levels doesn’t change, then the amplifier shows a constant gain between those two input power levels.

But what if the gain changes when the amplifier’s input power changes? The amplifier’s gain will have either a positive or negative nonlinearity. The sign of that nonlinearity goes to the fuzzy-logic controller, which assigns a label to the amplifier’s linearity. I used names such as positive for an increase in gain, negative for a decrease in gain, and zero for no change in gain. The actual magnitude of the nonlinearity isn’t important, the fuzzy-logic controller just needs to know the direction the gain is headed.

At the same time, the ATE software tracks the difference (error) between the desired and measured power level. The ATE software assigns a label to the error that describes the error’s sign and magnitude. The labels correspond to predefined overlapping ranges of values, which form the basis of the fuzzy logic rule set. A rule, for example, might say:

IF nonlinearity is Positive AND Error is Negative THEN Output Correction is Small Positive.

The rule tells you that a negative error needs a small correction in the positive direction. The fact that the nonlinearity is positive means that the amplifier will produce more power output than you would expect. Therefore, the ATE system should correct for the error through a change in level smaller than if the nonlinearity were zero (linear gain). If the amplifier gain were linear, however, then the fuzzy-logic controller applies the rule:

IF nonlinearity is Zero AND error is Negative THEN Output Correction is Positive.

TMW00_1015F3fig3a.gif (17574 bytes)
Figure 3. VEE code uses the fuzzy-logic controller’s output to set the signal generator’s output level.
TMW00_1015F3fig4a.gif (12691 bytes)
Figure 4. A fuzzy-logic algorithm applies rules to the amplifier’s output and linearity to choose settings for the amplifier.

Figures 3 and 4 show how the fuzzy-logic controller integrates with the ATE software. The code in Figure 3 takes the output of the fuzzy-logic controller and sets the new output level of the RF signal generator. The code in Figure 4 is a blowup of the “Call Fuzz” box in Figure 3. The fuzzy logic rules reside in the Rules box of Figure 4. After applying the rules, the fuzzy-logic controller turns on one of the possible outputs for the “De_Fuzzify” box.

Seems Like Overkill

After completing the project, I concluded that fuzzy logic wasn’t the most appropriate solution for linearizing the gain of the RF amplifier. Although fuzzy logic worked in my application, it made it more complicated than necessary. I needed a fair amount of code to build this simple fuzzy-logic controller. If my application had two or more nonlinear components instead of just one, it would have been a more efficient solution. Then, I would have to add only what’s required to handle the rules for the additional nonlinear component or components—with relatively little additional coding.

Fuzzy logic works well, and I wouldn’t hesitate to use it again in another application. Any application with nonlinear components is a suitable candidate for a fuzzy-logic control. The more nonlinear components a system has, the harder you’ll find traditional techniques to use. In a fuzzy-logic control system, more nonlinear components just means you must add more rules. In traditional control systems, more variables mean a more complex mathematical model.

In this application, I could have used a simpler technique to compensate for an amplifier’s nonlinearity and adjust its input power according to the measurements. I just had to measure the amplifier’s linearity on the fly—that is, at the same time the software was trying to achieve the desired power level. Then, I could have passed the measurements to a simple calculation instead of on to the fuzzy-logic routine. But I didn’t realize this before I designed the fuzzy-logic controller. That method would have worked just as well, and I wouldn’t have had to spend two days learning about fuzzy logic. T&MW

William Drago is a test engineer with L3 Communications—Narda Microwave East. He is currently pursuing a bachelor’s degree in computer science at the New York Institute of Technology. E-mail: william.drago@l-3com.com.

What Is Fuzzy Logic?

The beauty of fuzzy logic is its ability to operate between the lines. It blurs the edges of distinction, providing a crisp output in response to vague inputs while also being simple to implement. Fuzzy logic is a plain-and-simple logic in which the definitions of one and zero overlap.

Rather than use a mathematical model, fuzzy logic incorporates a set of rules based on what you know about controlling a system. If, for example, the temperature in your house is too hot, you need to cool it. If the temperature is too cold, then you need heat. And if the temperature is comfortable, you do nothing.

In traditional logic, the definitions of cold, hot, and comfortable have distinct boundaries. You might define cold as the range from 688F and below, hot might be 768 and higher, and comfortable might be 698 to 758. If the temperature rises from 758 to 768, the air conditioner turns on to its maximum ability.

In a fuzzy system, comfortable might still be 698 to 758, but hot would be, say, 728 and higher. A 38 overlap exists in which the system considers the temperature somewhat comfortable and somewhat hot at the same time. The air conditioning doesn’t come on to maximum, but instead, somewhere between maximum and not at all.

By combining traditional logic with overlapping rather than distinct input boundaries, fuzzy logic provides a means of controlling systems that could be very difficult to model mathematically.—William Drago

Other Resources
For more descriptions of fuzzy logic and how to design a fuzzy-logic controller, visit:
“Greg Goebel’s Fuzzy Logic Primer,” vectorsite.tripod.com/ttfuzzy.html
“The Seattle Robotics Society Fuzzy Logic Tutorial,” www.seattlerobotics.org/encoder/mar98/fuz/flindex.html

Email
Print
Reprint
Learn RSS

Talkback

We would love your feedback!

Post a comment

» VIEW ALL TALKBACK THREADS

Related Content

Related Content

 

By This Author

There are no other articles written by this author.

Sponsored Links



 
Advertisement
SPONSORED LINKS

More Content

  • Blogs
  • Podcasts

Blogs

  • Martin Rowe
    Rowe's and Columns

    August 29, 2008
    LEDs, Tubes, and Clay
    The Champlain Valley (Vermont) Exhibition, which runs until August 31, has many of the usual things ...
    More
  • Rick Nelson
    Taking the Measure

    August 28, 2008
    What’s your battery IQ?
    What features do you look for in a battery, and do you know which battery technologies to choose to ...
    More
  • » VIEW ALL BLOGS RSS

Podcasts

Advertisements





NEWSLETTERS
Click on a title below to learn more.

Test Industry News (3 Times Per Month)
Machine-Vision & Inspection (Monthly)
Communications Test (Monthly)
Design, Test & Yield (Monthly)
Automotive, Aerospace & Defense (Monthly)
Instrumentation (Monthly)
Resource Center E-Alert (Monthly)
©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