A Pre-Compensation Fuzzy Logic Algorithm Designed for the Dynamic Compensation Robotic System

This paper deals with the issue of non-model-based position regulation for the dynamic compensation robotic system (DCRS), which has been proposed for cooperating with the existing main robotic systems, such as the common serial robotic arms, to accomplish high-speed and accurate manipulations. The dynamic compensation concept is realized by fusing a high-speed & light-weight compensation actuator as well as endpoint closed loop (ECL) configured high-speed cameras. Within the context of the DCRS, the coarse motion, which is realized by the main robotic system, usually gives rise to negative dynamic impact on the compensation actuator that is configured to accomplish the fine motion. Through the analysis of a simplified model for the coupled two-plant system, relative velocity information between the two plants is found to play a role in the first order derivative of the displacement error. With the use of the relative position information from high-speed visual feedback, this paper proposes a new pre-compensation fuzzy logic control (PFLC) approach for control of the compensation actuator. The PFLC method is model-independent and is realized with a cascade fuzzy inference structure that conveniently integrates the relative velocity term between the two plants into the error regulation, and therefore realizes the partial counteraction of the disturbance from the main robot easily without knowing the explicit mathematical models of the system. Comparison works between the proposed PFLC and approaches that take no consideration of the relative velocity information, such as proportional-derivative (PD) control and conventional fuzzy logic control, are conducted. Simulations and experiments show the consistent effectiveness of the proposed approach.


Introduction
High-speed and accurate position regulation for the traditional robotic system is a challenging issue in the robotic control theme. This is because not only does the mechanism have some defects, such as backlash, but also the existing control methods cannot easily accommodate the dynamics issue for unknown working conditions, especially under high-speed manipulations.
Most commercially available industrial robots are equipped with the so-called non-model-based controllers, as their control systems are treated as decoupled systems and dynamics are neglected [1]. Such approximation is acceptable for low-speed motion since Coriolis and centripetal forces are limited due to powerful motors and high gear reductions [1,2]. However, this approach cannot be applied to high-speed motions [3]. On the other hand, model-based approach has been frequently studied to realize dynamic compensation by identifying the parameters of the dynamic model [1,4]. For the model-based approach, usually computation is too complex to realize high-speed compensation. Besides, physical values of the dynamic model are difficult to estimate and often not accurately known. Moreover, these parameter values may change with the robot's service time or robot configurations.
In another approach, a small robot mounting on the robotic arm, known as the macro-micro architecture [5,6], is employed. The macro-micro approach has been proposed to apply to rigid manipulators for increasing system bandwidth, as well as to flexible manipulators for suppressing bending vibrations and improving dynamic tracking performance (e.g., [7,8]). Since the micromanipulator is mounted on the macro-manipulator, the system is dynamically coupled, especially for flexible manipulators [9,10].
Usually, for a light-weight micro-manipulator, the coupling dynamical interaction to the macro part is negligible as the inertia of the macro part is much greater than that of the micro part [11,12]. In [11], the dynamic effect of the macro part to the micro part is represented by a disturbance force, and by choosing a large proportional gain factor of the PD controller for the micro-manipulator, the disturbance force can be reduced and the system stability can be proved. It should be noted that this approach is modelindependent and it represents a kind of method that doesn't need to model the system's dynamics. Although this approach is very simple and easy for implementation, it cannot be used as a general approach for high-speed positioning. In [13] and [14], the dynamic trajectory tracking problems have been studied, and the dynamics of the system are taken into account with a fine model including the macro-manipulator's deformation. In [13], a simple PD controller is assigned for the macro-manipulator, and a non-linear dynamic compensating control law is applied to the micro-manipulator. In [14], a different strategy is adopted by applying the PD control to the micro part, and adopting the nonlinear controller for the macro part to damp out vibrations. In both approaches, the trajectory planner is needed for the macro-manipulator. These approaches obtained good performance for dynamic compensation, yet the modelling for the system's dynamics is not easy. In [15,16], a feedback controller based on the discrete-time-domain disturbance observer is established to compensate for external disturbance mainly from the coarse positioner. Basically, the disturbance observer is a high gain technique, and the unmodelled dynamics limit the allowable loop gain if robustness is to be retained. Correspondingly, the performance will be limited.
With the advantages of the high-speed visual feedback that provides the overall real-time information, a non-modelbased dynamic compensation concept has been proposed by fusing a high-speed & light-weight compensation actuator and high-speed visual feedback in terms of relative position information between target and robot [17]. Under the proposed dynamic compensation concept, high-speed as well as accurate positioning towards a target is supposed to be accomplished without knowing much about the system's mathematical models. However, the problem that the compensation actuator for fine positioning is dynamically disturbed by the main robot's motion has not been tackled as yet. This paper proposes a precompensation fuzzy logic control method to address this issue. The reason for adopting the fuzzy logic approach in this paper is that a model-independent cascade fuzzy inference structure that integrates the relative velocity term (which is found to play a role in the first order derivative of the displacement error through later analysis of the system's overall behaviour) into the overall positioning regulation can be realized very conveniently to partially counteract the disturbance. 'Pre-compensation' lies in the methodology that the first layer of the fuzzy inference system realizes the combination of the velocity information of the two plants to compensate for the disturbance part within the displacement error, which has been brought by the main plant's motion.
It should be noted that since this paper focuses on the fundamental problem (counteraction of the nonlinear disturbance from the main robot) of the proposed dynamic compensation robotic system, we will only conduct the analysis as well as evaluation on 1-DOF DCRS -we think however that the result in this work is instructive in realizing a multi-DOF DCRS.
The rest of the paper is organized as follows. First, the concept of the dynamic compensation as well as the designed 1-DOF DCRS testbed is introduced in Section 2. Second, a simple cart model with the motion analysis, as well as the pre-compensation fuzzy logic control method and its implementation are described in Section 3. Third, in Section 4 and Section 5 a simulation study as well as experimental evaluations are conducted by comparing our method with two other model-independent methods that take no consideration of the relative velocity information including PD control and conventional fuzzy logic control. Finally, the conclusions of this work are given in Section 6.

The dynamic compensation concept
For high-speed operations, defects such as vibration due to large inertia of the robotic system as well as mechanical backlash, would reduce the performance. As shown in Figure 1, the concept of dynamic compensation is to dynamically compensate for the robotic system's motion defects under high-speed visual feedback information through two aspects. Firstly, the high-speed compensation actuator with small inertia offers the necessary DOFs to compensate for the system's motion defects. The highspeed feature enables it to realize quick response during the system's dynamical converge, which is always realized in a very short period. Secondly, high-speed cameras are adopted to provide the relative position information between robot and target. As for the traditional robotic control, the local feedback information, such as the joint space feedback, is adopted for the global position regulation by applying the robotic system's kinematic and dynamic models, which actually act as the indirect approach. Here, in the proposed dynamic compensation concept, we directly adopt the global feedback information between the robot and the target by applying high-speed cameras that work at the frequency of 1000 Hz. It should be pointed out that although the dynamic compensation concept is somehow similar to the traditional macro-micro approach in related works [5][6][7][8][9][10]13], there are several different issues as follows: • High-speed visual feedback that offers the relative position information between robot and target is one important aspect of the proposed dynamic compensation concept, whereas the traditional macro-micro system itself does not involve a global high-speed visual feedback; • In order to realize high-speed and accurate regulation, rather than dealing with the complicated dynamic models of robot systems, we focus on developing modelindependent control laws for easy implementation and for general applications in the proposed dynamic compensation concept.

1-DOF testbed
In order to study the basic motion control in the context of DCRS, we designed a 1-DOF DCRS testbed as shown in Figure 2. The testbed includes a main robot (linear motor actuator GLM1G-075 made by THK) that has a large work space and has been originally adopted for slow & accurate motion. The compensation actuator (QUICKSHAFT ® linear DC-Servomotor LM1247-040-ll made by FAUHABER) is capable of high-speed motion with a small work range.
Hereafter, we will refer to the main robot as the main plant, and the compensation actuator as the compensation plant. Specifications for the testbed are shown in Table 1. An eyeto-hand configured high-speed camera (Photron IDP-Express R2000) observes the motion patterns of the two plants at a frequency of 1000 Hz with the image size of 512x512. The regulation point is represented by a white LED light that is mounted on the compensation plant. The feature point for the main plant is represented by a blue LED light.

Pre-compensation fuzzy logic control (PFLC)
In order to illustrate the control issue, we firstly introduce a simplified model for the 1-DOF dynamic compensation robotic system.  In order to address the control issue, we make several assumptions about the system as follows:

Main plant Compensation plant
(1) The applied force on the compensation plant F m is calculated with respect to the frame Σ M . Since the regulation point is set on the compensation plant, it will follow the combined motion of the main plant and the compensation plant.
(2) The static friction force F s between the main plant and the compensation plant is sufficiently large and there will be no relative motion between the two plants if the compensation plant is not activated by F m .
(3) The interaction force from the compensation plant to the main plant is sufficiently small and is negligible.
In order to comply with the second assumption, a suitable static friction force can be obtained between the main plant and the compensation plant by assembling these two appropriately. By adding some extra weight on the main plant to increase the inertia, the interaction force from the compensation plant can be negligible to come to the third assumption.
We divide the regulation of x c from x s c to x d c into two phases, firstly to regulate the system to move as a whole from x s c to x p c ; secondly to regulate the compensation plant from x p c to x p c is the separation position for dividing these two For the general case, suppose the control law for the first phase is the simple proportional-derivative (PD) control as where K v , K p are the positive gain factors, and F' is the force applied on the main plant to drive the whole system. Once the image error e p reaches zero, the regulation moves into the second phase. As for the dynamics of the system, we have: where F r represents the kinetic friction force between the two plants.
For the main plant that is supposed to stop around ξ p , in order to keep the flexibility of the proposed approach, we keep the PD control law for the main plant as where e M = ξ M − ξ p with ξ M representing the image position of the main plant's feature point.
Note that during the second phase, e c is the projection of combinational motions, including the main plant's motion, the relative motion between two plants, and the target's motion if we consider the general case. The derivative of e c (ė c ) at a particular time, for instance at the time of k + 1, is where v c k +1 , v d k +1 refers to the velocity of the regulation point and the target point at time k + 1 respectively. Suppose at time k, the applied force on the compensation plant and main plant to be F m k , F M k respectively; for the velocity of the regulation point, we have where, Δt is the control cycle time. Similarly, we have the velocity of the main plant at time k + 1 as Combining Equations (5), (6) and (7), we have (8) can be rewritten as ( ) Equation (9) shows that at the time of k +1, the derivative of the displacement error e c has relations to three parts, namely the derivative of the error e M at time k + 1, the difference between ė c and ė M at time k, as well as the applied force on the compensation plant at time k.
Considering the case that the simple PD control is applied to the compensation plant as where C v , C p are positive gain factors. Note that for the PD approach, the applied force F m at time k is a function of ė c k and e c k . More specifically, regarding Equation (9), the PD approach only makes use of the third term to realize the regulation of the displacement error. Therefore, under PD control, regulation of the compensation plant would be greatly affected by the nonlinear dynamics of the main plant, as revealed by the second term ė c k − ė M k of Equation (9) while performing high-speed motions.
In the next part, based on the scope of developing modelindependent control laws for dynamic compensation robotic system in this study, we shall take the advantage of the fuzzy logic method to realize a sophisticated control approach for the compensation actuator. The motivation for adopting the fuzzy logic method is that when compared with the classical model-based approach, it needs no intricate mathematical models, but only a practical understanding of the overall system behaviour (obviously, the system behaviour here has been analysed and is shown by Equation (9)).

The concept of PFLC
The fuzzy logic method is able to simultaneously handle numerical data and linguistic knowledge. It differs from classical logic in that statements are no longer black or white, true or false, on or off. In traditional logic, an object takes on a value of either zero or one. In fuzzy logic, a statement can assume any real value between 0 and 1, representing the degree to which an element belongs to a given set. The fuzzy logic control method has been successfully applied in fields such as automatic control, data classification, decision analysis, expert systems, and computer vision [18,19].
As for the concrete task of regulating the compensation plant under high-speed visual feedback in this paper, a conventional fuzzy logic control system that takes ė c k and e c k as the input and F m k as the output at the time of k can be developed. Compared with the simple PD control illustrated above that basically fits for linear systems, the conventional fuzzy logic approach may be a suitable approach to handle the nonlinear behaviour of high-speed motion compensation system. But the same problem as has been illustrated for the PD method also exists for the conventional fuzzy logic approach since it does not consider the nonlinear disturbance from the main plant.
If we go back to Equation (9)  plant can be partially compensated simultaneously while the compensation plant is regulated to the target position. The proposed PFLC method is a direct regulator to the plant rather than a gain tuner that has to be combined with some other control laws as in [20,21], thus it is much easier to implement.
The PFLC includes two cascade fuzzy inference systems (FIS), one is for pre-compensation (referred to as FIS_1 hereafter) and the other is for error regulation (referred to as FIS_2). FIS_1 is actually combining the velocity information of the main plant and the compensation plant through high-speed visual feedback. The output of FIS_1 can then be taken as one input to the FIS_2 to generate the output force for driving.

Implementation of PFLC
The implementation of a fuzzy logic control system basically includes the steps of fuzzification, rule evaluation and defuzzification. For both FIS_1 and FIS_2, the universe of discourse for each input is partitioned into seven fuzzy sets: NL ('negative large'), NM ('negative medium'), NS ('negative small'), ZE ('zero'), PS ('positive small'), PM ('positive medium') and PL ('positive large'). Both FIS_1 and FIS_2 have two input variables and one output variable. For FIS_1, the two input variables are ė M and ė c representing the image error's velocity information relating to the main plant and the compensation plant respectively, the output is referred to as ė com . For FIS_2, the input variables are the image error e c and the output of FIS_1. The fuzzification is to map each crisp input over all the qualifying membership functions required by the fuzzy rules. For easy implementation, the simplest triangular membership function is adopted for the input ė M , ė c and e c as shown in Figure 5. The universe of discourse for each input variable has been roughly calibrated.
After the step of fuzzification, the fuzzy rules are designed for FIS_1 and FIS_2. Under the 'zedeh AND' fuzzy combination operator, the designed fuzzy associate memory matrices (FAMM) for FIS_1 and FIS_2 are shown in Table  2 and Table 3  As for the output variables in FIS_1 and FIS_2, the universe of discourse is partitioned into seven fuzzy sets with each attribute being described by the singleton membership functions as shown in Figure 6.
where μ β ij (ė com ) means the degree of the fuzzy set β(ė com ) fired by μ i (ė M ) and μ j (ė c ). β is among the output fuzzy sets {NL,

NM, NS, ZE, PS, PM, PL}.
2 The implementation of a fuzzy logic control system basically includes the steps of fuzzification, rule evaluation and defuzzification. For both FIS_1 and FIS_2, the universe of discourse for each input is partitioned into seven fuzzy sets: NL ('negative large'), NM ('negative medium'), NS ('negative small'), ZE ('zero'), PS ('positive small'), PM ('positive medium') and PL ('positive large') . Both FIS_1 and FIS_2 have two input variables and one output variable. For FIS_1, the two input variables are ėM and ėc representing the image error's velocity information relating to the main plant and the compensation plant respectively, the output is referred to as ėcom. For FIS_2, the input variables are the image error ec and the output of FIS_1. The fuzzification is to map each crisp input over all the qualifying membership functions required by the fuzzy rules. For easy implementation, the simplest triangular membership function is adopted for the input ėM, ėc and ec as shown in Figure 5. The universe of discourse for each input variable has been roughly calibrated.

Main plant Existing
After the step of fuzzification, the fuzzy rules are designed for FIS_1 and FIS_2. Under the 'zedeh AND' fuzzy combination operator, the designed fuzzy associate memory matrices (FAMM) for FIS_1 and FIS_2 are shown in Table 2 and Table 3 respectively. Each element of the As for the output variables in FIS_1 and FIS_2, the universe of discourse is partitioned into seven fuzzy sets with each attribute being described by the singleton membership functions as shown in Figure 6.
The defuzzification strategy adopted is a simplified version of the 'centre of gravity method' as ( ) where C β is the constant value for the fuzzy set β defined by the output membership function. The fuzzification, rule evaluation as well as defuzzification process for FIS_2 is the same as FIS_l. The surface view of output for FIS_1 and FIS_2 is shown in Figure 7.
Note that for the conventional fuzzy logic approach, there is only one fuzzy inference system that takes ė c and e c as inputs with the similar implementation as FIS_2. In order to conduct the comparison between PFLC and the conventional fuzzy logic approach, the same membership functions and implementations for the conventional fuzzy logic approach are adopted.

Simulation study
In order to evaluate the analysis approach and to undertake a comparison, a numerical simulation is done using Matlab's fuzzy logic toolbox [22]. Evaluations of point-topoint regulation and high-speed vibration compensation have been conducted by using the simple cart model illustrated in Equations (1) - (10). The mass for main plant and compensation plant is set to be 28 kg and 2 kg respectively. Since we only conduct the horizontal motion, the variance of the image position for the system along the vertical direction is perceived as zero.

Point-to-point regulation
The start position and target position in image is set to be ξ s = -200 and ξ d = 0 respectively. From the start position, the entire system is controlled to move as a whole by the main plant's non-optimal controller, and here it is supposed to be a common PD controller. At the image position of ξ p = −5, the compensation plant is activated to perform the relative motion under the conventional fuzzy logic control and the proposed PFLC method. As shown in Figure 8, the system shows a longer settling time if there was no compensation motion involved. Compared with the conventional fuzzy logic control, the proposed PFLC method shows improvement in suppressing the overshoot and reducing the settling time.

Vibration compensation
In order to check the system's compensation performance under high-speed motion, we make the main plant exhibit a sin (⋅) reciprocating motion and the feature point of the main plant in the images follow the pattern of: where f = 8 Hz represents the frequency and ∆t i =1 ms is the control cycle time. As will be shown later in the point-topoint experimental evaluation, the reason for choosing the frequency f = 8 Hz is that the main plant of the testbed has the oscillation frequency of 8 Hz while performing pointto-point positioning. Therefore, we choose f = 8 Hz as the evaluation frequency for vibration compensation. As shown in Figure 9, the reference trajectory represents the ideal trajectory of the regulation point where the vibration motion of the main plant can be exactly counteracted. It can be seen, both the conventional fuzzy logic method and the proposed PFLC method realized good compensation under the main plant's high-speed vibration motion. The compensation error is shown in Figure 10. It clearly shows that the proposed PFLC method had a smaller error than the traditional fuzzy control, and that was exactly the result of the pre-compensation from the feedback information of the main plant's motion. The applied force on the compensation plant is shown in Figure 11. It is quite interesting to see that the PFLC method actually applied a smaller force than the conventional fuzzy control method on average during the compensation process, which also tells the better efficiency of the proposed PFLC method.

Experimental evaluations
In order to check whether the real system acts identically with the numerical simulation that has been conducted according to the model analysis, experimental evaluations on point-to-point regulation as well as the vibration compensation were conducted.

Point-to-point regulation
For the point-to-point regulation, firstly the whole system was regulated towards the target position in images by the main plant's rough PD controller from the start position ξ s = −200 in images. The compensation plant's motion was triggered once the regulation point reached ξ p = 0. During the experiment, for comparison, we simplified the regulation by letting ξ p = ξ d = 0.Thus once the compensation plant was triggered at the time t 0 = 2.15 s when it reached ξ p , both the main plant and the compensation plant were regulated to stay at ξ p . The results for three methods applied to the compensation plant are shown in Figure 12. It can be seen that the main plant of the testbed exhibited a 8 Hz oscillation before converging to the target position. The results show that compared with PD control and conventional fuzzy logic control, the proposed PFLC method reduced the image error during the whole regulation process. For the 10% error band, the settling time was reduced gradually from t s4 to t s3 , t s2 and t s1 , representing the point-to-point regulation without compensation, compensation under PD control, compensation under conventional fuzzy control and the proposed PFLC method respectively. The PFLC method had the smallest settling time for the same pointto-point regulation.

Vibration compensation
The same as the simulation above, a vibration compensation analysis was conducted to check how well the regulation point could keep aligned with the target position for different control methods while it was continually disturbed by the reciprocating motion of the main plant. Similarly to the simulation settings, we let the main plant follow a sin ( ⋅ ) reciprocating motion as 1 210 40 sin 2 and let the frequency f = 8 Hz, where Δt i = 1 ms is the control cycle time. Three methods, namely the simple PD control, the conventional fuzzy logic control and the proposed PFLC method were adopted to conduct the comparison. Note that for the PD method, the gain coefficients have been tuned. For both the conventional fuzzy logic method and the proposed PFLC, few efforts were needed for parameter tuning, and we tried to find the relatively good membership functions, especially for the output membership functions of FIS_1and FIS_2.
As shown in Figure 13, the proposed PFLC method realized perfect compensation of the main plant's high-speed vibration motion, while the conventional fuzzy logic control had a less good performance and the PD method showed the worst. The compensation error is shown in Figure 14. This clearly shows that the proposed PFLC method had a smaller error than the other two methods. In another words, the regulation point could be regulated to the target point although it was constantly disturbed by the main plant's motion. Figure 15 shows the real-time information of the inputs and output of the FIS_l. It can be seen that during the 'Active adjusting phase', the compensation plant's motion ė c had a major effect on the output of the FIS_1, while during the 'Stable phase', the main plant's motion ė M had a major effect on the output ė com . This implies the functioning of the pre-compensation term.
The applied force on the compensation plant is shown in Figure 16. This also illustrates the same phenomenon whereby the PFLC method actually applied a smaller force than the conventional fuzzy control method on average during the compensation process, which also can be perceived as the 'passive advantage' thanks to the precompensation. As for the PD method, it always tried to drive the compensation plant with the maximum force in order to realize the high-speed compensation, yet a phase delay constantly existed as shown in Figure 16 and Figure  13.  whereby the PFLC method actually applied a smaller force than the conventional fuzzy control method on average during the compensation process, which also can be perceived as the 'passive advantage' thanks to the pre-compensation from the main plant's motion. As for the PD method, it always tried to drive the compensation   We also tried to realize the vibration compensation for several different motion speeds of the main plant. The results for a frequency of 4 Hz, 6 Hz and 8 Hz are shown in Figure 17 and 18, which illustrate the image error of different control methods. For the PD method, the image error basically becomes larger along with a higher motion speed of the main plant. The same trend can also be seen from the conventional fuzzy logic method except that the changing rate was small. For the proposed PFLC method, we could see that the image error almost kept the same range for different motion speeds of the main plant, all at comparatively low levels. The same phenomenon can be seen from the experiment evaluations on a random vibration test with the frequency ranging from 3 Hz to 8 Hz as shown in Figure 19. The video for vibration compensation with the proposed PFLC method can be found on the website [23].

Conclusions and future works
In this research, a model-independent pre-compensation fuzzy logic control algorithm has been proposed in order to realize the fine dynamic compensation control of the compensation plant in the context of 1-DOF DCRS. The DCRS has been adopted to realize motion regulations, such as positioning, at high-speed and with good accuracy. During this kind of regulation, the compensation plant for fine positioning is always dynamically disturbed by the main plant that is designated for the coarse positioning in a large work range. By analysing the motion of the 1-DOF DCRS with a simplified cart model, the pre-compensation portion is discovered, and by further combination with the fuzzy logic method, a cascade PFLC algorithm has been proposed without asking for the explicit mathematical models of the system. Both simulation and experimental evaluations show the consistent effectiveness of the proposed PFLC method. Compared with some control methods that involve the dynamic models to accomplish the high-speed and accurate motion regulation, the proposed PFLC method within the context of the DCRS is easy to implement and more flexible with regard to different application tasks. Although the proposed approach has been illustrated for the 1-DOF DCRS in this paper, we think the proposed algorithm is extendible for DCRS with multiple DOFs.
Since the proposed method is non-model-based and with good flexibility, we can basically assemble a multiple-DOF DCRS by using several 1-DOF DCRSs, and this is our future work.