An ANFIS based inverse modeling for pneumatic artificial muscles

Pneumatic Artificial Muscles (PAM) are soft actuators with advantages of high force to weight ratio, flexible structure and low cost. On the other hand, their inherent nonlinear characteristics yield difficulties in modeling and control actions, which is an important factor restricting use of PAM. In literature, there are various modeling approaches such as virtual work , empirical and phenomenological models. However, they appear as either much complicated or are approximate ones as a variable stiffness spring for model with nonlinear input-output relationship. In this work, the behaviour of PAM is interpreted as an integrated response to pressure input that results in a simultaneous force and muscle length change. The integrated response behaviour of PAM is not combined effectively in terms of simultaneous resultant force and muscle contraction in many existing models. In order to implement that response, standard identification methods , for instance NNARX, are not suitable for modeling this behaviour. Moreover, an inverse modeling with grey box approach is proposed in order to utilize the model in control applications. Since Neuro-Fuzzy inference systems are universal estimators, the modeling is implemented by an ANFIS structure using the experimental data collected from PAM test bed. According to implementation results, the ANFIS based inverse model has yielded satisfactory performance deducing that it could be a simple and effective solution for PAM modeling and control issue.


Introduction
The pneumatic artificial muscle (PAM) is a fiber braided and coated rubber tube actuator that changes its actuating length when pressurized. As compared to other conventional actuators (e.g., motors, hydraulic actuators, and pneumatic cylinders), PAM could be foreseen more similar to the human muscle in behaviour. Pneumatic Artificial Muscles (PAM) are type of actuators that mimic behavior of skeletal muscle by contracting and generating force in a nonlinear manner when pressurized. PAM has a radially inflation and axially contraction behavior which produces high pulling(tensile) forces along the longitudinal axis.
It has low weight, and high power/weight output. Moreover, the PAM has inherent compliance that makes it feasible for exoskeletons and rehabilitation robots. [1]. However, the compliance of the PAM is associated with nonlinearity, hysteresis, and time varying characteristics, which makes it more difficult to model the dynamics and design high-performance controllers. A detailed survey of McKibben PAM modeling approaches is given by Tondu. [2].
A comparative analysis of the existing static models developed for Festo PAM by Martens [3]. Furthermore, as described by Kelasidi et al., the dynamic models of the PAM may be grouped into two classes, a theoretical model and a phenomenological model, respectively, [4]. The theoretical model describes the relationship between the PAM's characteristics and the parameters directly related to the PAM's geometric structure and material properties, that has a complex structure with many parameters. For example, Chou and Hannaford derived the model from the law of energy conservation, and described the relationship among the pressure, the length, and the contractile force of the PAM [5]. The phenomenological model, on the other hand, is constructed according to the relationship between the input and output of the PAM, and is suitable for very complex dynamics that are hard to describe by the theoretical model. Among the phenomenological models of the PAM , the most used one is the three-element model proposed by Reynolds, in which the PAM is considered as a parallel arrangement of three elements [6]. However, both the theoretical and the phenomenological models contain time varying parameters and non-modeled uncertainties that need to be compensated by control techniques. According to Zhang et al., due to the nonlinearity, hysteresis, and time-varying characteristics of the PAM, it is difficult to precisely describe its dynamics in the entire range of pressure using only one model with constant parameters [7].
The model-based schemes usually cannot obtain highprecision control due to the errors between the actual PAM dynamics. In addition, an emprical modeling approach is given by Wickramtunge and Leephakpreda which relates force and muscle legth as a nonlinear elastic relation [8]. Moreover, Ishikawa et al. also performed model parameter extraction of structurally different PAMs using SVM [9]. There are more studies to resolve the modeling issue in literature, such as virtual work , empirical and phenomenological models, AI based models. NNARX based modeling approaches is given by Ahn et al. [10]. A hybrid ANN approach is developed by Song et. al. [11] . A recurrent Neuro-Fuzzy based model is introduced by Chavoshian et al. [12].
However, they are either much complicated or very approximate ones as a variable stiffness spring for model with nonlinear input-output relationship . Majority of the existing methods are standard direct pressure input and force output models.
In this work, initially an experimental analysis for characteristics of PAM has been performed using a test bed. Based on the analysis of some well known previous models, it has been observed that efficacy of the those methods are limited for representing the physical response of PAM due to fact that models mostly concentrate direct input-output relation in terms of pressure and force estimation. In many existing models, the integrated response behavior of PAM is not combined effectively in terms of simultaneous resultant force and muscle contraction. Hence, we deduce that there is still requirement for simple, effective models . By this foresight, apart from previous modeling approaches, the dynamic action of PAM is modeled as an integrated response to pressure input, which results in simultaneous force and muscle length change. In this case, standard direct input-output identification methods ,such as NNARX, are not suitable for this modeling issue.
In order to find an alternative method to our modeling approach, Neuro-Fuzzy inference systems are considered since they are universal estimators. They are capable of approximating any continuous function with a certain level of accuracy as well as the modeling information can be extracted from the Neuro_Fuzzy inference system. Hence, an inverse modeling approach is proposed in order to utilize the model in control applications. In this case, the grey box model is implemented by an ANFIS structure using the experimental data collected from the PAM test bed.
The rest of the paper as follows: In section two, the implementation and methods are given, where experimental setup and data acquisition, modeling approach are explained. In section three, experimental results and discussions are presented. In section four, conclusions are drawn.

Implementation
Nowadays, PAM is produced commercially by Festo Company and it is also called Festo fluidic muscle. The Festo muscle is structurally different from the general McKibben muscles. The fiber of the fluidic muscle is knit into the rubber tube, offering easy assembly and improved hysteric behavior and nonlinearity compared to conventional design [13]. Due to difference in construction, Festo PAM have different properties as compared to other existing PAM models.
Dynamic characteristics of DMSP20 series Festo pneumatic muscle is illustrated in Figure 1, where F indicates the generated force by PAM and h indicates percentage muscle length change in terms of contraction or extension , against different applied pressure curves.

Figure 1. Dynamic Characteristics of Festo PAM
When the dynamic characteristics analyzed, it has been observed that PAM had different operating curves for different applied pressure values which is also a confirmation of manufacturer's curves. Those different operating curves is the main cause for nonlinear behavior of PAM. During the analysis, it has been observed that although applied pressure was the only input, but there was an integrated response of generated force and muscle length change as the output.
In the test bed experiments, data has been obtained for different input pressure values and with different external loads. During the experiments, data from test bed has been obtained and compared to MATLAB simulation results of some well known models. It has been concluded that majority of existing modeling approaches includes muscle length but considers solely force as the output. However, in our case, when PAM used as actuator, both force and muscle length have become equally important. Hence, in this work integrated response approach has been implemented as inverse modeling approach.

PAM Test Bed Hardware Implementation and Data
Collection.
In the implementation, an experimental analysis has been performed for physical characteristics of Festo PAM, using a hardware test bed constructed in our laboratory. Pneumatic Artificial Muscle Test Bed that has been used to perform experiments is shown in Figure 2. Hardware components of PAM test bed are given in Table 1. During the experiments, MATLAB /Simulink blocks are used to implement data aquisition software for sensors and actuator configurations and closed loop controllers. The Simulink blocks are compiled and sent to a microprocessor running in "Data Acquisition" unit. In the test bed, ATMEL Arm Cortex M3 microprocessor card is used to control the system. Initially, the accuracy of our PAM test bed is checked by the emprical modeling experiment and hence we obtained very similar results to that non-linear elastic relation expressed by Wickramtunge et al. [8]. After that, we have concluded that the performance of our test is satisfactory. The experiments has been performed using 0.05 Hz sinusodial reference curves with PID pressure control in order to obtain data to be used in modeling. The slow pressure reference has been chosen to understand quasi-static characteristics of PAM. The collected data used in MATLAB for Neuro-Fuzzy toolbox.

ANFIS Structure and Application
Artificial Neural Networks (ANN) and Fuzzy Inference Systems (FIS) are universal estimators. They are capable of approximating any continuous function with a certain level of accuracy. Despite the advantages, ANN modeling has some limitations such as being black box approach and time consuming training. On the other hand, Fuzzy Inference Systems provides a grey box foundation for dealing with uncertainty and have ability to represent the expert knowledge using Fuzzy Logic. However, FIS is mainly based on the expert design and only utilize the knowledge encoded, hence it is not able to learn and difficult to generalize the workspace. The Sugeno-based fuzzy inference mechanism is represented in Figure 3.
In addition, ANN and FIS are somewhat supplementary to each other as one of the techniques has the capabilities the other is lacking of [14]. The combination is the Neurofuzzy system and would be considered as an appropriate approach to describe the non-linear system behavior. Adaptive Neuro-Fuzzy Inference Systems (ANFIS), as a combination of ANN and FIS, are extensively used for solving real world problems in system modeling and control [15][16] . From this literature, it can be concluded that the ANFIS architecture can model nonlinear behavior of PAM. ANFIS is proposed by Jang in which the fuzzy if-then rules are represented in a network structure [15]. The ANFIS learning algorithm involves both the gradient error back propagation to adjust the coefficients in the membership functions and the LSE to adjust the parameters in the linear output.
As for the ANFIS structure presented by Jang [15], the number of fuzzy rules is equal to the product of the number of membership functions and the number of inputs. In some cases, the required number of fuzzy rules for covering the entire input spaces is very large, which makes the training process time consuming . The relevant equivalent ANFIS architecture shown in Figure 4. The brief explanation of the layers of ANFIS architecture is as follows: Layer 1: Nodes in this layer stand for adaptive nodes and their outputs are defined by: for i = 1,2, ….
Layer 2: Nodes in this layer are fixed nodes which are labeled by  and can have multiple input-output signals: Layer 3: Nodes in this layer are fixed nodes which are labeled by N. The i th node calculates the ratio of the i th rule firing strength for summing all rules firing strengths: Layer 4: Nodes in this layer are adaptive nodes & their outputs are obtained as : Layer 5: The single node in this layer is a fixed node, which is labeled by  , and can compute the overall output using the summation of all input signals: overall output, 5, = ∑ 1 ̅̅̅̅ = ∑ ∑ The proposed type-3 ANFIS architecture is implemented in MATLAB which is given in Figure 5. In this implementation, in order to fuzzify the input variables, namely force and muscle length, 5 membership functions are defined using Gaussian membership functions . In resultant structure, there are 25 fuzzy rules and output membership functions used for Sugeno type inference.  In Figure 6, a configuration screen print is given for output variable which is pressure.
In ANFIS architecture developed by Jang [15], a derivative based hybrid learning algorithm (HL) suggested as training algorithm. In HL, while premise parameters are trained with Gradient Descent, consequence parameters are determined with LSE.
Since the first ANFIS, HL has been used in ANFIS training mostly . In our implementation , HL is also used for training. The training phase performance is given in Figure 7, in terms of training error (RMSE) versus epoch index. In Figure 8 , the final fuzzy surface for the implemented ANFIS model is given.

Results
After having the ANFIS successfully implemented and trained, two other data set has been used for performance analysis. The ANFIS has been transformed into a Simulink model as shown in Figure 9. Different data sets are generated from PAM test and has been fed to ANFIS model test in Simulink. Data generation was performed by applying a closed loop PID pressure control on PAM test bed with a 0.05Hz sinusoidal reference signal varying in 0-7 bar, with the test bed under different loads in range of 15-100 kg. During the data generation, a full range of muscle contraction (25 %) and extension (5 %) has been reached for the muscle length variation. A random mixture of data is formed as Input-Output vectors by a common sequence index in MATLAB. The force and muscle length data vector is applied as inputs to ANFIS where as pressure values are used for performance comparison. For performance analysis, the output pressure estimation of ANFIS has been compared to experimental pressure values from new data set.  In Figure 10, the first data set composed of 85 item vectors is applied to ANFIS model and the resultant performance occurred as quite satisfactory with an error of maximum 5-8 %. In figure 11 a similar performance has been observed with another test data set. To summarize, those performances indicated that a simple ANFIS could be used as a transforming and mapping control block between high level and low level. A high level desired actuator position in terms of muscle length and a simultaneous force generation demand has been mapped into a low level pressure set value to be used in PID pressure control loop for PAM.

Conclusion
In this work, apart from previous modelling approaches, the behaviour of PAM is foreseen as an integrated response to pressure input, which results in simultaneous force and muscle length change. Therefore, standard direct input-output identification methods are not suitable for modelling that behaviour. An inverse modelling approach is proposed in order to utilize it in control applications. In order to represent the nonlinear characteristics of PAM, the grey box approach is chosen for modelling and it is implemented by an ANFIS structure using the experimental data collected from the PAM test bed. According to implementation results, the ANFIS based inverse model has yielded satisfactory performance deducing that it could be a simple and effective solution for the PAM control in terms of high level to low level mapping.

Author's Note
Abstract version of this paper was presented at 9th International Conference on Advanced Technologies (ICAT'20) , 10-12 August 2020, Istanbul, Turkey with the title of "An ANFIS Based Inverse Modelling for Pneumatic Artificial Muscles".