Learning From Examples to Compensate Nonlinearities in Electro-Mechanical Drives: a Fuzzy-Logic Approach P.J. Costa Branco* and J.A. Dente** Instituto Superior Técnico CAUTL/Laboratório de Mecatrónica (http://macdente.ist.utl.pt) Av. Rovisco Pais, 1096 Lisboa Codex, Portugal *E-mail:
[email protected] **E-mail:
[email protected] − Incorporate learning mechanisms into Abstract− electro-mechanical drives permits design systems with self-learning capabilities and produces more autonomous processes with some “intelligence” degree. This paper presents a control system that uses a fuzzy learning methodology to design an inverse-model compensation controller. The controller shows generalisation and learning capabilities to compensate non-linear terms that affect the system dynamics. To investigate the controller, an experimental system composed by an electro-hydraulic actuator is used. The system dynamic is marked by a dominant non-linear characteristic constituted by a dead-zone and hysteresys effects. The paper shows experimental results describing the real-time controller capability in compensate the nonlinearities of the actuator and learning to improve its performance in trajectory following. I. INTRODUCTION The industry is today in continuing development and advance stage of new processes and products. It combines the design and information systems to answer, in an optimal form, the constant changes in production stages and the market consumer. Most of actual processes are highly non-linear coupled. Their great interconnection originates high mutual interactions which increase the danger of instabilities. The processes present uncertainties at a structural level as too at the parameter level, they are multidimensional, and have high nonlinearities. So, there are difficulties in the application of the usual control methods. Control techniques as adaptive control and predictive control use linear or linearized models of the process to be controlled. These approaches are effective in compensate the structured uncertainty of the system. However, in some applications, the model representation is not accurate enough and it is difficult to use. The reasons are the complexity and non-linear relations between the state variables, changes in the model parameters and, sometimes, it is difficult to take account in model design some physical phenomena.
Usually, the model does not include aspects such as non-linear static characteristics, saturation effects, neglected time-delays, dead zones and hysteresis. The use of same mathematical model for all systems operation region does not permit the controller to modify the functional relation between the control variables in the manner to cancel new system operating modes that can deviate its response from the defined trajectory. So, it is important the integration of an intelligent component in the control system to increase its flexibility level. We denote by intelligent component the capability to extract relations from the process, change the relations to improve the control performance, and manifest reasoning and learning abilities. Learning systems can be employed to achieve intelligent control via knowledge acquisition. Some learning control systems have been addressed using neural networks in an inverse-model compensation perspective [1]-[8]. In this paper, we investigate the perspective of use fuzzy models [9] and fuzzy learning schemes [10] to design an inverse-model compensation control scheme. The learning capability of fuzzy models is employed to make the controller learn the inverse system dynamics and compensate the system unstructured uncertainties improving its performance in trajectory following. The control is achieved by a feedback-loop with a proportional controller, and a feedforward-loop constituted by an inverse fuzzy-model with unsupervised learning capabilities. The feedforward command is inferred by the extracted inverse model and it is expected that the feedback signal tends to zero as learning proceeds. We incorporate into the model some available knowledge about the system being controlled. This facilitates the model design and helps to accelerate the initial controller actuation. The control system is composed by a learning and a control cycle. During the two cycles, the inverse-model of the system has the capability of learn relations not incorporated into the initial model, change itself to characterise some new behaviour, and has generalisation capability. We present some experimental results concerning the performance of the learning controller in position
control of an electro-hydraulic actuator. The actuator contains non-linear characteristics such as a deadzone and hysteresis effects that are dominant in the low performance of the actuator. The control system is implemented in a PC with a 80386 CPU and an interface with A/D (analog to digital) and D/A (digital to analog) converters. At each control cycle, the learning process extracts the fuzzy inverse-model and generates a compensation signal. The experimental results show that the learning controller is capable of generalise the acquired knowledge for any new trajectory, it can acquire new knowledge about the system when its dynamic changes, and it progressively reduces the trajectory errors by compensating the nonlinearities. The paper is organised as follows. Section II presents the experimental system and describes its nonlinearities. In Section III, we resume the main steps of the fuzzy learning approach to extract the actuator model, and we show the inverse fuzzy-model of the actuator. Section IV describes the inverse-model compensation scheme. At last, Section V presents the experimental results with the run-time learning controller. II. EXPERIMENTAL SYSTEM CHARACTERISATION The electro-hydraulic actuator is composed by three subsystems, as shown in figure 1: 1. the first subsystem is made by a commercial electrical drive which controls the speed of a permanent-magnet motor; 2. the second subsystem is a hydraulic actuator connected with the first subsystem by the link between the motor and an hydraulic pump; 3. The last subsystem is a coarse position control implemented by an analogic proportional controller.
Hydraulic Piston
Pump Inverter +
PI
R S T
P.M. Motor
ω
K yref
+
Load Fx
Pl y v
Coarse proportional controller -
Fig. 1 Schematic diagram of the experimental system (d)- A hydraulic pump with fixed displacement; (e)- The hydraulic actuator controls a linear piston with 0.2m as maximal displacement; (f)- A mechanic inertial load denoted by Fx can be imposed to the piston. If we interpret the system as a black-box and inferring some simplifications, we define the piston position signal (y) as a function of the reference signal ( yref ), the motor speed (ω), and the linear speed of the piston (v). The pressure signal (Pl) is neglected because the load is an inertial one. The relation is presented in (1) with the system variables that better characterise the actuator behaviour. y = f ( yref , ω, v )
(1)
An experimental training data, composed by the variable set of relation (1), is used in the learning phase. To assure that the training data covers a significant part of the system working domain, we use a proportional controller in a closed-loop for piston position control. This controller is also useful to attenuate the influence of secondary variables in system dynamic. v [m/s]
Hysteresys effect
At follow, we describe in more detail the components of the electro-hydraulic actuator:
0.02 m/s ~ -700
(a)- The electrical drive system is made by an inverter with IGBT’s and current control; (b)- The synchronous permanent-magnet motor (P.M. Motor) is operated by the commercial electrical drive system (220V/ 1.2Nm/ ±3000 rpm); (c)- The speed control system of the P.M. motor is composed by a proportional-integral (PI) controller setted in factory for the motor;
ω [r.p.m.]
Dead-zone ~ +900
Hysteresys effect 500 rpm
Fig. 2 Non-linear characteristic of the hydraulic circuit.
y
(a)
ref 0.2 0.1 0
ω
(b)
y ref y
,y [m]
0
2
4
6
8
10 12 Time [s]
14
16
18
20
(r.p.m.)
2000 0 -2000
A. Overview of the Fuzzy Learning Process 0
v (m/s)
2
4
6
8
10 12 Time [s]
14
16
18
20
14
16
18
20
The system works into the dead-zone
0.2
(c)
In this section, we extract the inverse model of the actuator using a simple learning process introduced by Wang in [7] and explored by the authors in automatic modeling of electrical drive systems [9]. Following, we overview the learning algorithm.
0 -0.2
0
2
4
6
8
10 12 Time [s]
Fig. 3: (a) Reference signal and the measured position for a closed-loop control using only the proportional controller. (b) Evolution of the motor speed. (c) Linear speed of the piston showing the moments that the actuator works into the dead-zone. The actuator contains a non-linear characteristic in the hydraulic circuit that is responsible for its low performance. Figure 2 displays the non-linear characteristic. The figure reveals that the hydraulic circuit is characterised by the presence of a dead-zone between the motor speed (ω) and the piston displacement (v). It shows the asymmetric dead-zone localised between -700 r.p.m. and +900 r.p.m, and the phenomena of hysteresis out of the dead-zone caused by the friction effect. Figure 3 shows the dynamic behaviour of the closed-loop position control using only the proportional controller. Comparing figure 3(a) with 3(c), we see that when the motor speed is into the dead-zone, the hydraulic system stays desacoupled from the electric part. In this situation, the fluid debited by the pump is near zero and the piston stops (v = 0 ). So, into the dead-zone there is not command signal to the system. The use of a coarse controller, as the proportional one, helps us to put in evidence the high non-linear character of the electro-hydraulic actuator. The figure 3(c) shows that the piston follows the reference ( yref ) with an asymmetric time-delay caused by the nonlinear characteristic. III. FUZZY-LOGIC APPROACH FOR LEARNING THE INVERSE MODEL Fuzzy learning methods have been investigated by the authors to automatically extract models from electro-mechanical systems [10]. Problems as the choice of system variables dominating its dynamics and the premisse structure identification of the fuzzy models have been addressed in [11].
The learning algorithm considers each variable equally partitioned by symmetric membership functions of triangular type. The learning method uses the t-norm max to select the degree to which two fuzzy sets match. The fuzzy model uses rules with the form of (l ) expression (2) where R is the lth rule, x j the variables expressing the system's condition, and y the (l) output variable. The symbols A j are membership (l) functions and ω is the rule consequent part being a real number (fuzzy singleton). R
(l )
(l ) (l ) : IF x1 is A1 and x2 is A2
and xm is Am(l )
(l ) THEN y is ω
(2)
The firing degree of each rule is measured by expression (3). The membership values of each variable, defined for every linguistic term of rule l, are combined by the algebraic product operator (∗). The ' ' ' variables denoted by x1 , x2 , xm are the numerical
values of x1 , x2 , xm . µ ( l ) (.), , µ ( l ) (.) denote Am A1
The formulas the membership
, Am(l) .
(l ) functions attributed to the fuzzy sets A1 ,
µ A( l ) ×× A( l ) ( x1' , 1
m
, x
' m
∗ µ
) = µ A( l ) ( x1' )∗ 1
Am( l )
( x m' ) (3)
The working domain is partitioned in subspaces constituting each one a rule. The rules are composed by a fuzzy implication degree calculated by (4). In the equation, the operator "∗" is the inference product.
, x
µ A( l ) ×× A( l ) → B ( l ) ( x 1' , 1
m
' m
, y' ) =
µ A( l ) ( x 1' )∗ 1
∗ µ
Am( l )
( x m' )∗ µ B ( l ) ( y ' )
(4)
To extract the relations that model the system, we proceed as follows. For each numerical value x 'i and y 'i coming from the sensors, we calculate their grades in each attributed membership function. All variables are made by n grades that correspond to the number of
fuzzy sets partitioning their universes. The grade set of every variable constructs a vector with n possibilities. For all variables, we choose each corresponding fuzzy (l ) set Am looking for the highest degree into its possibility vector that is related with a fuzzy set. The fuzzy implication degree is calculated by the product operation rule, as described before. That rule with highest implication degree is chosen to define the pre-defuzzified output value ω( l ) .
can not define an inverse function, the model deteriorates.
c ∑ µ( R ( l ) ). ω( l ) l =1 Y= c ∑ µ( R ( l ) ) l =1
(a) 0.10 0.05 0
50
100 Time [s]
150
200
50
100 Time [s]
150
200
Error [%] +20 +10 (b)
0 -10
(5) Fig. 4: Learning the fuzzy inverse-model of the electro-hydraulic actuator. (a) Reference and model signal. (b) Error signal evolution.
The anterior learning algorithm is used to extract the inverse model characterised by the relation (6). The error between the reference position ( y ref ) and * ) is the signal inferred by the fuzzy model ( y ref computed by (7) when the learning process extracts the relation (8).
* = f *−1 (ω, v , y ) y ref
0
-20 0
B. The Fuzzy Inverse-Model of the Actuator
y ref = f −1 (ω, v , y ) * −y Error = y ref ref
yref
0.15
The inference method is based on centroiddefuzzification formula and combines all rule contributions in a weighted form, as shown by (5). In equation, Y is the inferred output, ω( l ) is the extracted response of rule (l), µ( R (l ) ) is the rule firing degree, and c the total number of rules.
* yref
y ref , y*ref [m] 0.20
(6) (7) (8)
We obtained two different experimental data sets: one set for the training phase and other to test the generalisation capability of the extracted model. Since the learning examples must cover a significant part of the working domain of the actuator, we employed a sinusoidal reference for piston position with its amplitude ranging from 0 to 0.2m and the frequency among 0 and 1Hz. The test set was built by moving the piston up and down in a random way. The results obtained by the learning algorithm in extract the inverse relation y ref = f −1 (ω, v , y ) are displayed in figure 4. The error signal in figure 4(b) shows high values near the regions where the piston changes its direction. This can be seen too in figure 4(a) where the model presents high prediction errors when the piston changes its direction. This happens because the pump speed changed its rotation and passed through the dead-zone. Since in this zone we
IV. THE FUZZY LEARNING CONTROLLER FOR INVERSEMODEL COMPENSATION Although motivated by the feedback-errorlearning scheme proposed by Kawato [1,2], two differences distinguish the proposed controller from the original one: • the error signal is not used for the learning scheme because the fuzzy learning algorithm automatically extracts the rules by an unsupervised manner; • the second difference is that the feedback-errorlearning neural network studies assume no a priori knowledge of the plant being controlled. As is rarely the case that no knowledge is available for a real control problem, we effectively incorporate a priori knowledge about the system in the fuzzy model. yref
Fuzzy Inverse-Model
Feedforward-loop -
P
yref +
+ ω* ω + fb ω Feedback-loop
y v v Experimental system
y
Fig. 5: Diagram representation of the inverse-model compensation using fuzzy modeling and fuzzy learning schemes. In figure 5 we show the diagram of the implemented inverse-model compensation scheme. It contains a proportional controller (P) and the addition
of a feedback (ω fb ) and a feedforward (ω* ) commands. The total command fed to the actuator (9) is composed by the sum of the feedback command ω fb , generated by the proportional controller, and the feedforward command ω* , which is generated by the fuzzy inverse-model. * ω = ω fb + ω
(9)
The fuzzy inverse-model receives the desired trajectory y ref and more two signals from the actuator, the piston speed v and position y signals, and generates the feedforward command ω* . In this scheme, the learning process does not require the error signal from the feedback loop. The feedback command is monitored by the rules in the inverse model and it is expected that the feedback signal tends to zero as learning proceeds. V. EXPERIMENTAL RESULTS To describe the effectiveness of the learning controller, we present some experimental results on following a trajectory. The value of the proportional controller is maintained constant during the learning process, and the fuzzy inverse-model is initialised by the rules extracted from the learning set as described in section III. We use a sinusoidal signal as the reference trajectory for the system position. The signal has different magnitude and frequency values from those signals used to acquire the learning set. So, the fuzzy inverse-model has to use its generalisation capability to generate the appropriate commands. The first result is presented in figure 6. It illustrates the transition between the system controlled only by the proportional controller and after, when the fuzzy learning scheme begins to actuate making the inverse-model compensation. Until about 17 seconds, only the feedback loop of the proportional controller is actuating. After, the feedback and feedforward loops are present, and the control and learning cycles are executed in real-time decreasing the trajectory errors, as shown in figure 6(b). yref y
yref ,y [m] 0.2 (a)
0.1 0
0
10
20
30
40
50 60 Time [s]
70
80
90 100
Error [%] +20 +10 0 (b) -10 -20 0 10
20
30
40
50 60 Time [s]
70
80
90 100
Fig. 6: (a) Results that show the transition from the system controlled only by the proportional controller
and after, when the fuzzy learning scheme begins to actuate making the inverse-model compensation (b) Error signal evolution. Figure 7 presents the situation where the initial fuzzy model of the actuator is incomplete in some regions of the working domain by fault of information on the learning set. Incomplete means that there are rules that can not be extracted. Therefore, the model fails when it passes by these regions, and disturbs the control system that passes to present great deviations from the desired trajectory. The perturbations from the incomplete model can be seen in figure 7(a) by the oscillations caused in the actuator position signal (y). Until about 20 seconds, the control system presents deviations from the trajectory. After that, as the learning and control cycles proceed and additional examples are used by the learning algorithm to complete the model, the trajectory error decreases, as shown in figure 7(b). Deviations by model defficiency yref,y [m] 0.2 (a)
(b)
0.1 0
0
yref y
5
10 15
20
25 30 Time [s]
35
40
45
50
Error[%] +20 +10 0 -10 -20 0 5
10 15
20 25 30 Time [s]
35
40
45
50
Fig. 7: (a) Results displaying the control transition between an incomplete fuzzy model and after, when the system starts to complete the model. (b) Error signal evolution. The main feature of the control system is its realtime learning capability to compensate changes in the actuator dynamics. We present a situation in figure 8 where the load applied to the actuator is increased. The initial inverse model was extracted using the anterior training set which uses a lower value to the load applied to the piston. Until 10 seconds, the load system is controlled only by the proportional controller. After, the learning loop is connected to the system and the model starts to change itself, learning and compensating the new dynamics. The rules constituting the fuzzy model are modified by the learning algorithm to modify the anterior knowledge about the actuator. The sensor signals coming from the actuator describe the new dynamic condition imposed by the increase of the load. So, as the fuzzy learning process modifies the initial knowledge accumulated in the
inverse model, the position error decreases as seen in figure 8(b).
(a)
[3]
yref y
yref ,y [m] 0.2 0.1 0
0
10
20
30
40 50 Time [s]
60
70
80
Error [%] +20 +10 (b) 0 -10 -20 0 10
20
30
40 50 Time [s]
60
70
80
Fig. 8: (a) The control system modifies its knowledge about the actuator behaviour to compensate the new dynamic caused by load increase. (b) Error evolution. VI. CONCLUSION This paper presented the capabilities of a fuzzy learning controller, based on the feedback-errorlearning method, in compensate the unstructured uncertainties of an experimental electro-hydraulic actuator. The method used heuristic knowledge and numerical information from the system to extract its fuzzy inverse-model. This facilitates the model design and helps to accelerate the initial controller actuation. The learning controller avoids the black-box approach usually present in the neural network based feedback error-learning schemes. The real-time unsupervised characteristics of the fuzzy modeling algorithm make not necessary to re-start the learning process when a new trajectory is required. The experimental results showed that the control system has the capability of learn relations not incorporated in the initial model, change itself to characterise a new process dynamic, and has generalisation capability. The controller compensated the non-linear characteristic of the actuator and permitted to exemplify the incorporation of some “intelligence” into the electro-mechanical drives. REFERENCES [1] Myamoto, H., Kawato, M., Setoyama, T., and Suzuki, R. (1988).”Feedback-error-learning neural network for trajectory control of a robotic manipulator,” Neural Networks 1:251-265. [2] Kawato, M., Uno, Y., Isobe, M. and Suzuki, R. (1988).”Hierarchical neural network model for voluntary movement with application to robotics,” IEEE Control System Magazine, pp. 8-16, April.
Ishiguro, A.; Furuhashi, T., Okuma, S.; and Uchikawa, Y.; (1992) “A neural network compensator for uncertainties of robotics manipulators,” IEEE Trans. on Industrial Electronics, Vol. 39, No. 6, December. [4] Low, T.S.; Lee, T.H.; Lim, H.K.; (1993) “A Methodology for Neural Network Training for Control of Drives with Nonlinearities,” IEEE Transactions on Industrial Electronics, Vol. 40, Nº2, April. [5] Cui, X.; Shin, K.G.; (1993) “Direct control and coordination using neural networks,” IEEE Trans. on Systems, Man, and Cybernetics, vol. 23, no. 3, May/June. [6] Carelli, R.; Camacho; E.; Patiño, D.; (1995) “A neural network based feedforward adaptive controller for robots,” IEEE Trans. on Systems, Man, and Cybernetics, vol. 25, no. 9, September. [7] Ohno, H.; Suzuki, T.; Aoki, K.; Takahasi, A.; Sugimoto, G. (1994) “Neural Network Control for Automatic Braking Control System,” Neural Network, vol. 8, pp. 1303-1312. [8] Katic, D.M.; Vukobratovic, M.K.; (1995) “Highly efficient robot dynamics learning by decomposed connectionist feedforward control sutructure,” IEEE Trans. on Systems, Man, and Cybernetics, vol. 25, no. 1, January. [9] Sugeno, M.; Yasukawa, T.; (1993) "A FuzzyLogic-Based Approach to Qualitative Modeling," IEEE Trans. on Fuzzy Systems, vol. 1, No. 1, pp. 7-31, February. [10] Wang, L. X.; Mendel, J.; (1992) "Generating Fuzzy Rules by Learning From Examples," IEEE Trans. on Syst. Man and Cybernetics, vol. 22, no. 6, July. [9] Costa Branco, P.J.; Dente, J.A.; (1994) "Automatic Modeling of an Electrical Drive System Using Fuzzy Logic," pp. 441-443, San NAFIPS/IFIS/NASA-94, Antonio - Texas, USA. [10] Costa Branco, P.J.; Dente, J.A; (1995) "Intelligent Models for Electromechanical Systems," 6th European Conference on Power Electronics and Applications, Vol. 1, pp. 11481453, September 18-21, Sevilhe, Spain. [11] Costa Branco, P.J.; Lori, N; Dente, J.A.; (1995) "New Approaches on Structure Identification of Fuzzy Models: Case Study in an ElectroMechanical System," On Fuzzy Logic and Neural Networks/Evolutionary Computation, IEEE/Nagoya University World Wisepersons Workshop (WWW'95), pp. 28-41,Nagoya, Japan.