Advanced control blocks > Fuzzy Logic Control (FLC) function block

Fuzzy Logic Control function block execution

The nonlinearity built into the FLC function block reduces overshoot and settling time, achieving tighter control of the process loop. Specifically, the FLC function block treats small control errors differently from large control errors and penalizes large overshoots more severely. It also severely penalizes large changes in the error, helping to reduce oscillation.

This section describes how the Fuzzy Logic Control block functions.

Two membership functions

The FLC function block uses two membership functions: the input signals are error and change in error, and the output signal is the change in control action. The relations among these three variables represent a nonlinear controller. The nonlinearity results from a translation of process variables to a fuzzy set (fuzzification), rule inference, and retranslation of a fuzzy set to a continuous signal (defuzzification).

The two membership functions for error, change in error and change in output are negative and positive. The membership scaling (Seand SΔe) and the error value and change in error, respectively, determine the degree of membership.

Figure: Error membership functions
Figure: Change in error membership functions

The change in output membership functions are called singletons. They represent fuzzy sets whose support is a single point with a membership function of one. The membership scaling (SΔu) determines the magnitude of output change for a given error and change in error.

Figure: Change in output singleton membership functions

Four fuzzy logic rules

There are four fuzzy logic rules that the FLC function block uses for a reverse acting controller.

Table: DeltaV fuzzy logic rules

Number

Rule

Rule 1

If error is N and change in error is N, make change in output P.

Rule 2

If error is N and change in error is P, make change in output ZO.

Rule 3

If error is P and change in error is N, make change in output ZO.

Rule 4

If error is P and change in error is P, make change in output N.

Fuzzy Logic Control nonlinear PI relationship

The two membership functions associated with each input variable and three membership functions for the output variable makes the FLC function block nonlinear in its response.

For regions where the absolute error is greater than the error scaling factor or the absolute change in error is greater than the change in error scaling factor, the values for error and change in error are clipped at the error scaling factor and change in error scaling factor, respectively. The following figure shows an example FLC curve that illustrates how the change in controller gain is smooth and continuous using only two input membership functions and three output membership functions.

Figure: FLC function block's nonlinear relationship

The dark line shows the FLC function block's nonlinear relationship when the error is equal to the change in error. The straight line through the origin shows the linear relationship of a standard PI controller. As the error and change in error increase, the change in output of a standard PI controller increases linearly. Note that the gain of the FLC function block is similar to the gain of the PI controller when the error and change in error are small. The gain of the FLC function block increases gradually as the error and change in error increase.

The nonlinearity built into the FLC function block reduces overshoot and settling time, achieving tighter control of the process loop. To help anticipate a rapid change in the process with the FLC function block, derivative action is provided in the feedback path of the loop, as shown in the following figure.

Figure: Fuzzy Logic Control with derivative action

The FLC function block treats small control errors differently from large control errors and penalizes large overshoots more severely. It also severely penalizes large changes in the error, helping to reduce the oscillation.

Figure: Process variable oscillation example

The above figure depicts how an FLC function block reacts to overshoot and oscillation. At points B, D, and F, where overshoot occurs, the FLC function block applies stronger control actions to bring the variable back to the setpoint. At points A, C, and E, where large changes in error occur and are dominant, the FLC function block applies stronger corrective actions to reduce oscillation.

This type of nonlinearity allows the FLC function block to provide better control performance than standard PID control.

Establishing scaling factors

Tune can be used to establish the scaling factors (Se, SΔe, and SΔu). For a small control error and setpoint change less than a nominal value (ΔYsp), the FLC function block scaling factors are related to the proportional gain (Kp) and reset (Ti), which would be used in a PI block executing at a one (1) second scan rate (Δt) to control the same process. Refer to the following equations:

where:

SΔe = change of error scaling

Se = error scaling

SΔu = change of controller output scaling

Se0 = error scaling for a one (1) second scan rate

Beta is a function of process deadtime (DT) and ultimate period or time constant (TC) and has values in the following range:

The approximate formula for calculating beta is as follows:

The Fuzzy Logic Control function block accounts for the scan rate and recalculates the error scaling factor (Se), which depends on the scan rate appropriate to the function block scan (Δt).

The Fuzzy Logic Control function block is designed to be set up by Tune. However, if you choose to set up scaling factors manually, it is important to note that, in such a case, Tune will not set up derivative time for the FLC block, and you will not have manual access to the derivative term. In such a situation, the FLC block, effectively, becomes the PI controller. This can affect block performance significantly.

Note

The nominal setpoint change value for ΔYsp is one percent.

When the setpoint change is greater than the nominal setpoint change (ΔYsp), these scaling factors are internally increased by the Fuzzy Logic Control function block. This internal scaling is changed in the ratio of actual setpoint change to the nominal setpoint change. These larger scaling factors are used while the control error (PV–SP) remains large due to the change in setpoint. When the control error has returned to a small value and remains small for a period of time, the scaling factors used by the fuzzy algorithm are once again the block scaling parameter values.