Hysteresis Modeling of a PAM System Using ANFIS

Pneumatic artificial muscles (PAMs) are excellent environmentally friendly actuators and springs that remain somewhat underutilized in the industry due to their hysteretic behavior, which makes predicting their behavior difficult. This paper presents a novel black-box approach that employs an adaptive-network-based fuzzy inference system (ANFIS) to create pressure-contraction hysteresis models. The resulting models are simulated in a control system toolbox to test their controllability using a simple proportional-integral (PI) controller. The data showed that the models created based on fixed inputs had an average normalized root mean square error (RMSE) of 0.0327, and their generalized counterparts achieved an average normalized RMSE of 0.04087. The simulation results showed that the PI controller was able to achieve mean tracking errors of 8.1 µm and 18.3 µm when attempting to track a sinusoidal and step references, respectively. This work concludes that modeling using the ANFIS is limited to being able to know the derivative of the input pressure or its rate of change, but competently models hysteresis in PAMs across multiple operating ranges. This is the highlight of this work. Additionally, these ANFIS-created models lend themselves well to controller, but exploring more refined control schemes is necessary to fully utilize them.


Introduction
Pneumatic actuators are one of the most common types of actuators used due to their attractive traits, such as their low weight, inherent compliant behavior, safe operation, and environmental cleanliness. The compliant behavior makes pneumatic actuators especially preferable to other common actuators such as hydraulic and electrical actuators, which behave in a rigid manner; thus, requiring more complex control schemes than pneumatic actuators to achieve similar compliance. Pneumatic actuators have several types that are commonly found in different industries: cylinders, bellows, pneumatic steppers motors, and pneumatic engines; a less utilized type of pneumatic actuator is pneumatic artificial muscles (PAMs) [1].
PAMs are biomimetic linear motion actuators that function by controlling the pressure of a gas (usually air) inside of its membrane which causes the muscle to expand or deflate radially. The change of volume in PAMs causes their length to inversely vary with the volume, i.e., shorten on volume increase and elongate on volume decrease, generating an axial pulling force. An experiment was conducted to illustrate this working principle of PAMs by applying varying pressures under a constant load. The other characteristics of PAMs were observed by subjecting them to constant pressure and varying loads where it was observed that PAMs would achieve their maximum volume and shortest length at the no load condition, rendering PAMs unable to generate any pulling force. From both experiments, it was observed that at any given pressure and load combination, a PAM has an equilibrium length [1].
The interest in PAMs was greatly reinvigorated back in the 1990s with a lot of research being conducted on them due to their numerous advantages, such as: high force-to-weight ratio, light weight, high power-to-volume ratio, structural flexibility, no mechanical wear owing to having no inner moving parts, simple construction, direct connection, ease of installation and replacement, clean operation, safety, and relatively low cost when compared to other actuators [2][3][4][5].
Despite all of their desirable qualities, the use of PAMs is still met with a few challenges that make them less commonplace in the industry, including variable elasticity, highly nonlinear and time variable behavior, the necessity of an antagonistic setup to produce bidirectional movement (similar to its biological counterpart), and hysteresis which is the focal point of this work on PAMs [6].
The simplest definition of hysteresis is the dependence of any state of a system on its previous state [7]. In PAMs, this is an anisotropic phenomenon where the state of a PAM at any given combination of parameters (pressure-contraction-force) is dependent on whether the current state is a contraction or an expansion in comparison to its previous state (history dependency). This difference in state based on the direction results in a hysteresis loop. Consequently, the difficulty in predicting and tracking the exact state of PAMs at any given parameter combinations presented a major challenge in using PAMs, especially in applications that require highly controlled fine movement. As a result, a lot of effort and research was performed on PAMs to model and control their hysteresis behavior.
The source of hysteresis in PAMs can be attributed to their unique construction. PAMs are typically a braided mesh and a rubber tube. A study conducted on PAM structures identified four possible reasons for the hysteresis, which were further analyzed and concluded that the most significant source of hysteresis was the friction between the strands. The other possible reasons for hysteresis include air compressibility, and the properties of the viscous-elastic PAM shell [8][9][10].
Researchers tackled the modeling of PAMs' hysteresis in two main approaches: by creating either physics-based models or phenomenology-based models. The construction of physics-based models depended on understanding the complex physical principles of PAMs, whereas the phenomenology-based models were constructed solely based on experimental data of PAMs regardless of their physical principles; this made the latter approach much more popular as it is simpler and lends itself well to control schemes.
Phenomenology-based models are divided into two categories: operator-based models and differential-based models [7,11]. While both approaches have achieved a great deal of success in modeling PAMs, their application still requires a complicated computation process to either acquire the play operators for the operator-based models or having to deal with the complications that occur while solving nonlinear differential equations in the differential-based models. Lin, C. et al. in 2015, modeled PAMs' hysteresis using the Maxwell-slip model, Bouc-Wen model, and the Prandtl-Ishlinskii (PI)model. The results showed that the latter two models were more accurate in modeling the hysteresis [12]. Yao, B. et al. in 2016, developed their own hysteresis model termed the 'synthetically empirical model'. This model captured the pressure-length hysteresis by evaluating the pressure inside a PAM from four different elements: hysteresis element (this element utilized the Maxwell-slip model to acquire), viscous damping element, rubber elasticity element, and contractile element. Using all of the four elements, it was possible to accurately adjust the value of pressure inside the PAM to achieve any reference length using a fuzzy controller [13]. Zhang, Y. et al. in 2020, proposed a two-component modeling technique that employed extended unparallel Prandtl-Ishlinskii model as well as fuzzy neural network to create dynamic models [14]. Luo, X. et al. in 2020 compared two types of modified Prandtl-Ishlinskii models to their Gaussian process regression modeling technique to create hysteresis models, which were then inverted into a feedforward control scheme to track the force hysteresis in PAMs [15]. Shakiba, S. et al. in 2021 designed a feedforward controller based on a rate-dependent Prandtl-Ishlinskii model in order to compensate for the hysteresis in a PAM-driven catheter with a great deal of success [16].
All of the previously mentioned PAM models either require a great deal of understanding of PAMs physical attributes and behavior, or are mathematically involved.
In order to circumvent the complications associated with the before-mentioned models, this paper introduces a modeling technique that utilizes the adaptive-network-based fuzzy inference system (ANFIS), which was first introduced in 1993 by Jang [17]. The ANFIS is a hybrid of adaptive neural networks (ANN) and fuzzy inference systems (FIS) that is capable of input-output mapping based on both human knowledge in the form of fuzzy rules and stipulated input-output data pairs to both model and control highly nonlinear systems. Being a black-box approach, the ANFIS model presented in this work will have the advantages of requiring minimal understanding of PAMs' dynamics, ease of execution, and quick construction.
The modeling and control of hysteresis PAMs remains at the focal point of the conducted research on it despite the existence of numerous schemes to achieve this goal. However, most of these approaches require a great deal of understanding of PAMs dynamics, are complex to execute, or require a lot of time to carry out. This research aims to address the hysteresis issue by introducing an ANFIS model that is capable of accurately modeling the highly nonlinear behavior at varying parameters in a simple to execute approach. These hysteresis models were used in a simple PI control scheme to showcase the model's ability to improve the tracking performance in PAMs.

Materials and Methods
The work conducted in this paper is carried out in four steps. First, the experimental setup will be discussed, including its design and components. Second, the process of data collection and processing will be explained. Third, the varying modeling techniques via the ANFIS will be explored. Lastly, an open-loop control scheme is utilized to verify the integrity of the ANFIS generated models, and then the PI control scheme to improve the tracking performance of PAMs is explored.

Experimental Setup
This work utilized the experimental setup designed originally by Al-Ma'aita. M et.al in 2019 [18]. In order to measure the hysteresis in PAMs that analogize the bidirectional movement in human muscles (or most biological muscles), an antagonistic setup was required. Three muscles were used for this work: two connected FESTO DMSP-40-305N-AM-CM 40 mm diameter stretching muscles on one side that shared a proportional valve, and a single FESTO DMSP-10-305N-AM-CM 10 mm test muscle on the other side. Both sides are connected together by a wire rope that transfers the tension created by the muscles through a pulley. The pulley rotates based on the which set of muscles is contracting. A schematic diagram for the working principle of the experimental setup is shown in Figure 1.  To measure the pressure-contraction hysteresis and pressure-force hysteresis, three different sensors were used: proportional pressure regulators (which also serve as input controllers), a laser sensor that reads the movement of a small plate attached to the test muscle, and a load cell that is attached to the wire rope and stretching muscles that reads the pulling force generated by the test muscle. It should be noted that the work for this To measure the pressure-contraction hysteresis and pressure-force hysteresis, three different sensors were used: proportional pressure regulators (which also serve as input controllers), a laser sensor that reads the movement of a small plate attached to the test muscle, and a load cell that is attached to the wire rope and stretching muscles that reads the pulling force generated by the test muscle. It should be noted that the work for this paper will solely focus on pressure-contraction hysteresis models.
Measurement of the distance (contraction) in PAMs was done using a SOEL-RTD-Q50-PP-S-7L FESTO™ laser sensor. This sensor has a working range of 80-300 mm, and a resolution of 0.3 mm. Determining this operating range was based on the literature on PAMs, where it is known that PAMs can have a maximum contraction of up to 25% of their length [19]. The muscles used in this arrangement have a length of 305 mm and a maximum contraction of 76.25 mm, accordingly. Furthermore, a laser sensor was selected due to its ability to measure the contraction in a PAM without the need for direct contact, thus reducing the errors that could result from a direct contact between the PAMs and the measuring device.
The selection of the force measurement depended on the maximum allowable loadings of the PAMs. Considering that the stretching muscles will never reach their maximum allowable loading of 6000 N, a SEWHACNM load cell model SS300-500K was selected. The rated capacity of this load cell is 500 kgf (approximately 4903.32 N), with a rated output of 2 mV/V. Additionally, the SS300-500K model is compact and low cost, allowing it to neatly fit into the rig without disturbing the transfer of the motion.
The pressure inside the PAMs is both controlled and measured by two FESTO™ VPPM-8L-L-1-G14-0L10H-V1N-S1 proportional regulators. The regulators have a pressure regulation range of 0.1-10 bar, well within the permissible operating range. Additionally, these pressure regulators have internal feedback, which eliminates the need for an external pressure sensor.
After selecting all of the components for the setup, a housing structure was created to assemble all of the components in the desired configuration. It is of the utmost importance that the housing structure is stable and does not vibrate during operation in order to minimize any noise during operation to yield reliable results. Consequently, the housing setup was constructed using I-beams that are made of AISI SAE ASTM A570 G36 steel to achieve this purpose. Figure 2 shows the experimental setup in its entirety.

Data Collection
Once the experimental setup was built, there were two remaining items that needed

Data Collection
Once the experimental setup was built, there were two remaining items that needed to be determined before proceeding into the data collection: the type of input signal to be fed into the proportion pressure regulators and the operating range of that input signal. To that end, the two input signal types were chosen to be a step input signal and a sinusoidal signal, with the voltage amplitude ranging from 0-5 V; which translates to approximately the same value in bars, thus for the remainder of this paper input voltage and pressure will be used interchangeably.
The benefit of a step input signal is that it allows for the observation of the time required for the system to achieve steady-state behavior. Subsequently, this allows for determining the frequencies at which the PAM should be ran, modeled, and controlled. As for the sinusoidal input signal, for the purposes of using the ANFIS as a modeling tool, it was necessary to have an easily differentiable function as the accuracy of the ANFIS increases greatly with the increase in inputs since PAMs, such as any pneumatic device, have only one true input and that is the pressure. Therefore, having a differentiable input signal allows for better modeling and controllability since the output of the controller can always be differentiated and inputted into the plant.
The choice for the pressure ranges from 0-5 bar was the maximum possible operating range that would show the biggest hysteresis loop without causing the system to fail. Whereas the choice for the input frequency depended on the time required for the system to achieve a steady state post-step input. A MATLAB script that allowed changing the input signals was used to both operate the PAMs and collect the data.

Data Processing
After collecting the data, it was plotted in order to visualize the hysteresis behavior. It was noted, however, that there was a lot of noise in the collected data making it impossible to accurately discern the hysteresis loop. The source of the noise can be attributed to two factors: sensor noise and the NI 9203 input card which had a minimum sampling rate of 1612.9 S/s. To remedy this issue, the 'smooth' command in MATLAB was utilized, which employs a moving average low pass filter. Applying the filter significantly improved the quality of the data.
Even though the data was filtered, examining an individual hysteresis loop remained difficult. Consequently, the filtered data needed to be plotted separately within its own cycle. Separating the hysteresis loops by cycle allows for better observations and comparisons with the ANFIS model later on.

ANFIS Hysteresis Modeling
The hysteresis was modeled using MATLAB's Neuro-Fuzzy Designer using the following steps. The first step was to collect and process three different sets of data using the same inputs to be fed into the designer as the training data, testing data, and checking data. Having three datasets in the designer is imperative for model validation as it helps the designer account for any additional data noise, as well as avoid overfitting. Initially, the datasets that were fed into ANFIS were comprised of the input voltage as the sole input, and either the contraction or force as outputs. This configuration named the single input model achieved poor accuracy at capturing the hysteresis behavior, resulting in the need to add the derivative of the input voltage as a second input to improve the quality of the generated models, which was dubbed the two-input model.
The second step was choosing the membership function (MF) type and the number of MFs for the designer to build the model around. Using trial and error, it was found that using a Gaussian-type MF and having 15 MFs per input yielded acceptable results without using excessive computational power; the MFs are shown in Figures 3 and 4. It is agreed in the literature that the type of membership function is not crucial in shaping how a model performs. The only condition that a membership function must satisfy is that it must vary between 0 and 1. The trial and error method has been found to be useful for choosing an appropriate membership function. The membership functions are selected based on simplicity, convenience, speed, and efficiency [20]. Additionally, both the ANFIS architecture and the rule base surface are shown in Figures 5 and 6. The ANFIS multilayer architecture should achieve an acceptable training error. The rule base surface helps in viewing the dependency of the output on any one or two of the inputs.
The third step was choosing the number of epochs for the designer to use. It is important to note that using an excessive number of epochs can lead to overfitting; as such, this work experimented with a number of epochs between 3-5 epochs, noting that increasing the number of epochs above three yielded negligible improvements to the model at the expense of greater processing power and computational time.
Lastly, once all of the parameters were chosen, the hysteresis model was generated and saved to be evaluated and compared to the experimental data, which will be shown in the Results section.
The hysteresis was modeled using MATLAB's Neuro-Fuzzy Designer using the following steps. The first step was to collect and process three different sets of data using the same inputs to be fed into the designer as the training data, testing data, and checking data. Having three datasets in the designer is imperative for model validation as it helps the designer account for any additional data noise, as well as avoid overfitting. Initially, the datasets that were fed into ANFIS were comprised of the input voltage as the sole input, and either the contraction or force as outputs. This configuration named the single input model achieved poor accuracy at capturing the hysteresis behavior, resulting in the need to add the derivative of the input voltage as a second input to improve the quality of the generated models, which was dubbed the two-input model.
The second step was choosing the membership function (MF) type and the number of MFs for the designer to build the model around. Using trial and error, it was found that using a Gaussian-type MF and having 15 MFs per input yielded acceptable results without using excessive computational power; the MFs are shown in Figures 3 and 4. It is agreed in the literature that the type of membership function is not crucial in shaping how a model performs. The only condition that a membership function must satisfy is that it must vary between 0 and 1. The trial and error method has been found to be useful for choosing an appropriate membership function. The membership functions are selected based on simplicity, convenience, speed, and efficiency [20]. Additionally, both the ANFIS architecture and the rule base surface are shown in Figures 5 and 6. The ANFIS multilayer architecture should achieve an acceptable training error. The rule base surface helps in viewing the dependency of the output on any one or two of the inputs.

Control Scheme
Using the Control System Toolbox provided by Simulink, the validity of the hysteresis models is verified using an open-loop control scheme where the input voltage and its derivative were fed into model and the outputs were compared to the experimental data it was based on.
Once the model is validated, a simple PI controller was constructed in order to test if the models generated by the ANFIS allow for tracking control. Figure 7 shows the control scheme used for this work. The third step was choosing the number of epochs for the designer to use. It is important to note that using an excessive number of epochs can lead to overfitting; as such, this work experimented with a number of epochs between 3-5 epochs, noting that increasing the number of epochs above three yielded negligible improvements to the model at the expense of greater processing power and computational time.
Lastly, once all of the parameters were chosen, the hysteresis model was generated and saved to be evaluated and compared to the experimental data, which will be shown in the Results section.

Control Scheme
Using the Control System Toolbox provided by Simulink, the validity of the hysteresis models is verified using an open-loop control scheme where the input voltage and its derivative were fed into model and the outputs were compared to the experimental data it was based on.
Once the model is validated, a simple PI controller was constructed in order to test if the models generated by the ANFIS allow for tracking control. Figure 7 shows the control scheme used for this work.

System Identification
A step input signal was fed into the PAM in order to measure the time the system requires to achieve steady-state behavior. Figure 8 depicts how the system responds to a

System Identification
A step input signal was fed into the PAM in order to measure the time the system requires to achieve steady-state behavior. Figure 8 depicts how the system responds to a step input voltage of 5 volts. The third subplot of the figure shows that the muscle begins to achieve steady-state behavior after approximately 150 s. Despite the system fluctuating in pressure value at 400 s, that fluctuation is cyclic and is likely due to the nature of compressed air and the friction it may experience as it is entering the muscle.

System Identification
A step input signal was fed into the PAM in order to measure the time the system requires to achieve steady-state behavior. Figure 8 depicts how the system responds to a step input voltage of 5 volts. The third subplot of the figure shows that the muscle begins to achieve steady-state behavior after approximately 150 s. Despite the system fluctuating in pressure value at 400 s, that fluctuation is cyclic and is likely due to the nature of compressed air and the friction it may experience as it is entering the muscle.  Based on the above figure, the data were collected at the following frequencies: 0.0033 Hz, 0.0067 Hz, 0.0133 Hz, and 0.0159 Hz. All of these frequencies, barring the last one, are multipliers of the input voltage sine Function (1) whose period is equal to the steady-state time of 150 s. The new datasets were used to create the final ANFIS models that would be utilized in the control scheme.
where V single is the voltage input fed into the proportional pressure regulator that controls the singular test muscle, S is the sine wave's amplitude in volts, f is 2π divided by the period of the voltage input in radians per second, and t is the time in seconds. The data extracted with these parameters are the cornerstone of this work; they were used for both modeling and tracking control where the emphasis on steady state-related frequencies makes the controller simulation less cumbersome.

Single Input Model
Assuming that PAMs is a single input single output system (SISO), the single input hysteresis models were created. Figure 9 shows the ANFIS model plotted against a single experimental hysteresis loop, where it clearly fails to capture the hysteretic behavior.
Due to only having a singular output, the model produced by the ANFIS will always be shown as linear regardless of the number of MFs or their type. Consequently, the number of inputs when creating the hysteresis model needed to change.
frequencies makes the controller simulation less cumbersome.

Single Input Model
Assuming that PAMs is a single input single output system (SISO), the single input hysteresis models were created. Figure 9 shows the ANFIS model plotted against a single experimental hysteresis loop, where it clearly fails to capture the hysteretic behavior. Due to only having a singular output, the model produced by the ANFIS will always be shown as linear regardless of the number of MFs or their type. Consequently, the number of inputs when creating the hysteresis model needed to change.

Two-Input Model
Utilizing the derivative of the input voltage as a secondary input, the ANFIS is able to capture the pressure-contraction hysteresis behavior in PAMs as depicted in Figure 10.

Two-Input Model
Utilizing the derivative of the input voltage as a secondary input, the ANFIS is able to capture the pressure-contraction hysteresis behavior in PAMs as depicted in Figure 10. The accuracy of the ANFIS model was measured via the root mean square error (RMSE), which was then normalized in order to better demonstrate the accuracy of the models. Calculating the normalized RMSE for the ANFIS model was carried out using Equation (2). The RMSE of each ANFIS model was computed against the three datasets it was trained against; these were mentioned in 2.3, which are the training data, the testing data, and the checking data. All three types of data are experimental data that the ANFIS utilizes in order to create its model. The training data will almost always have the least amount of error because it is the dataset that ANFIS bases its models upon, and then uses both the testing and checking data to test the strength of the model whilst ensuring issues such as overfitting.
ANFIS was able to achieve an average normalized RMSE of 0.0327 across all of the created models at the parameters shown in Table 1.  The accuracy of the ANFIS model was measured via the root mean square error (RMSE), which was then normalized in order to better demonstrate the accuracy of the models. Calculating the normalized RMSE for the ANFIS model was carried out using Equation (2). The RMSE of each ANFIS model was computed against the three datasets it was trained against; these were mentioned in 2.3, which are the training data, the testing data, and the checking data. All three types of data are experimental data that the ANFIS utilizes in order to create its model. The training data will almost always have the least amount of error because it is the dataset that ANFIS bases its models upon, and then uses both the testing and checking data to test the strength of the model whilst ensuring issues such as overfitting.
ANFIS was able to achieve an average normalized RMSE of 0.0327 across all of the created models at the parameters shown in Table 1. It is evident from Table 1 that the addition of a secondary input not only allows the ANFIS to capture the hysteretic behavior in PAMs, but also allows it to accurately models their behavior.
Additionally, it can also be noted that the accuracy of the model is not meaningfully affected by the change in frequency, and thus it is possible to apply the ANFIS to other operating ranges of PAM.

Generalized Models
Up to this point, modeling was exclusively based on datasets which were collected under fixed input voltage frequencies and amplitudes. The two-input modeling technique was applied to experimental data that changed its frequency and amplitude range every 3 cycles for 27 cycles, which created 9 unique parameter combinations that are based on the inputs shown in Table 2. Table 2. The input voltage parameters that the generalized model was based on.

Voltage Amplitude Range (V) Frequencies (Hz)
0-3 0.08 0-4 0.16 0-5 0.32 The ANFIS is able to accurately model the hysteretic behavior with an average normalized RMSE of 0.0408. A portion of this generalized model is depicted in Figure 11.
Actuators 2021, 10, x FOR PEER REVIEW 11 Table 2. The input voltage parameters that the generalized model was based on.

Voltage Amplitude Range (V)
Frequencies (Hz) 0-3 0.08 0-4 0.16 0-5 0.32 The ANFIS is able to accurately model the hysteretic behavior with an average malized RMSE of 0.0408. A portion of this generalized model is depicted in Figure 11  It can be inferred from the above figure and normalized RMSE that the accurac ANFIS modeling when modeling a changing input voltage is notably lower than th curacy of models that are based on fixed parameters. Additionally, the change of i frequency and amplitude has minimal impact on the accuracy of the ANFIS model. It can be inferred from the above figure and normalized RMSE that the accuracy of ANFIS modeling when modeling a changing input voltage is notably lower than the accuracy of models that are based on fixed parameters. Additionally, the change of input frequency and amplitude has minimal impact on the accuracy of the ANFIS model.

Model Verification
As mentioned in the previous chapter, validity of the model was verified using an open-loop control scheme. Figure 12 compares the output of the model created at 0.0067 Hz frequency against an experimental dataset using the same parameters where the normalized RMSE was 0.02843. Examining the above figure clearly indicates that the output of the ANFIS model in an open-loop scenario matches that of the experimental data. Furthermore, the contraction of the PAM seems to mimic that of the sinusoidal voltage fed into.

Tracking Control
Upon validating the ANFIS model, the PI control scheme shown in Figure 3 was used in order to simulate the tracking control of sinusoidal and step references. The results of this simulation are shown in Figure 13. Investigating the above figure, it can be observed that the sinusoidal reference was achieved much faster than their step counterpart. This can be attributed to the fact that the ANFIS model itself was based on a sinusoidal signal due to its easy to differentiate nature. Furthermore, the results shown in Figure 8 are based on a reference frequency of 0.0001 rad/s, which is a much lower frequency than the experimental data which the AN-FIS model was trained on. The PI controller had difficulty achieving acceptable tracking when the frequency was increased, which still requires further investigation.
Nonetheless, the simple PI controller showed great results in modeling the highly nonlinear hysteretic behavior of PAMs. Examining the data produced by the simulation Examining the above figure clearly indicates that the output of the ANFIS model in an open-loop scenario matches that of the experimental data. Furthermore, the contraction of the PAM seems to mimic that of the sinusoidal voltage fed into.

Tracking Control
Upon validating the ANFIS model, the PI control scheme shown in Figure 3 was used in order to simulate the tracking control of sinusoidal and step references. The results of this simulation are shown in Figure 13. Examining the above figure clearly indicates that the output of the ANFIS model in an open-loop scenario matches that of the experimental data. Furthermore, the contraction of the PAM seems to mimic that of the sinusoidal voltage fed into.

Tracking Control
Upon validating the ANFIS model, the PI control scheme shown in Figure 3 was used in order to simulate the tracking control of sinusoidal and step references. The results of this simulation are shown in Figure 13. Investigating the above figure, it can be observed that the sinusoidal reference was achieved much faster than their step counterpart. This can be attributed to the fact that the ANFIS model itself was based on a sinusoidal signal due to its easy to differentiate nature. Furthermore, the results shown in Figure 8 are based on a reference frequency of 0.0001 rad/s, which is a much lower frequency than the experimental data which the AN-FIS model was trained on. The PI controller had difficulty achieving acceptable tracking when the frequency was increased, which still requires further investigation.
Nonetheless, the simple PI controller showed great results in modeling the highly nonlinear hysteretic behavior of PAMs. Examining the data produced by the simulation Figure 13. PI-controlled PAM simulation against a reference: (a) sinusoidal reference; (b) step reference.
Investigating the above figure, it can be observed that the sinusoidal reference was achieved much faster than their step counterpart. This can be attributed to the fact that the ANFIS model itself was based on a sinusoidal signal due to its easy to differentiate nature. Furthermore, the results shown in Figure 8 are based on a reference frequency of 0.0001 rad/s, which is a much lower frequency than the experimental data which the ANFIS model was trained on. The PI controller had difficulty achieving acceptable tracking when the frequency was increased, which still requires further investigation.
Nonetheless, the simple PI controller showed great results in modeling the highly nonlinear hysteretic behavior of PAMs. Examining the data produced by the simulation showed that the controller was able to achieve a mean tracking error of 8.1 µm and 18.3 µm for the sine and step references, respectively.

Discussion
The results showed that attempting to model the hysteresis in PAMs via theANFIS using a singular input fails. The inability to capture the hysteretic behavior is most likely due to the fact that the input voltage is a repeating cyclical input, which means that the ANFIS has no other input to determine the state at which the system is in, i.e., contraction or expansion. Since hysteresis is a state-dependent phenomenon having a sole input that cannot provide indication on the state of the system, it will never be sufficient to create accurate models or even capture the hysteresis present in PAMs.
Utilizing two inputs to model the highly nonlinear hysteresis in PAMs via the ANFIS has shown great aptitude at capturing their behavior, especially the localized models where the input parameters are constant. Regardless of the dip in accuracy when attempting to create a more generalized model, it remains well within the acceptable error range.
Despite the excellent accuracy provided by the two-input modeling technique, the limitation of modeling using this method stems from the need for having a differentiable input voltage, or being able to know the rate of change in input during the data collection process. Nonetheless, ease of execution, speed of execution, ability to create generalized models, and excellent accuracy make using and further exploring other or additional secondary inputs in the modeling technique worthwhile.
The simulation of the PI control scheme has shown promise in the model's capacity to allow for hysteresis compensation. While the results indicate that the controller works on impractical frequencies or is incredibly slow to achieve perfect tracking in a step response, this demonstrates how well the ANFIS-created models lend themselves to controllers. Consequently, future work should attempt to design more involved control schemes that make better use of the ANFIS models to both track and compensate against disturbances.

Conclusions
Pneumatic artificial muscles' (PAMs) highly nonlinear hysteretic behavior was investigated, modeled, and controlled in this work. A novel black-box approach in an adaptive-network-based fuzzy inference system (ANFIS) was employed to model the hysteresis nonlinearities at varying input frequencies.
While the literature suggests that the ANFIS is more commonly used for control schemes in PAMs, its ability to capture highly nonlinear behaviors warranted this investigation. The results of the ANFIS modeling technique using the input voltage and its derivative displayed excellent accuracy for local and generalized inputs. An obvious limitation of this modeling technique is the need to have a differentiable input, or a differentiable approximation of an input in order to capture the hysteresis loop.
A simple PI controller was designed and simulated using the two-input ANFIS model in order to improve the tracking properties of the PAM, which performed well against both the step and sinusoidal references. The PI controller was limited in application, as the response time for the step reference was considerably slow, but achieved perfect tracking once it matched the reference. Even though the controller had an excellent performance against a sinusoidal reference, the frequency of the reference is approximately 150 times smaller than that of the data the ANFIS model was trained against, which warrants further investigation. Demonstrating tracking capabilities at much higher frequencies remains beyond the scope of this work. This is due to the fact that a more advanced control scheme would be required to achieve such a feat. Nonetheless, the simple controller served as a proof of concept that ANFIS-generated hysteresis models are controllable.
In conclusion, the ease of execution, speed of creation, and replicability make the two-input ANFIS models a sufficient tool in modeling the highly nonlinear behavior of PAMs with room for further improvement and refinement.