Much more control

If you’re in any doubt about using fuzzy logic in hybrid control solutions, don’t hesitate – but do use a decent environment By Jim Tung

Why would you want to use a fuzzy logic design environment? It’s a fair question! And, the answer is – because fuzzy lets you put more control in control. It also makes these applications easier, faster, and less expensive to develop! Further, fuzzy logic implementations usually require less hardware and smaller packages than non-fuzzy!

The simple fact is that today, given the right tools, fuzzy logic applications are powerful, easy to build, and easy to integrate with non-fuzzy applications. You can add fuzzy `pieces’ to a conventional design – or build a fully fuzzy alternative design. You can even simulate solutions that have varying degrees of fuzziness.

The key is having state-of-the-art tools – tools that are graphically orientated, generate standard C code, and support off-the-shelf real time operating systems. You also need to be able to wire together systems out of blocks of control (fuzzy and conventional) using drag-and-drop icons – and to simulate the result. And, the best environments are those that completely integrate all of these.

Integration means engineers don’t have to manually convert data when going from design tool to design tool, or from design to simulation. They also don’t have to write their own software to handle this conversion. And, they needn’t learn different user interfaces. All are time, money and effort-savers.

The value of the integrated approach is best illustrated in a gain scheduler. Here, the system performance algorithm must be altered in accordance with multiple inputs that themselves vary. Consider aeroplane wing flap control. One set of parameters might be used on take-off, another while climbing, and a third while cruising. The scheduler looks at things like velocity, thrust and angle of flight, and assigns the control algorithm. Using fuzzy logic allows the control system to better evaluate which stage of flight the plane is in.

Here, there are roles for both fuzzy and non-fuzzy logic. On the one hand, the rules to apply at each stage may be very precise. On the other, the rules for choosing which stage you are in may be less precise. So you might have one fuzzy block that turns on or off any of several mathematically-derived control blocks. These blocks may be part of a prior generation of this application, and need only be reconfigured with the fuzzy block as the scheduler.

A good candidate for introducing fuzzy logic is a PID algorithm in which the constants are applied as coefficients in an equation that controls motion. Clearly, the choice of coefficients alters the behaviour of the controller, and you can choose coefficients that correspond to different control characteristics.

In lift control, you might want tight control when stopping at a floor, but loose control (to conserve energy) when traveling up the shaft. PID is also interesting because a fuzzy inference system can also supply a single output membership function based on the linear combination of three (or more) input variables.

Such a fuzzy inference system is called a Sugeno system (after the fuzzy logic pioneer, Michio Sugeno). Let’s suppose there are only two sets of control characteristics – near a stop, and not near a stop . For each input (ie, value of P, I, or D) Sugeno’s method stipulates that: If input is high, then output is defined as [q*input + r], where q is a gain operating on the input, and r is a constant.

Input values are then expressed in degrees of trueness – as membership functions. The outputs (ie, Kp, Ki, Kd) are expressed as a single control action (ie, a braking signal). Here the control action is crisp. Either one set of K values applies, or the other. The designer gets the best of both worlds – a fuzzy inference engine to interpret ambiguous inputs and handle non-linear control, and a linear controller able to take precise actions.

Once the designer is satisfied that a sufficient number of inputs have been accounted for and those inputs mapped to outputs it’s time to design the control system. In this stage it’s helpful to use a diagramming and simulation tool, such as the MathWorks’ Simulink, in which systems can be defined on-screen, given properties, and `wired’ together.

Being able to simulate the tool within the same environment improves your confidence that the design will work. You may not have to build a prototype; but if you do, it will probably behave much more predictably then if design data were thrown over the wall.