Application Notes

APN03V20-0892

Introduction
Fuzzy Force Controller
Cotrol Objective
Control System
Definition of Input/Output Variables for Unit B
FIU Source Code of Unit B
Input/Output Response
Comments


Servo Motor Force Control

INTRODUCTION

Servo motors are widely used in the field of motion control in factory automation. The control target can be position, speed, or force, among others. For this example application we take force as the control variable.

In order to implement force control, we need to know the compliance (response) of the controlled object to force. The feedback gain in the control loop changes as a function of compliance.

Grasping a range of objects from, for example, a soft tennis ball to a hard steel ball using conventional servo control is extremely difficult. The traditional control model does not handle a variety of objects with differing material characteristics very well. The system can become unstable. Fuzzy logic, with its inherent flexibility, can be employed effectively as an alternative in this situation.

Back to Top 

FUZZY LOGIC FORCE CONTROLLER

Control Objective

Grasp objects of various compliance, ranging, for example, from a soft tennis ball to a hard steel ball with a constant force.

Figure 1 Servo Motor Force Control

Back to Top

Control System

The control block diagram is shown in Figure 1. Output force applied to the object is measured by a sensor and compared against a reference force to obtain the difference. A control gain Kg is applied to diminish this force difference. This gain also varies as a function of the compliance of the grasped object. Thus, control gain Kg is affected by two factors: (1) the compliance of the object and (2) the difference between a reference force and the measured force. Branches coming off the error (e) node and speed (v) node of the above diagram are expansions of those nodes, and represent variables to be used to determine the control gain. They do not represent additional control paths. We can write the control gain and diagram its components as shown in Figure 2 below.

 Kg = Ks · Kf

 Figure 2 Control Gain

Ks (compliance component) is a function of Ke. Kf (force component) is a function of error e and its time derivative é. Both can be inferred by fuzzy logic.

The compliance Ke is determined by injecting a speed command n into the servo motor and measuring the output force f. Compliance is expressed as follows:

Ke = df / dx = (df / dt) / (dx / dt) =D f / n

 We obtain

Ke = (fk - fk-1) / nk-1

Compliance can be thought of as the change in force (df) required for a given deformation (dx) of an object. For example, a tennis ball has a large compliance because the force needed to initiate deformation is small, but increases significantly as the deformation process proceeds. The change in force from initiation to termination is large. At the other extreme is the steel ball, which has small compliance. Although the force required to initiate deformation is large, the force to continue deformation does not change significantly. Consequently, the change from initiating to terminating force is small.

It is known that the control gain Ke is the reciprocal of the compliance Ke , so Ks can be inferred from Ke by the following fuzzy rules:

If Ke is small then Ks is large

If Ke is large then Ks is small

 These two rules make up the fuzzy inference unit A which connects Ke with Ks .

Back to Top 

Definition of Input/Out Variables for Unit B

Now let us consider fuzzy inference unit B, inferring Kf from e and é(Figure 2). The two inputs into Unit B are error e and its time derivative é. e is the difference between a reference force and the applied output force. Labels and membership functions for e and é are defined as shown in Figure 3a, 3b respectively. Figure 3c shows the labels and membership functions for the output variable Kf.

 Figure 3a Labels and Membership Functions of Input Variable e

 

 Figure 3b Labels and Membership Functions of Input Variable é

 

Figure 3c Labels and Membership Functions of Output Variable k f

 

Back to Top 

FIU Source Code of Unit B

The following is the source code of Unit B written in FIDE's Fuzzy Inference Language (FIL). Note that in the definition of input variable Error, the value of P_VerySmall is given as (@-3, 0, @0, 1, @50, 0), and that of N_VerySmall is (@-50, 0, @0, 1, @3, 0) . We use -3 and 3 instead of -1 and 1 respectively because the data range of Error must be accommodated in a resolution of 8 bits. This means the smallest interval of Error is 600 / 256 ~ 3. The membership functions of these fuzzy sets are shown in Figure 3a, 3b, 3c as we have seen.

To FIU  Source Code

Back to Top

Input/Output Response

Figure 4 shows the response surface of the FIU defined above. This surface is obtained by using the Analyzer tool provided in FIDE.

 Figure 4 Input/Output Response Surface of Unit B

 Back to Top

COMMENTS

Through experimentation, we can obtain a set of rules to infer compliance Ke from speed n, and the measured force f. The rules are in essence as follows:

If n is large and Df is small, then Ke is very small

If n is large and Df is medium, then Ke is small

If n is large and Df is large, then Ke is medium

If n is small and Df is small, then Ke is medium

If n is small and Df is medium, then Ke is large

If n is small and Df is large, then Ke is very large

The label names used here give an intuitive sense of how the rules apply. However, even though label names are the same for different variables, the fuzzy sets associated with these labels may be different. For speed n, the label large may be a fuzzy set as shown in Figure 5a, and for compliance Ke,, label large could be another fuzzy set as shown in Figure 5b.

Figure 5 Different Meanings of Large for Different Variables

The ranges of these variables can be determined by experiment on the devices and objects of interest. For example, compliance data gathered from a soft tennis ball and a hard steel ball can be used to define large and small labels respectively for variable Ke.

If we use an FIU to infer compliance Ke , the control gain function now becomes three FIUs and an operations block (FOU) as shown in Figure 6. The FOU implements Kg = Ks · Kf . Using Fide's Composer capability, these four blocks can be combined into a single system for analysis and simulation purposes.

Figure 6 FIUs and FOU Combined into a Fuzzy Logic System

Back to Top

 For Further Information Please Contact:

 Aptronix Incorporated
2040 Kington Place
Santa Clara, CA 95051
Tel (408) 261-1898
Fax (408) 490-2729
FuzzyNet http://www.aptronix.com/fuzzynet
Email: fuzzynet@aptronix.com

Back to Home 


Weijing Zhang, Applications Engineer.
Copyright © 1992 by Aptronix Inc.
Revised: October 21, 1996.