## Nonlinear control: All you wanted to know about fuzzy logic

** Rockwell Automation ** program manager Dave Carr and software project manager Jeff Shearer have published a 45-page white paper exploring fuzzy logic and how it helps engineers solve nonlinear control problems. Fuzzy logic provides an intuitive way to design function blocks for intelligent control systems, advanced fault detection and other complex applications.

*Nonlinear Control and Decision Making Using Fuzzy Logic in Logix* provides best practices for designing with fuzzy control and examines its benefits compared to conventional control methods. In addition, this document outlines how to develop fuzzy logic algorithms for the Allen-Bradley Logix family of programmable automation controllers, using the RSLogix 5000 FuzzyDesigner software package. The paper also introduces the newest features of the RSLogix 5000 FuzzyDesigner software package, such as fuzzy logic add-on instructions.

Unlike many introductions to the fuzzy logic topic, Carr and Shearer’s white paper provides five case studies showing fuzzy logic solutions for real-world applications. By showing how the engineers translated the applications’ control requirements into fuzzy algorithms, the authors turn what can be a very abstract subject into something readers can apply to their control designs.

One of the application cases detailed in the white paper is design of a fuzzy supervised proportional-integral (PI ) controller for the temperature in wet blend food process. The technology of wet blend food processing consists of a wet blender with screw augers rotating in a constant speed, a dry mix feeder, a water sprinkler, and steam heating of the processed dry mix / water mixture.

The process is typically controlled by three loops– water inflow, dry mix feeding, and the product temperature according to the recipe. Water control is not a problem and it is solved by the standard PI loop. The same solution is adopted for dry mix feeding. Both dry mix and water feeding are thus controlled well using a standard PID loop following the set-point given by the recipe.

The recipe of the thermal processing of the dry mix/water mixture defines the constant mass inflow of water, mass inflow of dry mixture of ingredients and specific temperature of the processed material. Source: Rockwell Automation |

The temperature control is not trivial and requires careful modeling and process analysis before the control algorithm is designed and implemented. A single setting of controller parameters does not satisfy control requirements for the whole spectrum of applied recipes.

One solution that does satisfy requirements over wide range of operating conditions is a nonlinear PI controller with scheduled gains, nonlinear feedforward (bias) action based on the desired temperature, and a conditionally running integral term. Design and tuning of this nonlinear PI controller was based on a detailed analysis of static and dynamic characteristics of the process.

The fuzzy-logic solution takes the form of an equation:

CV = K(Error +∫ Ki ⋅ Error ⋅ dt)+ Bias

where CV is the control variable Valve_Control and Error = Setpoint Temperature

Temperature is more sensitive to the control variable K when both the CV and temperature are low , so if the set-point is low, a low K gain is used to prevent the controller from having a large overshoot and/or oscillation. Conversely, if the set-point is high, a large K gain is used to prevent the controller from controlling too slowly. These rules are embodied in two fuzzy statements:

1. IF (Setpoint IS low), THEN (K IS small)

2. IF (Setpoint IS large), THEN (K IS large)

Due to the significant transportation delay between the control action and its effect on the temperature, integration should be stopped early if the temperature approaches the setpoint too quickly and if the temperature is already near the set-point. This prevents the controller from having a large overshoot. The fuzzy statements expressing these rules are:

1. IF (Error_Change IS small) AND (Error IS small), THEN (Ki IS positive)

2. IF (Error_Change IS NOT small) AND (Error IS small), THEN (Ki IS zero)

3. IF (Error_Change IS medium) AND (Error IS NOT small), THEN (Ki IS positive)

4. IF (Error_Change IS NOT medium) AND (Error IS NOT small), THEN (Ki IS zero)

The Bias variable provides a nonlinear feedforward static characteristic, and setting it is more complicated. A total of 8 fuzzy statements are needed to provide a single-valued piecewise continuous nonlinear value for all setpoint conditions:

1. IF (Setpoint IS zero), THEN (Bias IS B_3)

2. IF (Setpoint IS very_small), THEN (Bias IS B_4)

3. IF (Setpoint IS small), THEN (Bias IS B_7)

4. IF (Setpoint IS medium), THEN (Bias IS B_10)

5. IF (Setpoint IS big), THEN (Bias IS B_18)

6. IF (Setpoint IS very_big), THEN (Bias IS B_60)

7. IF (Setpoint IS extra_big), THEN (Bias IS B_100)

8. IF (Setpoint IS above_all), THEN (Bias IS B_100)

Properly applied, an algorithm based on such fuzzy rules can provide more reliable, stable, and precise control for such complex systems than conventional mathematics.

To download your copy of *Nonlear Control and Decision Making Using Fuzzy Logic in Logix* from the Allen Bradley ** White Paper and Literature Downloads ** Web page.

— *Edited by C.G. Masi , senior editor*