Real-Time Fuzzy Logic Control of Two-Link Flexible Manipulators

: This study investigates the development of a Fuzzy Logic Controller (FLC) for tracking a sinusoidal wave trajectory and suppressing the vibration of a Two Link Flexible Manipulator (TLFM). The TLFM was modeled using Lagrange's formalism and the Assumed Mode Method (AMM). A three-part apparatus consisting of a TLFM mathematical model, a real-world TLFM, and control software was designed and implemented. The FLC was applied to both the simulated and real-world TLFM. The robustness of the FLC was investigated by considering variable payload mass and link angular velocity in both constructive and destructive link interference trajectory cases. Simulation and experimental results show the effectiveness and robustness of the proposed FLC.


Introduction
Rigid Link Manipulators (RLMs) are extensively used in various industries, typically for pick-and-place and assembly line operations (Zebin and Alam, 2012). However, Flexible Link Manipulators (FLMs) are becoming a popular alternative to RLMs due to their lightweight, high speed, and lower operating costs. These factors make them more attractive in many applications. For example, the lightweight construction of a manipulator is essential in the aerospace industry, as it makes it cost-effective and safer to operate. On the other hand, FLMs are inherently highly nonlinear and distributed, underactuated systems with non-collocated actuators and sensors. As a result, they often require robust closed-loop control to overcome these issues (Tokhi and Azad, 2008).
Designing, manufacturing, and implementing FLM test facilities are time-consuming and expensive. Therefore, a more suitable platform is desired for implementing and experimentally validating different control schemes. Mathematical models of FLMs, implemented in simulation environments have the potential to satisfy this need. Single-link FLMs lack the intricacies of multi-link FLMs, so a planar TLFM that captures the coupling between the rigid and flexible motions of the elbow and shoulder links is considered. The dynamics of FLMs are typically viewed as the superposition of rigid bodies and flexible dynamics. Due to the well-developed kinematics approach to controlling rigid manipulators, convention dictates that flexible dynamics are addressed independently. To this end, vibration control strategies developed for these and other applications are implemented. There are two vibration control strategies for FLMs: Passive and active (Tokhi and Azad, 2008). Passive control adjusts the physical properties of the FLM to reduce the complexity of the control problem. It can dampen high vibrational modes less effectively handled by active control. However, passive control alone cannot eliminate the large amplitude deflections, which must be dealt with using active methods (Subedi et al., 2020;Lochan et al., 2016;Kiang et al., 2015;Tokhi and Azad, 2008;Saragih and Mahardhika, 2009).
LQR is a control technique that utilizes a state-space approach to analyze a system. This technique is based on the idea of transferring the designer's iterations on pole location, as used in state feedback, to iterations on the elements in some cost function J concerning the state x and control u subject to the constraint x given state for all x ∈ R n (Khairudin et al., 2011;Alandoli et al., 2017). On the other hand, SMC consists of a two-step procedure. The first step is to describe the control objective in terms of a state space surface, namely the sliding surface. This surface choice must be developed such that the system trajectories satisfy the performance specifications when the sliding variable lies on the sliding surface. The second step, controller design, is represented by the definition of a control action that steers the state trajectories onto the sliding surface after a finite transient time (Kherraz et al., 2014;Lochan et al., 2015;Wang and Sun, 2014;Mamani et al., 2012;Gao and Lu, 2022).
Fuzzy Logic Control (FLC) is a linguistic-based control scheme that incorporates human-like characteristics within a controller. This type of controller is rooted in the vagueness surrounding the classification of inputs (Lochan et al., 2016;Abdullahi et al., 2013;Pradhan and Subudhi, 2013;Li et al., 2013;Kasruddin Nasir et al., 2022;Ponce-Cruz and Ramírez-Figueroa, 2010;Alandoli et al., 2021). Neural Networks (NNs), conversely, mimic the way the brain works, with their architecture primarily determined by the connections between elements. Because of this, NNs, along with fuzzy logic, are considered artificial intelligence. NNs can be trained to perform a specific function by adjusting the values of the connecting weights between elements (Pedro and Tshabalala, 2015;Jiang, 2015;Al-Assadi et al., 2011;Yan and Wang, 2012;Rahmani and Belkheiri, 2019). Hybrid neuro-fuzzy controllers consist of two significant parts: The NN controller, followed by the FLC. While NNs on their own can be challenging to understand because the variables lack meaning, they are often combined with fuzzy logic, producing a more intuitive approach for operators and controller designers (Qiu et al., 2019;Antony, 2019;Kharabian and Mirinejad, 2020;Alandoli and Lee, 2020;Khan and Kara, 2020;Tinkir et al., 2010).
FLCs are becoming increasingly popular due to their ease of use and modification by system operators. Sayahkarajy et al. (2016); Lochan et al. (2016) provide a comprehensive review of the control of TLFMs, noting FLC as capable of controlling TLFMs. However, most experiments are simulation-based, thus necessitating additional real-time experimentation and validation. The premise of this study is to experimentally validate direct adaptive Mamdani-type FLCs for vibration suppression and trajectory tracking (Pradhan and Subudhi, 2013;Li et al., 2013;Kasruddin Nasir et al., 2022). The controllers are designed directly based on the fuzzy rule base to satisfy the control objectives. In this study, the Mamdani fuzzy logic control technique and its implementation for the TLFM control will be discussed in detail (Behera and Kar, 2010). The choice of the Mamdani fuzzy inference system is motivated by its ability to provide good results with a relatively simple structure and interpretable rule base. It is also characterized by its expressive power, i.e., its unique ability to simultaneously use numerical and verbal data from human knowledge and experience and easy formalization (Fahmy and Zaher 2015).
The paper makes significant contributions in three areas: Firstly, it verifies and validates the mathematical model for predicting the dynamics of a TLFM; secondly, it designs and validates direct adaptive Mamdani-type FLCs for both trajectory tracking and vibration suppression of the nonlinear, complex, and underactuated TLFM test rig; and finally provides a detailed analysis of the proposed controller's robustness to payload variations and modeling errors arising from the inclusion of actuator dynamics.

System Mathematical Modelling
The mathematical model of the TLFM is derived using Euler-Lagrange and the assumed modes methods (Subudhi and Pradhan, 2016;Khairudin et al., 2010;Lee and Alandoli, 2020;Subedi et al., 2021). The Assumed Modes Method (AMM) entails vibration analysis of the flexible links such that modes and natural frequencies are assumed and the deflection thereof is superimposed with the deflection due to the inertia of the payload (Nguyen and Morris, 2007). The AMM has been successfully used in describing the dynamics 50 associated with the TLFMs (De Luca and Siciliano, 1991;Zebin and Alam, 2012). Using AMM to produce a closed-form equation describing the TLFM is errorprone due to the fact the number of modes is assumed. Thus, a modal analysis using Finite Element Method (FEM) is conducted on the links to determine the predominant modes of vibration and the frequencies thereof. To describe the dynamics of a TLFM, it is first necessary to derive the general expression for an n-link Flexible Manipulator (FM). Figure 1 shows the local and global reference frames used in the derivation of the equations of motion.
The coordinate reference frames used include the global reference frame, denoted by the axes (X0, Y0), the local link reference frame, denoted by the axes ( (Lochan et al., 2016) is the slope, and vi(xi, t) is the bending deflection at any point xi and time t along the i th link. The elastic homogeneous transformation matrix, Ei, is given by Eq. 2: where, li are the length of the i th link. Let a position vector on the i th link with respect to the (Xi, Yi) reference frame and the same position vector with respect to the (X0, Y0) reference frame be denoted as 0 i r . The position of the origin of the (Xi+1, Yi+1) reference frame with respect to the (Xi, Yi) reference frame may thus be expressed as: where, 1 i i p  is evaluated at xi = li in Eq. 3. The position of the origin of the (Xi+1, Yi+1) reference frame with respect to the (X0, Y0) reference frame is denoted as 0 i p .
where, T0 = I and I is an identity matrix of size 2 × 2. In Eqs. 5-6 the global transformation matrices are used to express any position vector ri 0 on the i th link as well as the position of the (i +1) th link origin with respect to the (X0, Y0): and: 00 11 The general form of the Euler-Lagrange equation denoted by Eq. 7, considers both the kinetic and potential energies of the system: where, Lagrangian L = T −V and T and V are the total kinetic and potential energies of the system, respectively. Fi is the torque vector associated with the hub motors. D is the Rayleigh's dissipation function. The total kinetic energy of the manipulator is given by Eq. 8: where, TR is the kinetic energy of the hubs, TL is the kinetic energy of the links and TPL is the kinetic energy of the payload. Shown in Eq. 9 is the kinetic energy of the i th hub: where, Ji is the moment of inertia of the hub about the i th hub axis and i  is the angular velocity associated with the i th link about the hub axis. Equation 10 is the total kinetic energy for n-hubs: Expressed in Eq. 11 is the link kinetic energy: where: ρi is the mass per unit length. The term 0 i r in Eq. 12 is a result of differentiating Eq. 5. 0 i p is determined by differentiating Eqs. 3 and 6, thus expressing 0 The derivative of the global transformation matrix is recursively calculated and is shown to be: In Eq. 13, ˆi S is defined as the sign matrix having the following entries 01 10 The transpose of Eq. 12 is evaluated using matrix identities. Summing Eq. 11 over the number of links results in the total kinetic energy shown in Eq. 14: Payload dynamics is necessary, particularly in cases where the endpoint has significant mass, which may change. The kinetic energy associated with the payload is given by where, (EI)i is the flexural rigidity of the system. In Eq. 7, Rayleigh's dissipation function for all links is given in matrix form by Eq. 17: where matrix C is a diagonal damping matrix consisting of damping coefficients, where the number of rows is equal to n and the number of columns is equal to nm (number of modes). Vector q is the modal displacement vector. The deflection of the links is expressed by superimposing Eq. 18 with vibration analysis: The typical form of Euler-Bernoulli's beam theory is given in Eq. 18. The following cantilever beam boundary conditions are considered:

e The slop is zero at a fixed location dx 
Equations 19-20 describe the relationship between shear force, bending moment, and deflection. In the case of a flexible manipulator, the V(x) and M(x) terms are replaced with equivalent shear force and bending moment terms that account for the link mass, payload mass, and distal link masses, as in Eqs. 21-22: 52 Hence Eqs. 21-22: where, MEi and IEi are the effective mass and inertia associated with the i th link, whilst MDEi is the effective equivalent mass of the distal links concentrated at the end of the i th link. The expressions are: 2 , , The variables mi, MLi, ILi, and MDi are the individual link mass, link mass expression, link inertia expression, and distal link mass expression, respectively. The approximate deflection of a continuous beam, under vibratory conditions (different modes), is given by Eq. 23: where, γij(xi) is the mode shape function (j = 1,2,..., n), related to the i th link and qij(t) is the modal displacement for the i th link based on the j th mode shape. Combining Eqs. 18 and 23 yields Eq. 24: is a constant equivalent to the natural frequency squared at the given j th mode of vibration (ωij 2 ). Thus, rearranging Eq. 24 into temporal and spatial components gives Eqs. 25 and 26: From Eq. 26, the second-order homogeneous differential equation of the form y ay  + by = 0 is solved to give the expression for qij in Eq. 27: To solve for the mode shape function, consider Eq. 25 and apply the general 4 th order homogeneous differential equation solution. Solving for the constants using the cantilever boundary conditions results in Eq. 28, noting the expression for γij(xi) as: where the normalizing mode shape constant, Nij, is equivalent to mi and δij is given by Eq.
Calculating the natural frequency of the i th link with regard to the j th mode shape is required to describe the deflections associated with any point along each flexible link. Equation 31 is used to solve for the natural frequency: Considering only two flexible links, the superposition of the deflections in Eqs. 18 and 23, yields the total deflection at any position xi, which when combined with Euler-Lagrange energy equations, results in the closedform expression in Eq. 32 (Subedi et al., 2021): where, M is the positive, symmetric inertia matrix, D is the damping matrix, K is the link stiffness matrix and τ is the torque vector. The h vector is defined in Eq. 33 using Christoffel symbols: For mathematical modeling purposes, both the shoulder and elbow actuators' dynamics were unspecified, thus using the MATLAB system identification toolbox, transfer functions describing the dynamics were approximated from the real-time inputoutput data. The transfer functions describe the relationship between the given in Eqs.
The flexible link properties and servo drive settings are given in Tables 1-2, respectively. In Table 1, link 1 refers to the link closest to the base, whilst in Table 2, servo drive 1 refers to the shoulder motor drive. Figure 2 shows the general form of a PD-like direct adaptive Mamdani-type FLC architecture, where the setpoint together with the negative feedback produces an error, e. The error is an input to the FLC, where it is then fuzzified, rules are inferred and the fuzzy value produced is defuzified to crisp control output. To reduce jerking, the derivative of the error is also an input to the FLC (Subedi et al., 2020;Sayahkarajy et al., 2016). The FLC input-output membership functions may take many different forms, with the most common being triangular and spanning the controller operating range (Gao and He, 2016). Mamdani-type FLCs have an IF antecedent, then consequent rule-base structure (Jantzen, 2013), where the antecedent and consequent are both fuzzy sets. This property defines Mamdanitype FLCs. Using the input membership functions, the rule base, and the output membership functions, a fuzzy value is produced. The fuzzy value is defuzzified to control output, typically by means of the center of gravity method (Jantzen, 2013). Unlike Takagi-Sugeno fuzzy logic, explicit system identification is not needed for controller design when using the Mamdani fuzzy logic inference engine (Behera and Kar, 2010).

Controller Implementation
The main goal of the controllers is to track a generated desired input yd = [θ1d, θ2d, ε1d, ε2d ] T , where θ1d and θ2d are the desired hubs' angles, respectively; and ε1d and ε2d are the endpoint deflections (strains).
where, max d  and f are the amplitude and frequency of the sine wave for the desired hub angle, respectively. ε1d = ε1d = 0 because, in addition to trajectory tracking, we are also concerned with vibration suppression. PD-like Mamdani fuzzy logic controllers were developed for each of the controlled Degrees of Freedom (DoF), i.e., trajectory tracking and vibration suppression. The input to each of the controllers was the state error and the time rate of change of the state error. Figure 2 shows the implemented FLC architecture.

Real-Time Trajectory Tracking
The inputs to the trajectory tracking FLC are the tracking error and the time rate of change of the tracking error. The closed-loop PD and PID input-output data is used to obtain the primary closed-loop observation of the TLFM dynamic behavior. This gave the operational closed loop ranges of the tracking error and its corresponding time rate of change. This information was used as an initial knowledge base. Once the initial knowledge base had been established, membership functions for the controller input and output variables had to be developed.
The trajectory tracking input and output membership functions are shown in Figs. 3-4, respectively. Similarly to (Zebin and Alam, 2012), the membership functions selected are predominantly triangular. There are two inputs and two outputs associated with the trajectory tracking FLC. The trajectory tracking FLC inputs are the errors due to the difference between the set point trajectory and the actual trajectory, whilst the outputs are the motor-supplied voltages, with the corresponding servo drive settings in Table 2.
The trajectory tracking FLC inputs are classified into five fuzzy sets, namely negative and positive strong, negative and positive weak, and median. These sets are centrally clustered such that the trajectory tracking FLC sensitivity is increased and the stability is decreased. The input ranges are: -120° ≤ x ≤120°, where the inputs are saturated when x ≤ -10° and x ≥10°. Similarly, the trajectory tracking FLC outputs are classified into five fuzzy sets, namely fast Anticlockwise (A-C), fast Clockwise (C), medium A-C, medium C, and slow/no. The output ranges are: -4 V ≤ x ≤4 V and -4.4 V ≤ x ≤ 4.4 V, respectively, where the latter refers to the shoulder actuator. Note that the central trapezoidal output membership function for both the trajectory tracking FLC outputs accounts for the dead zone in the actuators. The trajectory tracking FLC rule base consists of ten rules, each consisting of one antecedent and one consequent. Tables 3-4 show the rules. Note that the numbers in each element of the tables refer to the rule number, where in Table 3 Table 4, where A-C = anticlockwise and C = Clockwise. Figure 5 shows the fuzzy surface with the saturationlike relationship between the elbow angle error input and the elbow motor-supplied voltage output. Thus, a small angle error results in a large control output. This is true for the relationship between the shoulder angle error input and the shoulder motor-supplied voltage output as well.

Real-time Vibration Suppression
The vibration suppression input and output membership functions are shown in Figs. 6-7, respectively. There are six inputs and two outputs associated with the vibration suppression FLC. The vibration suppression FLC inputs are the errors due to the difference between the set point strain of zero and the actual strain. Like the trajectory tracking FLC, the vibration suppression FLC outputs are the motorsupplied voltages. The vibration suppression FLC inputs are classified into five fuzzy sets, namely negative strong, positive strong, negative weak, positive weak, and median. The input ranges are -0.
respectively, progressing in the order from the strain gauge closest to the payload.   The vibration suppression FLC outputs are classified into seven fuzzy sets, namely fast Anticlockwise (A-C), fast Clockwise (C), medium/fast Anticlockwise (A-C), medium/fast Clockwise (C), slow/no, medium Anticlockwise (A-C) and medium clockwise (C). The vibration suppression FLC output ranges are -1.5 V ≤ x ≤ 1.5 V and -3.5 V ≤ x ≤ 3.5 V, respectively, where the latter refers to the shoulder actuator.
The vibration suppression FLC rule base consists of one hundred and one rules, each consisting of three antecedents and one consequent. Tables 5-6 give the rules. The tables are symmetrical and the first three strains are considered for the tip link, whilst the next three strains are for the base link. This reduces the number of rules and since the links are inherently coupled through the strains, this may be done. Note that NS = Negative Strong, NW = Negative Weak, M = Median, PS = Positive Strong, and PW = Positive Weak. Figure 8 shows the fuzzy surface with the relationship between the first strain error and the elbow motor supplied voltage output. Figure 14 shows that a peak/trough strain error behavior exists. There are four peaks and four troughs, each pair representing a quarter cycle. A peak corresponding to the maximum strain error of 2,25 V occurs at t = 2s and corresponds to a strain that is a result of the flexible link being momentarily stationary at the turning point and, due to inertial drag, starts experiencing increased strain as the link progresses from the turning point to t = 2s.

Experimental Facilities
Like in Khairudin et al. (2011);Subudhi and Pradhan (2016), the real-time TLFM test rig consists of two flexible links connected in series and actuated both at the shoulder and elbow joints by means of armature-controlled DC motors. The motors are 12 V, 0.59 nm, and 24 V, 1 nm, with the latter being the shoulder actuator. The reason 56 the actuators have different load ratings is due to the respective load that either actuator is expected to carry (rotate). Both motors are driven by separate 24 V DC servo drives and power supply combinations. Collocated and non-collocated feedback is achieved by means of two incremental encoders, one at each joint, and six full-bridge strain gauges, three on each link. The incremental encoders have 500 pulses per revolution and the strain gauges are rated 120 Ω. Feedback from the incremental encoders is used for trajectory tracking, while feedback from the strain gauges is used for vibration suppression. Due to the millivolt output from the strain gauges, a six-channel strain gauge amplifier is used with a gain of 1000 to amplify the strain signals before acquisition. The realtime data acquisition and transmission are achieved by means of a NI PCI6221 (68-pin) data-acquisition card slotted into a real-time target PC and coupled with an SCB-68 terminal box. A NI PCI8232 ethernet card is used for serial communication between the host PC and the real-time target PC. The real-time target route was chosen for the deterministic processing of data.   3,5,7,11,6,8,9,27 33,35,36,30,32,34,28,29,voltage 4,10 12,13,19 14,15,16,41,42,43,38,39,40,31,37 17,18,20,44,45,47,46 21,22,23,48,49,50,24,25,26 51,52,53 Base motor 54,55,56,58,60,59,61,62,80 86,88,89,83,85,87,81,82,voltage 57,63 64,65,66,67,68,69,94,95,96,91,92,93,84,90 72 70,71,73,98,100,102,99 74,75,76,103,104,105,77,78,79 106 57 Fig. 9: Two-link flexible manipulator test rig The control software was developed in LabVIEW and deployed from the host PC to the real-time target PC. To control the TLFM without the necessity of a host PC, an Arduino-based control panel was constructed, which would relay user input to the real-time target PC. Additionally, a trajectory tracking table supported the base of the TLFM such that the incremental encoder outputs may be verified and calibrated visually. Figure 9 shows the designed experimental test rig for the TLFM.
An accelerometer and gyro meter combination were mounted on the tip of each link (Fig. 9). This provides an alternative form of deflection feedback and may substitute or be used in conjunction with the strain gauges for vibration suppression. The end effector/gripper has a mass of 180 g without payload, whereas with payload, the total mass is 280 g. The layout of the TLFM is shown in Fig. 10.

Numerical Simulations
Performing a modal Finite Element Analysis (FEA) on both flexible links (Table 1 for the geometrical parameters of the links) yielded the conclusion that the first two modes of vibration were the most dominant. Thus, using Eq. 34 and considering only two modes of vibration for each link, the mathematical model block diagram was constructed in LabVIEW control and simulation environment. Coupled with actuator dynamics, the mathematical model allowed for the preliminary development of both trajectory tracking and vibration suppression FLCs. The FEA results are presented in Fig. 11 and Table 7.
Sinusoidal trajectory tracking is investigated in this study since it reflects common repetitive back-and-forth applications. As such, the actual trajectory of both links in a constructive interference case is shown in Fig. 12. Both cases in Figs. 12-13 are conducted at 0.2 cycles per second (cps) with a 100 g payload. Figure 13 shows the results of a destructive interference case, where destructive interference refers to the trajectories of both links being out of phase by 180. Figure 15 shows that the destructive test case resulted in a more uniform strain error. The oscillatory behavior from Fig. 14 was mitigated. Both the average and absolute maximum strain errors were significantly reduced by introducing destructive link interference.
To construct robust trajectory tracking and vibration suppression FLCs, sixty-four test cases were considered.
The test cases were limited to a maximum angular velocity of 0.2 cycles per second and a trajectory tracking amplitude of 60°. The test cases considered are presented in Table 8.  it is seen that the average angle error is increased for a payload of 100 g. This is due to the increased inertia. Both the average and absolute maximum strain errors are comparable to data in the published literature. Test cases M and N are the worst cases, as the increased distance results in a system response that is too slow. Figures 18-19 show the FLC control outputs corresponding to Figs. 12 and 16. Figure 18 is the control provided by the trajectory tracking FLC, whilst Fig. 19 is the control provided by the vibration suppression FLC. The shoulder actuator control voltage is larger due to the size of the shoulder actuator. The oscillatory behavior in Fig. 14 is the opposite and repeated in the vibration suppression control action in Fig. 19.
The mathematical model proved that it sufficiently approximates the real-time test rig in that only minor tuning modifications was made for adaptation. From Figs. 12-13, the introduction of destructive link interference resulted in a reduction in trajectory tracking angle error in both links. This is justifiable, considering that the angular momentum of either flexible link effectively acts against one another in a destructive case. This was, however, not true throughout all the test cases, as seen from Figs. 16-17. Considering the fact that the average and absolute maximum trajectory tracking and vibration suppression errors were roughly similar for each 0° phase-180° phase pair means that the trajectory tracking and vibration suppression FLCs display a degree of robustness. The introduction of a payload resulted in both the average and absolute maximum angle and strain error increasing slightly. This is in line with the increased system inertia. Figures 14-15 show that the maximum strain errors occur just after or before a turning point. This can be attributed to the acceleration and deceleration of the flexible links.
The introduction of destructive interference results in less strain error when comparing Figs. 14-15. Similar to trajectory tracking, this is due to the inertial cancellation of the flexible links. The largest strain errors induced on each link are representative of the common mode of vibration that the links are experiencing. The tip link predominantly vibrated in the second mode of vibration, whilst the base link vibrated predominantly in the first mode of vibration. The best test cases, in Figs. 16-17, represent single-link motions. This may be due in part to the systematic tuning of the FLCs; however, it may also be attributed to the reduction in link motions occurring.
The worst case occurred when tracking a 60° amplitude sinusoidal trajectory. This case was followed by the user input test cases, where x and y coordinates 59 were specified. The trajectory tracking angle errors of the user input cases are due to large start-up torque requirements as well as the conflicting behavior between the trajectory tracking and vibration suppression FLCs. The conflicting behavior between both controllers occurs due to the opposite in rotation control outputs. This was mitigated by applying gains to both controllers' outputs, making the trajectory tracking FLC more dominant, and by applying delays in the control software looping structure. The conflicting controller behavior is shown in Figs. 18-19, where at a given time t, the control outputs may be opposite in sign. The use of triangular membership functions for both inputs and outputs aided in cheap computing. Figure 18, the saturation-like trajectory tracking FLC resulted in control outputs that plateaued. This induced slight jerking in the base link, however, was necessary such that the limits of the actuators were not exceeded. The results of the test cases are shown in Figs. 16-17, were conducted with a payload and at 0.2 cycles per second. From these results, the maximum average angle error was 3.2°, whilst the maximum absolute angle error was 9.8°. Although the maximum absolute angle error is observably high, it made sense considering the system's capabilities. Hence showing that N and M test cases represent the threshold of effective control for the proposed FLCs. The maximum average strain error was 1.2 V, whilst the maximum absolute strain error was 3.1 V.

Conclusion
The mathematical model allowed for the sufficient development of the preliminary FLCs. Deviations from the mathematical model were mostly attributed to the actuator dynamics approximations. The proposed FLCs for both trajectory tracking and vibration suppression showed good robustness qualities, disturbance rejection, and noise attenuation. Destructive link interference is preferred since it generally reduces the angle and strain errors. Future work will involve the applications of different types of single-objective and multi-objective optimization algorithms to tune the proposed FLCs gains and their associated membership functions.

Juan-Paul
Hynek: Designed the direct adaptive Mamdani-type fuzzy logic controllers for both the trajectory tracking and vibration suppression of the nonlinear, complex, and underactuated two-link flexible manipulator. Designed and built the test rig used for experimental validation.

Ethics
This article is original and contains unpublished material. The corresponding author confirms that the second author has read and approved the manuscript. The authors declare that there are no ethical issues and no conflict of interest that may arise after the publication of this manuscript.