circuitcellar.com
Magazine Support   Digital Library   Products & Services   Suppliers Directory 
 
 





 

Issue 103, February 1999
Truck Speed Limiter Control


by Constantin von Altrock

Start Control Requirements Mechanical Design Fuzzy-Logic Controller Implementation Results References & Sources

FUZZY-LOGIC CONTROLLER

Fuzzy logic is an innovative technology for solving multiparameter and nonlinear control problems. It uses human experience and experimental results rather than a mathematical model to define a control strategy.

As a result, fuzzy logic often delivers solutions faster than conventional control techniques. As well, fuzzy-logic implementations on microcontrollers are very efficient when it comes to code space and execution speed [1, 2].

The entire fuzzy-logic algorithm was developed, tested, and optimized using Inform’s fuzzyTECH software tool. This integrated design environment features automatic assembly code generation on all PIC families [3, 4].

Photo 1 shows the Project Editor featuring the structure of the fuzzy-logic system. On the left side, two input interfaces fuzzify the two input variables Acceleration and Speed_ Error.

The rule block in the middle contains all the fuzzy-logic rules that represent the system’s control strategy. On the right side, the output variable PMV_Set_Value is defuzzified in an output interface.

The linguistic variables are displayed in a variable-editor window, and the rules are shown in the Spreadsheet Rule Editor window (see Photo 2). Each linguistic variable contains five terms and membership functions (standard type) that are connected by a total of 12 fuzzy-logic rules. As a defuzzification method, the Center-of-Maximum (CoM) method is used [1].

All rules in the fuzzy-logic system let the designer define the best reaction (output variable value) for a situation. The situations are described by the combination of the input variables.

A number of different analyzer tools are used to verify the system’s performance. In the 3-D plot in Photo 3, the two horizontal axes show the two input variables, Acceleration and Speed_ Error. The vertical axis plots the output variable (PWM_Set_Value), which is the set value for the PWM unit on the microcontroller.

Rule 1, as shown in Photo 2, states that if Speed_Error = much_2_slow, then PWM_Set_Value = HIGH_DEC. This rule represents the engineering knowledge that if the truck is under the speed limit, no pressure should be applied to the cylinder. The membership function of the term much_2_slow is also shown in the respective variable editor in Photo 3.

The 3-D analyzer plots the transfer characteristic as a result of rule 1. In the front part of the curve, the value of the output variable is very low (color of surface light). As you proceed to the left along the Acceleration axis, the output variable value increases, which is a result of rule 6.

Rule 6 states that if Acceleration = HIGH_ACC and Speed_Error = much_2_slow, then PWM_Set_Value = HIGH_INC. This rule represents the engineering knowledge that in the case of a high acceleration, the result is medium pressure on the cylinder. This action ensures that the cylinder already contains some pressure in case the truck reaches the limit quickly. Without this rule, a speed overshoot would occur.