Implementation of a Fuzzy TSK Controller for a Flexible Joint Robot

This paper proposes a fuzzy TSK controller to control a rotary flexible joint manipulator. The flexibility of joint is performed by means of a solenoid nonlinear spring, which is connected between actuator output and joint input in a bilateral connection form to transfer the produced torque; also the smooth model of frictions is used for modeling the dynamics of flexible manipulator. The effect of coulomb friction and also gearbox backlashes is decreased by a pulsation signal as an extra voltage that is added to the control voltage of actuator. Actuator dynamics is modeled by consideration of saturation mode of armature current. Experimental results demonstrate that the proposed controller has an ability to control flexible joint manipulator with a good performance.


Introduction
Robot systems with flexible joints are generally used in the aerospace industry, military, chemical, integrated circuits, and nuclear energy systems in order to perform commands with high sensitivity and accuracy 1 .It is demonstrated that the majority of robots have nonlinear dynamic and performance.Hence a high-accurate controlling requires special design and controllers 2 .Linear controllers are still used in robotics though in most cases this type of controllers may result in low performance responses and also encounters stability problems.Industrial environments, where there are strong electrical noises, have the worse conditions because electronic circuits and especially measuring systems are affected by power noises.Similar to other electromechanical systems, robots have uncertainties on their parameters model due to tolerance in physical quantities.In practice, model uncertainties and disturbance decrease the efficiency of designed controller and also limit the area of convergence.For years, efforts have been made to solve this problem and several methods such as robust, adaptive, and intelligent controllers were proposed 3 .
Fuzzy controllers have been widely proposed and analyzed in the literature over the past decade.The most useful property of the fuzzy system is the ability to approximate the mapping from input to output with arbitrary accuracy.Especially, the Takagi-Sugeno-Kang fuzzy model 4 is an adequate fuzzy model for complex systems.This work proposes the design of a TSK-fuzzy controller, which assigns different linear control laws in order to control a flexible joint robot FJR .These robots have high nonlinearity on dynamics and must be limited in the vicinity of equilibrium point.Such systems may be unstable in out of operating space because of high nonlinearity error.In these cases, even if designing a controller is being realizable, usually closed loop system has no good performance.
The proposed method has some advantages as follows: 1 improved performance controller for wide changing of payload, 2 no need for frequent calculations, 3 decreasing in controller time delay by eliminating some of the low effect sentences, 4 with adding a vibration signal we could reduce effects of fraction and backlash.
This paper subtends to four sections.In Section 2, we show how to make an acceptable model of Laboratory FJR L-FJR , which has rigid arm, flexible joint, DC motor, and gearbox as actuator.Also in this section, a new compensator is proposed to decrease friction and backlash effects in FJR modeling.In Section 3, a controller designing based on fuzzy TSK is discussed.In Section 4, a number of methods are proposed for calculating, collecting, and measuring FJR parameters.This model will be completed and modified by applying parameters uncertainties.Also in this section, simulation results and experimental outputs are presented.

Modeling
The scheme of the single link FJR is shown Figure 1, which includes rigid arm, flexible joint, and actuator.Usually actuator is a combination of gearbox and electromagnetic motor as a compact unit fixed on the work-table by a rigid base.Several fixed ball-brings on parallel bases are used to fixing shafts and reducing effect of friction.Gearbox generated torque is transferred by fixed shafts from gearbox-out to input of spring and from output of spring to joint of link.Solenoid-type spring is selected for coupling 5 .In Section 2.4, it will be shown this spring is employed in torsion form and also has weak nonlinearity.

Base Model
Dynamic models for link and actuator sections can be created by two Lagrange differential equations as follows 6 : where L i represents difference between the kinetic and potential energy in link and actuator as follows: κ i , p i in link and actuator are expressed by the following equations: link : where U E1 , U E2 and U Fa , U FL are axles position shaft-encoders torques and friction torques of link and actuator.Also U C and U in are the transfer torques from actuator to link joint and gearbox out-torque.In these equations, m L , m P , I L , and J are mass of link, payload, inertia moment of arm, and actuator, respectively.Also , g, θ 1 , and θ 2 are the length of arm, the gravity acceleration constant, the rotation angle of link, and actuator-shaft to system base {A 0 } , respectively.By replacing L 1 and L 2 in the Lagrange equations in 2.1 , FJR dynamics is described by 2.5

Friction Modeling
As it was mentioned U Fa , U FL are friction torques in the link and actuator which are generated by viscous and Coulomb frictions.Dynamic of friction torques can be written as 7

2.6
Generally F V L , F V a are constants which are related to type of surfaces and quality of lubrication.Usually, using lubrication and ball-brings can decrease Coulomb friction on the joint and arm sections.But lubrication cannot be used in brushing of DC motor, so Coulomb friction has always high value in gearbox and motor section.In this paper, U Ca is selected as follows 8 : where C f , S f , U in , and W are coefficient of kinetic and static frictions, applied torque and proportional weight respectively.It is also proved that Coulomb friction is generated by kinetic and static frictions and generally C f is less than S f C f < S f .As an example, Figure 2 shows the modified figure of 9 for friction characteristic of a compact motor and gearbox.Often, designing a nonlinear controller for nonlinear systems will be conducted to use of numerical methods, so dynamic equations should have Taylor expansion.There is no Taylor series for equations similar to 2.7 , because it has some nonderivativeable points on defined domain.This problem can be solved by using the following approximate equation 2.8 instead of 2.7 .This equation is derivativeable in all defined domain Also S f and C f of 2.7 , which have positive values, are functions of A, B, β as follows: where C is a positive number which represents the slope of U Ca in low speeds.Lubrication on ball-brings and gearbox is usually used in order to decrease C f and S f .But lubrication is not possible between collector and coals in DC and universal motors, because it may cause electrical conductivity problem.Based on 2.7 , Coulomb friction torque has high value at low speeds, so if rotor rotates without stopping, then starting torque is eliminated and Coulomb friction is decreased, which is shown experimentally in Section 4.

Motor Modeling
In most papers, the model of electromagnetic motor, which is used as driver, is described by a linear and low-order differential equation.In spite of simplicity, this model is used in most usual applications yet.But certainly linear model cannot be used in robots because the direction of rotor is always changed between CW and CCW status 10 .So nonlinearity and saturation must be considered in motor model especially in lightweight robots.Also in this paper, robot is actuated by a DC motor.Therefore, robot input torque is a function of armature current of DC motor as follows 10 : where i a , K m , and i a Max are armature current, positive value as armature current to outtorque conversion constant, and maximum allowable current in armature, respectively.If the armature current is equal or greater than the maximum allowable current, saturation would happen in rotor and stator cores.In this paper, saturation is modeled by smooth function tanh • as an approximation of saturation dynamics.U out-motor is applied to input of coupling spring as U in .Also, armature current has a relation with the motor's electrical parameters as follows 15 :   where R, L, V m , θm , and K b are armature resistance, armature inductance, input voltage, motor speed at gearbox out, and speed to back e.m.f voltage conversion constant, respectively.Figure 3 shows a model of DC motor that is used as robot actuator.In this model, motor input voltage is a mixture of nonlinear controller output and symmetric pulse vibration voltages.
In order to actuate link in any position, it is necessary that motor out-torque must be always more than required torque.

Coupling Model
In FJRs, flexible gearbox out-torques is applied to robot joint as actuator.But in this paper, flexible gearbox was replaced by a set of rigid gearbox and tortuous solenoid spring for having high flexibility.In this working mode, spring coefficient is very low.Other problem, which complicates designing process, is nonlinearity of spring.As it is shown in Figure 4, effective diameter of spring can be changed in Tensional and Spastic modes, because distance of spring bases is always fixed.
Increasing and decreasing in spring diameter on Tensional and Spastic modes can cause higher nonlinearities in FJRs specifications and also model may become asymmetric according to the following equations 11 : where ϕ is defined as follows: All a i and a − i are Tensional and Spastic modes' polynomial coefficients.In 2.12 it is assumed that coefficients of even powers of U c and U − c polynomials are all zero, because of symmetric structure to origin.Generally 2.12 is not derivable on the origin; therefore, it will not have Taylor expansion.In order to eliminate conflicting, the following equation can be used instead of 2.12 in defined domain as a continues and derivable approximation where a i are new polynomial coefficients with uncertainty that are bounded between lower and upper size of a i .Therefore, a i can be defined based on a i and a − i as follows:

2.15
where w ai represents maximum deviation a i and a − i from a j .Figure 5 shows how to connect spring to bases.In this paper, a new method is proposed for symmetrical transferring of torque from actuator to spring where 50% of coupled torque is applied to the spring at A by OA link and the rest is applied to A by OA link and the fixed arc of spring AA .Spring properties may change if connection points A, A are fixed by high-temperature methods such as soldering.Therefore, to avoid this problem spring and bases were fastened by screws and spanners in laboratory experiments.Also applied force on connection points A, A is equal to U −1 |OA|, which can be reduced by incrementing the bases length OA, OA .This structure has some advantages as follows: 1 symmetrical transmission for torque by two sides of spring bases, 2 decrease in applied forces on connection points, 3 decrease in friction forces of boll brings.

Spring base
Gearbox shaft

Uncertainty and TSK Fuzzy Controller
In this section, the new model of FJR is presented, which has uncertainty as tolerance of parameters and disturbance inputs.It is also assumed that states of system are full available and system equations in state space are described as follows 12 : ẋ f x g 1 x w g 2 x u, z h x l x u,

3.1
where x ∈ R n is the state vector, w ∈ R m 1 is the disturbance input vector, u ∈ R m 2 is the control input vector, and z ∈ R p is the penalty variable vector.Also, it is assumed that functions f x , g 1 x , g 2 x , h x , and l x are defined and are smooth in the neighborhood of X on R n .

Uncertainty
By using the discussions of previous section, new state space model of FJR can be written as follows:

3.2
These equations are written by using 2.5 , 2.6 , 2.10 , 2.11 , and 2.14 , where w is the input disturbance vector.The state vector on 3.2 is defined as:

3.3
Also the models of shaft encoders were eliminated for simplicity, because of their low effects.Equation for ẋ6 is added to FJR describing equations to decrease the tracking error.Where x d and x 6 are the input command as desired position and integral of tracking error.In this paper, tolerances of mechanical parameters such as mass and length of link are also considered, because these parameters can be changed easily.It is assumed that measuring of fixed mechanical and electrical parameters in compact motor and gearbox has been done with enough precision.Tolerance of parameters can be defined as follows: where, α 1 , α 2 , and α 3 are positive numbers as maximum deviations of m L , m P , and respectively.Also w 1 , w 2 , and w 3 are external input signals, which are limited by |w i | < 1.Therefore, w is defined as follows: w w 1 , w 2 , w 3 , w a1 , w a3 , w a5 , x d T .
3.5 In the ith implication, r is the number of fuzzy rules, M j are the fuzzy sets, A i and B i are the n × n and n × p constant state matrixes, and x 0 is the initial state vector:

3.8
w i is its corresponding membership function, w i Z t g j 1 F j Z j t , and F j Z j t is the grade of membership of Z j t in F j fuzzy sets .
The final state of fuzzy systems and the output is represented as 3.9 Considering 3.7 , design of the controller via parallel distributed pole placement results in another fuzzy system with r rules in the form of the following: if Z 1 t is M i1 and Z 2 t is M i2 and . . .and Z g t is M ig Then u t −K i x t , i 1, 2, . . ., r.

3.10
Then the output of the fuzzy state feedback controller is u t − r i 1 μ i Z t K i x t , where the eigenvalues of A i − B i K j are in the left half-plane.
By substation 3.10 in to 3.7 ,

3.11
The nonlinearity in system dynamic is T-S fuzzy modeling of FJR results in two rules as follows where the membership functions are 3.14

3.15
b is slope of sectors and defined as

3.16
Membership functions of Z 1 are titled as "Zero," "Not Zero."These membership functions are shown in Figure 6.Hence, the proposed two rules of T-S fuzzy modeling can be defined as follows.

3.18
The state feedback controllers are obtained as follows:

3.19
The final state feedback gain is K μ

Experimental Results
In order to analyze the proposed controller performance, a single flexible joint robot test-bed was prepared in Islamic Azad University of Ahar. Figure 7 shows the photo of this robot.This FJR has two main sections, electromechanic and control sections.Electro-mechanic section is split to compact gear-boxed DC motor as actuator, solenoid spring as torque transformer, and plastic rigid link as arm.Also, in order to avoid undesired movements, main shaft from gearbox output to joint of arm is fastened by fixed parallel bases on main foundation.Controller section has four high speed microcontrollers.Gearbox-shaft and link positions are measured by high precision shaft encoders as measured output signals.Shaft encoders signal wires are connected to two separable and independent microcontrollers as inputs.These outputs are wired to the interrupt inputs of microcontrollers.Outset, the pulses of shaft-encoders are decoded and then rotational angles are separately calculated by a special algorithm in microcontrollers.
In the next phase, decoded information is sent to main computer by RS232 protocol as serial communication and serial to USB converter.The main controller is a software controller programmed in Visual Basic.The controller on main computer gets gearbox-shaft and link positions by serial line and control law coefficients of a file that was already created by the other program in MATLAB.Special numerical code as DC motor voltage is created by use of control law and positions information in controller.
The controller on main computer gets gearbox-shaft and link positions by serial line and control law coefficients of a file that was already created by the other program in MATLAB.Special numerical code as DC motor voltage is created by use of control law and positions information in controller.
Then this code is sent to the fourth microcontroller by serial line.In order to create apposite commands for generating PWM form DC voltage as motor power supply, DC voltage is generated by four IGBTs as a controllable bridge and PWM method.According to the controller commands, produced voltage can be altered in range from −24 V to 24 V.

System Mechanical and Electrical Parameters
Table 1 shows values of link and spring mechanical parameters.Also, Table 2 shows values of compact gear-boxed DC motor set electrical and mechanical parameters.Figure 8 shows scheme of single link FJR and controller test-bed.
Coulomb and Viscose friction coefficients are presented for link and compact gearboxed DC motor in Table 3.This table also shows coefficients at two states: without vibration and with vibration signal.Of course vibration signal had proper quantities during experimentally tests.

Compensated Model for Frictions
The friction model can be compensated by applying a pulsation form signal vibration signal with special frequency and amplitude.Tables 4 and 5 show values of S f , C f by some vibration signals.These tables were gathered by various experimentally tests on test-bed FJR. Figure 9 shows a test result for measuring of S f , C f .This test was done with square wave signal as a vibration signal with f 15 Hz and v P −P 4 v.

Effect of Vibration Signal on Friction and Backlash
In order to show advantages of proposed controller with vibration signal, a number of tests were done on FJR for various input commands.These tests are repeated with commands 45 , 120 , and 150 .
Figure 10 shows that response to command 45 with vibration signal is more accurate than without it and also shows that link angle was sat to input command at t 8 s by vibration signal, but it has ringing form on response for without vibration signal even after t 16 s.Figures 11 and 12 show response of FJR to commands 120 and 150 that are in unstable domain.It means that FJR has been stabled even in unstable domain by proposed controller.Certainly it is predictable that link response to these commands would have high settling time overshoot.

Wide Changing in Payload
In order to show advantages of proposed controller law to traditional.The other tests were done on FJR by use of three different payloads.
Figures 13 and 14 show the test results of controller k x, m p and k x in the same conditions.Similar to Section 4.3, optimal vibration signal has been applied in these tests.
It can be concluded from Figures 13 and 14 that new controller has more compatibility with m p .Also, in addition to solving backlashes problem and decreasing of friction effect, the proposed controller has more accuracy and higher performance compared to traditional controllers.

Uncertainties and Disturbance
Robustness of the proposed controller is verified by several experimentally tests.The tests have been conducted by changing the link length.Figure 15 shows the step response of link position in controlled system by proposed control law for link uncertainties.Also Figure 16 shows the response of link position to step command 60 , where external disturbances are applied as impact forces to link.The results of tests show that the proposed controller can guarantee the system stability against parameter tolerances and external disturbances.The effect of Q 6 on new controller is verified by some tests, the results are shown in Figure 17.Results of Figure 17 show operation of controlled system can be improved by fine adjusting of Q 6 .Inappropriate value for Q 6 can drive system toward unstable mode.Motor current curves are shown in Figure 18.They are measured in two modes: with vibration signal and without vibration signal.
Figure 18 shows, if motor control voltage is mixed with vibration signal, armature current will have smooth function with low variations after t 6 s.It is needed to mention that in all tests, position of link and gearbox shaft have been measured by use of shaft encoder and data acquisition board.

Conclusion
In this paper, Takagi-Sugeno fuzzy approach for modeling nonlinear systems is represented.Using this method, the nonlinear elements of the system can be replaced by linear subsystems and result can be achieved in a simpler model and less complicated equations.Also saturation problem in actuator and Coulomb friction were modeled by derivable and smooth models instead of classical methods in this paper.Moreover, experimental results of proposed controller on FJR showed that TSK fuzzy-based controller has an ability to stabilize and control FJR with acceptable performance.Moreover, it was shown that backlashes and vast starting torque problems in gearbox can be solved by use of vibration signal.Also proposed approach can be applied to any multilink flexible on stable domain with a good performance.Also, it can be expanded as an extension of the technique to the more challenging cases of systems with unstable dynamics with minimum performance, such as flexible link robots.

Figure 2 :
Figure 2: Friction characteristic of a compact motor and gearbox.

Figure 3 :
Figure 3: Model of DC motor and input mixed voltage.

Figure 5 :
Figure 5: Symmetric connection for spring and gearbox shaft.

Figure 6 :
Figure 6: Membership function M 1 z 1 t and M 2 z 1 t .

Figure 8 :
Figure 8: Scheme of single link FJR and controller test-bed.

Figure 9 :
Figure 9: S f , C f measuring test.

Figure 10 :
Figure 10: Response to x d 45 with vibration signal.

Figure 11 :
Figure 11: Response to x d 120 with vibration signal.

Figure 12 :Figure 13 :
Figure 12: Response to x d 150 with vibration signal.

Figure 14 :
Figure 14: Effect of changing with k x .

Figure 15 :
Figure 15: Response to x d 60 with link uncertainty.

Figure 16 :Figure 17 :
Figure 16: Response to x d 60 with external disturbance.

Figure 18 :
Figure 18: Applied voltage to DC motor for x d 120 .

Table 1 :
Link and spring properties.

Table 2 :
Compact DC motor and gearbox set properties.

Table 3 :
Values of friction coefficients.

Table 4 :
S f for some vibration signals.

Table 5 :
C f for some vibration signals.