Implementation and intelligent gain tuning feedback–based optimal torque control of a rotary parallel robot

Aiming at operating optimally minimizing error of tracking and designing control effort, this study presents a novel generalizable methodology of an optimal torque control for a 6-degree-of-freedom Stewart platform with rotary actuators. In the proposed approach, a linear quadratic integral regulator with the least sensitivity to controller parameter choices is designed, associated with an online artificial neural network gain tuning. The nonlinear system is implemented in ADAMS, and the controller is formulated in MATLAB to minimize the real-time tracking error robustly. To validate the controller performance, MATLAB and ADAMS are linked together and the performance of the controller on the simulated system is validated as real time. Practically, the Stewart robot is fabricated and the proposed controller is implemented. The method is assessed by simulation experiments, exhibiting the viability of the developed methodology and highlighting an improvement of 45% averagely, from the optimum and zero-error convergence points of view. Consequently, the experiment results allow demonstrating the robustness of the controller method, in the presence of the motor torque saturation, the uncertainties, and unknown disturbances such as intrinsic properties of the real test bed.


Introduction
In applications where higher acceleration and velocity and better accuracy and lighter weight are essential or where a comparatively high bearing capacity per robot weight is required, parallel mechanisms are alternatively preferred to serial manipulators (Taghirad 2013, Tajdari et al. 2017b. Namely, some of the applications are space interferometry, spacecraft communication devices (Furqan et al., 2017), flight simulator (Huang et al., 2016), surgery (Orekhov et al., 2016) production line, and scanning (Huang et al., 2018). Among the other things, the high accuracy scanning of the human body for the purpose of surgeries, designing anatomical adaptable rehabilitation devices (Nomura et al., 2016), and next generation of Ultra Personalized Products and Services (UPPS) (Kwon andKim 2012, Yang et al. 2020) attract more attention. It shows the importance of health and humanity survival and how it is influenced by robots' high precision. One of the interesting scanning scenarios is fast automated breast scanning (Chen et al. 2015, Merouche et al. 2015, Sun et al. 2018 which is supposed as the future application of this study. However, because of the flexibility and deformation of the breast tissue, it is a very complex action. The needs of such robots are revealed especially during motion scanning. High accuracy needs good knowledge of kinematic, dynamic, and control of a parallel robot to investigate complex dynamic and accordingly sophisticated control approaches (Shoham et al., 2003). Well-known parallel robots with wide usage in the aforementioned applications were extracted from the mechanism presented by Gough (1962) and Stewart (1965) based on the fundamental of the recent parallel robots.
Addressing the first issue, solving the kinematics of the parallel robots is considerably complicated because they do not have a definite solution. Also, there is no closed form for these kinds of equations (Sosa-Méndez et al., 2017). Kinematics of the robot with linear manipulator was widely studied in recent years, namely Geng et al. (1992); Petrescu et al. (2018); and Tajdari et al. (2020c), whereas mechanisms with rotary actuators are less studied due to additional complexity of rotation. Thus, in this article, a Stewart robot with rotary manipulator is investigated, owing to the fact that it is faster than a Stewart platform with linear actuators in control responses (Van Nguyen and Ha, 2018). Also, it has less production and maintenance cost, less weight, easier installation procedure (e.g., surgical goals), and powerful ability of integration with other mechanisms (Patel et al., 2018).
Regarding the complex mechanism, the kinematic equation of the robot is a key to dynamical analysis of the parallel robot. In addition, main challenges in the deriving of the dynamic equations are the relationship description between internal or external forces and torques, the states of end effector for controller design, and feasibility study of the robot. Considering the dynamical analysis, several approaches were used such as the comprehensive approach based on momentum (Lopes, 2009), the Newton-Euler methodology (Dasgupta and Mruthyunjaya, 1998), and the Lagrangian approach (Bingul and Karahan, 2012). Furthermore, based on the assumptions for using either of the approaches, different solutions were proposed. One of the solutions assumed dynamic simplifications to the robot such as ignoring friction joints in the links and concluding a basic legs dynamic Do and Yang (1988), Fichter (1986), Merlet (1990), Sugimoto (1989). Some other studies, such as Dasgupta and Mruthyunjaya, 1998), developed a generalized model according to the Newton-Euler formulation to study the effectiveness of the viscous friction in the joints. Also, the Lagrange formulation was used in Lebret et al. (1993).
To assess the automation and the equation of motions, and because there are nonlinearity and uncertainty in the fabricated robot, a computing software capable of simulating inverse kinematic, dynamic motion, and state variable is necessary. To this end, ADAMS is used in this study. The aforementioned software was also used in Cafolla and Marco (2015), Gough (1957), andStewart (1965). Accordingly, a proper ADAMS model is used in the current article based on the proposed model in Tajdari et al. (2020b). This model is capable to verify any controller approach for the rotary robot dynamic.
The main objective of controller design in parallel robots is to move end effector of the robot precisely, so that it can follow a desired trajectory and orientation of dynamic or static variables (Merlet, 2006). There are many control schemes, which are based on the models and applicable for linear manipulator Stewart robots, namely optimal feedback linearization control (Tajdari et al. 2021a;Tourajizadeh et al. 2016), control of inverse dynamic (Lee et al., 2003), backstepping tracking adaptive control (Huang and Fu, 2004), sliding mode, and PID controllers (Kizir and Bingul 2012;Tajdari et al. 2017a), whereas there are less control approaches for a rotary Stewart robot due to the additional complexity of the robot's dynamic. Moreover, in the most of the latter methods, controlling the length of links in the robots was used to control the states of the end effector. As a result, a comprehensive methodology for direct controlling from manipulators to the end effector was missed. Consequently, using the position control methodology solely limits the robot design to the joint space (Hopkins and Williams, 2002). In particular, the control methodologies based on the inverse dynamic are substantial to control the end effector motion through the manipulators, directly. Then, there is the possibility of investigating experimental constraints, for example, manipulator saturation, and uncertainty considerations. However, there are limited studies discussing the rotary robot torque control.
Thus, this article aims to develop and test a novel integral torque control methodology for the complicated parallel mechanism to optimize the torques and minimize the tracking error. This is an opening for further implementation of identification approaches, nonlinear control methods, and impedance manipulator control (Yang et al., 2019). The scientific contributions of this article are as follows: 1. Introducing the design architecture of the robust integral controller integrated with an anti-windup scheme, which solves unknown disturbances and manipulator saturation; 2. Integrating an intelligent optimizer gain tuner in the metric for establishing a robust optimal controller with faster zero-error convergence performance; 3. Extensively investigating the sensitivity level, robustness, and attraction region of the controller parameters, and demonstrating the global stability of the controller, which guarantees the global zero-error convergence; and 4. Implementing the controller on a reliable nonlinear system, via ADAMS to validate the robustness, and convergence in different scenarios and also on a fabricated Stewart robot to assess the performance in presence of naturalistic disturbance, manipulators' saturation, and uncertainties.
An introductory version of this study was presented in Tajdari et al. (2020b), which is collaborated here with a more rigorous concept; a comprehensive demonstration on stability of controller properties for the suggested control law; investigation on level of robustness with respect to parameter choices through numerical experiments; and additional numerical experiments, containing a scenario which presents a state-of-the-art conventional control methodology and a scenario, which includes additional disturbances through the fabricated robot.

Stewart platform: Dynamical equations
To derive the equations of motion of a Stewart mechanism, kinematics and kinetics analyses of the dynamical system are required. This step is crucial toward obtaining the relationships between the position and the velocity of the end effector before dynamic analysis.

Kinematics equation
In a Stewart platform which is actuated with rotary motors, controllable variables are the output torques of motors and their rotational angels. In the following equations, a relationship between the motors' variables and the position of the end effector is presented Vector X represents the end effector's variables which are the rotation angles f, ψ, and θ of the moving plate about the X, Y, and Z axis, respectively, and the position of the end effector center of mass as x, y, and z with respect to the fixed coordinate XYZ. Moreover, the vector L refers to the distance between the joints on the fixed base ð P ! i Þ and the corresponding joints on the movable frame ð p ! i Þ. Eventually, θ M is the motor angular shown in Figure 1(a). The connecting vector from P ! i to p ! i can be written as considering the fact that Cθ x = Cos(θ x ), Sθ x = Sin(θ x ). And, G, position vector of the end effector center of mass, is determined as Considering the length of each legs in equation (2), the length of each link connecting the end effector to the base is written as where u ! i is the vector representing the link connected to the motor. The vector is shown in Figure 1(a) and calculated as follows where θ h is the angle between P ! i and X ! in global axis, and β is the installation angle between the motor and the horizon. Thus, by replacing equation (6) with equation (5), and considering that length l ! i is always constant, θ M i can be extracted as Equation (7) defines that practically having the X through a sensor on the end effector leads to have the angle value of each motor. This is helpful for position control of these kinds of robots.

Kinetics equations
In this section, the dynamical equations of a Stewart platform actuated by six rotary motors are obtained using the Newton-Euler method. The derivations are summarized just to show different dynamic features of the systems and the effects. Figure 1(a) shows a Stewart mechanism with six rotary motors as actuators. As it can be seen, the platform consists of a moving plate as the end effector, a fixed plate as the base, and six legs connected to six rotary actuators, as the manipulators to move the end effector. The spherical joints are used to connect the six legs, the end effector, and the base. The kinetics equations for the end effector can be written as where α ! is the angular acceleration vector and a ! is the linear acceleration vector of the end effector. In addition, m contains the mass value (m) of the end effector and I defines the end effector moment of inertia around x, y, and z axis, denoted as and In Figure 1(b), M and F represent the torques and the exerted forces on the end effector, respectively. Addressing the rotary motors' manipulated torques, the dynamic equation should be derived as a controllable variable-torque relationship discussed in the following where T i is the manipulated torque with motor i. The kinetics equations can also be formed by using their unit vectors. It can be written as is, e ! denotes the unit vector of its corresponding vector. Then where Considering Thus, the ultimate dynamic transfer matrix, from the end effector to the base, can be obtained as where τ is a transfer matrix that defines the equations of motion based on the end effector states and the applied torques by the actuators. It provides suitable circumstance to implement the torque control method, directly, and is shown as below

Evaluation of equations of motion and derivation of the nonlinear model
Providing a valid nonlinear model, which is able to represent the actual system, is crucial for the controller design and evaluation process. Some physical constraints such as collision of objects, hardness and elasticity of rigid bodies, and friction between hard surfaces could not be addressed in MATLAB. Therefore, ADAMS is used to simulate the Stewart model. However, lacking the capability of coding and implementation of different control methods in ADAMS makes it an insufficient tool for evaluating the system. To overcome this problem, MATLAB and ADAMS are connected together to implement the online control method on MATLAB and evaluate the controller performance on the nonlinear system modeled in ADAMS.
First, the 3D model of the system is designed in Sol-idWorks (Figures 2 (a) and (b))). Next, the 3D model is imported into the ADAMS and then the essential constraints such as joint types, materials and densities of the bodies, rigidity of them toward each other, and frictions between hard surfaces are applied to the modeled robot. Tables 2 and  1 show the considered values and assumptions for the design variables. As it is reported in Table 2, the system consists of 14 components of mass and moment of inertia. model. As shown, a bidirectional torque, represented by red vectors, is applied on each leg.

Controller design
According to the fact that the designed dynamical system in ADAMS consists of nonlinear parameters of an actual system, it is definitely a nonlinear Stewart platform. Hence, to control these kinds of systems, the proposed controller needs to be capable of reducing the tracking errors in the presence of nonlinearities (Åström and Hägglund, 1995). In addition to robustness, optimization of the input signals in parallel manipulators to achieve an efficient performance is a challenge. The issue needs to be addressed in the controller design process. Therefore, a linear quadratic integral (LQI) optimal controller is an appropriate option to control the nonlinear system effectively.

State-space equations
The state space and dynamic equations of the Stewart robot can be formulated as follows where x consists of the main states in X , and the speed of the states. Consequently, the dynamic of the error can be defined as which is discretized as where Δt is the time step.
where matrix T includes the manipulated torques and vector d represents the time-variant disturbances. e is the error matrix of the states and is defined as e ¼ x À x d , where x d denotes the desired values of the states. Matrix A includes all the a i,j elements in equation (31) which represent the system dynamics. Finally, matrix B includes b i,j elements in equation (32) which represent the interconnections between the applied torques and corresponding states where n = 1, …, 6. Because the existence of the disturbances is inevitable in any actual system, an integral controller (Tajdari et al., 2020a(Tajdari et al., , 2019 is used. It helps to eliminate the constant disturbances (Åström and Hägglund, 1995), such as uncertainties in dynamical parameters. Accordingly, the main control problem coming from equation (28) should be reformulated by considering integral states (z) of S (i.e., as many as the number of links), described as where C consists of c i,j denoted as follows Therefore, the resulted dynamic error of the system which appears after adding the integral states can be written as where H is the number of dynamic states and F is the number of inputs, that is, number of actuators. Now, a quadratic cost function over an infinite time horizon can be defined as below. It is defined to minimize all the states' error and the control inputs where Matrices Q and R are weight matrices aiming to minimize all the states' error and the control signals. And the weighting matrices are formulated by ω Q > 0 and ω R > 0.
The resultant optimal control problem in equations (39) and (40) is solved by using a linear quadratic regulator (LQR). The goal is to stabilize feedback gains through the assumption (Tajdari and Roncoli, 2021), whereas stability and detectability criteria of Lewis et al. (2012) in chapter 2 should be satisfied by the original system in equation (35).

Stability and detectability
Stabilizability and detectability of the system in equation (35) are studied by conductin the Hautus test (Williams and Lawrence, 2007). Referring to Williams and Lawrence (2007), B is assumed to include more linearly independent columns in comparison with the number of unstable (λ ≤ 0) modes, to be able to guarantee stability of the pair (A, B). Depending on the system topology, matrix A has the number of zero columns as many as links, which is cancelled with the columns of B and satisfies stabilizability criteria as Now, the detectability of the system can be addressed in the pair (A, C T QC); regarding Hespanha (2009), because Q > 0, this is essentially equal to study of the detectability of the pair (A, C). In the existing problem, the Hautus test condition is validated as follows in the situation that C contains at least one nonzero element in each column according to the marginally stable mode (λ = 0). By considering that, in all the discussed scenarios, the system is assumed to be observable

Controller design and anti-windup
To solve the LQI problem, a linear feedback control law is proposed as follows resulted K in equation (44) as optimal gain, and the algebraic Riccati equation equation (45) is investigated in Navvabi and Markazi (2019). Moreover, regarding practical implementation, the gain K is divided into two sections as follows which leads to reformulate the optimal control law as The final control law equation (47) is substantially effective for practical implementations because the computational effort manipulated by the feedback gains K P and K I presents considerably lower values.
In practical applications, achieving the exact values of the desired states may not be always possible due to uncertainties such as input saturation problem. Hence, it is prerequisite to use an anti-windup scheme within the proposed controller. The proposed scheme inÅström and Rundqwist (1989) is used in this study. In the case of this research, the scheme modifies the integral part of the dynamic controller equation (47) as where Λ 2 R S×F and ðI þ ΛK I Þ 2 R S×S . Because the torque saturation is practically included on the real system input T(k), the operator of the saturation is denoted as follows Therefore, the ultimate equations of the dynamic regulator are equations (47) and (48), which are practically effective and robust. Because it may affect the offline computation of the feedback gains K P , K I , in solving equations (44) and (45) (47) and (48).
It should be noted that while T(k) does not exceed the saturation boundaries, the dynamics equation (48) is reduced to equation (33). Also, the numerical experiments clarify that the selection of different nominal values of T has explicitly no influence on the controller execution. It can be determined by the ability of the integral controller to dismiss the disturbances (Åström and Hägglund, 1995).

Anti-windup stability analysis in the closed-loop system
An essential constraint for the stability of the closed-loop system with the anti-windup scheme which conveys matrix Λ must be properly selected so that I +ΛK I has stable eigenvalues λ (Kapoor et al., 1998). This can be provided, for example, through classical pole placement or through a particular algorithm (look, e.g., Kapoor et al., 1998). Note the fact that while inputs are not saturated, the stability of the system is proved and ensured by the circumstances expressed in the Stability and detectability section. The section explains that the pair (A, B) and (A, C) are equivalent in the two cases; in addition, for the case that inputs are saturated, Λ must be opportunely designed, whereas it may influence the stability of equation (48).
To demonstrate the closed-loop system stability for the case that the inputs are saturated, equation (35) is reformulated as where Referring to da Silva Jr and Tarbouriech (2006), if a symmetric positive definite matrix is found as W aw 2 R ðHþSÞ×ðHþSÞ , a diagonal positive definite matrix is found as S aw 2 R F×F , and a matrix is found as Z aw 2 R S×F , subjects to Then, for Z aw = ΛS aw , the system in equation (50) is globally asymptotically stable. In this formulation, matrix W aw can be defined as follows where ζ is a single parameter which should be properly computed. This investigation explains that by assessing circumstances of equation (52) for a satisfactory domain of λ and ζ , indicating the global asymptotic stability of the closed-loop system will be possible during optimizing controller parameters. This demonstrates the globally robustness of the closed-loop system in presence of disturbances and uncertainties as described in Khalil and Grizzle (2002).

Sensitivity analysis
To test the suggested strategy, the dynamic compensator equations (47) and (48) is applied to the nonlinear ADAMS model, whereas λ is considered as 0.5 for all the six stable poles of I + ΛK I in equation (48). First, a series of experiments are conducted to adjust the controller parameters.
In the experiments with the time domain of 10 (s), the time step is considered as Δt = 0.067 (s) (it is same as the samplerate frequency of the fabricated robot, 15 Hz, in the section of Experiment Setup). The desired values for f, ψ, and θ are changing with peak-to-peak amplitude 30°and the frequency of 1 Hz, and the desired value of z is supposed to oscillate with peak-to-peak amplitude of 16 cm and the frequency of 1 Hz. Moreover, x and y desired values move periodically with frequency of 1 Hz and peak-to-peak amplitude of 8 cm.
Regarding investigating the sensitivity of the controller to select parameters w Q , w R , and λ, we are using as assessment metric of the average percentage of final error. The percentage of the final error E p for each variable of the matrix X in equation (1) is explained as where i ¼ 1,…, H=2, t end = 10 (s), and A m i denotes the peakto-peak amplitude of the desired values ðX d i Þ of relative variable ðX i Þ (for the cases that the desired value is constant, A m i is considered as 1). Thus, the average percentage of final error ðE p Þ is formulated as Figure 3(a) shows how the achieved E p differs by choosing fixed weights (as a pair) in the cost function equations (39) and (40). It can be inferred that the controller is able to obtain a low E p value (blue areas) for an extensive range of the parameters. This demonstrates the controller is considerably impervious to the selection of the parameters. This is an advantage for real applications and explains less effort for tuning the control parameters to obtain satisfactory results.
Although the reasonable results (with acceptable E p value) are achieved via numerical experiments, probably there are some cases (e.g., the saturation of several inputs) which might not occur in software simulations. These cases may lead the system to unstable conditions. Therefore, the stability of the closed-loop system is studied by the results extracted from the section of Anti-windup stability analysis in the closed-loop system. For instance, the fact that whether matrix Ξ in equation (52) is positive definite regarding an extensive range of λ, and ζ is assessed. Concisely, the results for λ ≡ λ 1 ¼ … ¼ λ 6 are explicated in Figure 3(b), where it can be seen that no unstable eigenvalues exist for the domain of 0 ≤ λ ≤ 1. This implies that Ξ is positive definite. Consequently, it illustrates that allocating eigenvalues λ 1 ,…, and λ 6 within the range (0,1) produces proper results in terms of E p (Figure 3(b)), and guarantees the asymptotic stability of the closed-loop system. Thus, λ is chosen as λ ¼ 0:5. According to Figure 3(b), at this point, the global stability of the system has the least sensitivity to changes of λ.
Because the parameters of dynamic equations in equation (27) are time variants, BðkÞ is accordingly time variant. As a result, and based on equation (32), it is expressed that the error dynamic in equation (35) is nonlinear. Hence, it is logically expected that the system has different behavior in response to a different path. Therefore, nonlinearity of the system and the optimization method, and complexity of the problem, imply the use of intelligent methods (Ghaffari et al., 2018;Khodayari et al., 2015), which are capable to overcome the complexity and nonlinearity of the problem (Tarvirdizadeh et al., 2017;Tajdari et al., 2021b). Because of the fact that the cost function of the optimal problem in equation (39) is dependant on w Q and w R , obtaining a method to estimate the true values of w Q and w R in each time step is a key to solve the nonlinearities. Then, an innovative input-output ANN-based estimator is designed to estimate w Q and w R online. In the proposed methodology, as a common challenge in the intelligent methods, choosing appropriate inputs and outputs is substantially the most essential step. According to equation (39), w Q defines the level of penalizing the states' error, and w R optimizes the designed torques. Thus, state error functions and torque functions are suitable parameters as the estimator's inputs.
The functions are selected based on Tarvirdizadeh et al. (2018). Therefore, in this problem, density functions of error state and torques are appropriate functions to describe the changes, which are elaborated as follows ρ e ðkÞ ¼ V e ðeðkÞÞ ¼ ℜ eðkÞ P k i¼kÀm eðiÞ (56) where ρ e is density of state errors and ρ T is the torques' density. Actually, equations (56) and (57) are sensitive when eðkÞ and T(k) are sufficiently greater than average of the variables with window size ℜ. These criteria explain a smooth and logical stimulation to changes of the variables (Tarvirdizadeh et al., 2018). Consequently, the inputs of the intelligent estimator are ρ e 1×6 and ρ T 1×6 , and the outputs are w Q 1×1 , and w R 1×1 as shown in Figure 4. According to the figure, there are 18 neurons in the input layer, 10 neurons in the hidden layer, and 2 neurons in the output layer. Also, activation function for the input and the output layers is linear and for the hidden layer is sigmoid. In addition, the training algorithm of the ANN is a Levenberg-Marquardt backpropagation method based on Kosko and Burgess (1998), Levenberg (1944), and Marquardt (1963). To design an ANN-based estimator, a set of data including the inputs-outputs is essential. Therefore, the controller of equation (47) is used as a master for the estimator. To collect data, the output of the controller in the stable regions (blue areas) of Figure 3(a) is used, whereas ℜ ¼ 31, T max o ¼ 1:5 N.m, and T min o ¼ À1:5 N.m. Going into detail, all the experiments of the figure where w R > w Q and 0.001 < w Q < 4 are considered. To check the effects of the desired value frequency, the mentioned experiment is repeated with the frequencies of 0.5 Hz, 2 Hz, 4 Hz, and 6 Hz. Thus, the appropriate inputs-outputs of the estimator are generated with a sample number of 11,250.
To design the estimator, the dataset is randomly divided into two subsets: the training and the testing data subsets. The first data subset is used to develop and fine-tune the estimator. Afterward, the second data subset is used to assess the estimator performance, which does not affect the    training data subset. Thus, the first data subset, which contains 70% of the master dataset, is considered for training and the remaining of 30% is used to validate the obtained model. Figure 5 shows the closed-loop optimal feedback control diagram of the proposed system, where the ANN estimator based on the error states and the torques' values, updates the controller gains of w Q and w R in each time step.

Experiment setup
To evaluate the controller in a real nonlinear system with natural disturbances, the introduced robot in Figure 2 was fabricated. As Figure 6 depicts, 6 servo motors of mx-64 are used as torque manipulators and are controlled directly with MATLAB through USB2Dynamixel (Robotis, (2019b). These motors are selected due to having incremental encoder and torque meter with acceptable resolution. Moreover, the stall torque for these motors is 5.5 N.m, which is relatively high. The specifications of the motor extracted from Robotis (2019a) are reported in Table 3. Moreover, to measure the end effector position and angles ðX Þ, a 9-DOF absolute orientation IMU fusion breakout -BNO055 is used and data of the sensor are filtered and imported to MATLAB through an Arduino Mega 2560. The BNO055 sensor, which is located in the center of the end effector, spits out Euler angles and vectors as mentioned in Adafruit (2019). The frequency of the final product for sending and receiving data is averagely 15 Hz, which is obtained experimentally. Moreover, the saturation boundary value of the motors is set as 1.5 N.m according to safety and prevention of the motor damages.

Simulation results
where t is time. Considering Figure 7(a), the three control methodologies introduced in the Controller design section as: I. the controller without integral states, ANN estimator, and anti-windup; II. the anti-windup integral controller; and III. the anti-windup integral controller with ANN estimator, are investigated and compared. The anti-windup integral controller with the ANN estimator is applied to achieve perfect tracking (looking at Figure 7(a)) and reject the errors by the time as shown in Figure 7(b). The reduction of the error is concluded from the well-defined controller parameters, w Q and w R by the ANN estimator. The timevariant gains are reported in Figure 8(a), where they are always showing the stable area of Figure 3(a). However, the anti-windup integral controller without the estimator produces considerable errors, especially in the critical points of the desired path (i.e., the performances of the controller regarding the x, y, and z in Figure 7(b), showing the deviation, in spite of the fact that the controller tries to generate a similar periodic movement as the desired values).
The final control scenario presents the implementation of a destined linear quadratic regulator (LQR) controller based on the dynamic error equation in equation (27). In this case, the controller with no integral states and no anti-windup scheme is designed. As shown in Figures 7(a) and (b), the controller fails completely regarding the x, y, and z states, and for the rest of the states, only a periodic movement with huge error is generated. Moreover, the implemented torques (T i in equation (16)) on the system for the three control scenarios are shown in Figure 9. Based on Figure 9(a), the controller I practically generates no control signals due to no tracking actions of the desired values in Figure 7(a). Comparing the torques in Figure 9(c) with Figure 9(e), the anti-windup integral controller with the ANN estimator offers less saturated (especially for the upper boundary saturation) and smaller torque values in comparison to the anti-windup integral controller without the estimator. It is due to less tracking error, and consequently less integral states' values, which are achieved by the anti-windup integral controller with the ANN estimator, rather than the integral controller without the estimator. Furthermore, the torque analysis is used to choose the electromotor discussed in the Experiment Setup section.
Envisioning the motor torque saturation, it is worth investigating the robustness of the controllers with respect to different kinds of constant and dynamic time-variant load torque with high probability of motor torque saturation. Accordingly, the effect is numerically studied through the following experiments.
Constant load torque investigation: Here, the experiment condition is exactly same as the previous experiments with an exception of the mass value (m). The value is changing in each experiment as m = 4, 5, 6, 7 and 8 kg. To compare the experiments in terms of the tracking error and the anti-windup scheme, two criteria of accumulative absolute percentage error E ac and total saturation time are introduced as follows where E ac is the accumulative absolute percentage error and is denoted as the summation of the absolute percentage error in each time step. All the variables are introduced in equation (54). Then, the total saturation time which is called t sat is the summation of all time intervals when each motor is saturated. In other words, the maximum value of the total saturation time will be 60 s (10 s for each motor), if the run time of the experiment is 10 s. Accordingly, the controllers' performances are individually reported based on the two criteria in Table 4. Based on the table, the E ac for the controller I is increasing smoothly, and in comparison to the other two controllers, it is higher in the most cases. This is because the controller cannot track the desired values and mostly the end effector stays sedentary-like in the initial condition (e.g.,. Looking at the experiment in Figure 9(a), the generated torques by the controller I, tackle mainly the torque load and cannot follow the desired values). The constant-like torques also result in zero saturation time. Afterward, the controller II is using the anti-windup scheme with integral states. Thus, perfect tracking is expected; however, the degree of saturation is a restriction to the perfect tracking as the integral states grow up during saturation. It may result in more intensified reactions from the controller and then may lead into instability. As can be seen from the table, by increasing the m, the E ac and the t sat are increasing as expected. Even for the case m = 8 kg, the E ac for the controller II is higher than the controller I, showing that the saturation time is the controller failure cause. Hence, the controller III performs with higher robustness rather than the controller II even in higher saturation time. It highlights the positive impact of adding the ANN estimator to tune the controller gains based on the errors. According to Table 4, it also demonstrates an improvement of 45% and 46% for the controller III, in terms of the E ac , comparing to the controller II and the controller I, respectively. Time-variant load torque investigation: Accordingly, an experiment is arranged where the mass of the end effector is time-varying as follows where m 0 = 4 kg, and the frequency of changes is in the trained data domain of the desired values, same as the section of ANN estimator design for w Q and w R , which is equal to 2 Hz. Accordingly, the tuned matrix on w Q and w R is depicted in Figure 8(b), which shows higher fluctuating graph for the gains in comparison with the constant mass in Figure 8(a). Comparing Figure 7(b) with Figure 7(d) in higher errors, the fluctuation is expected and is a reaction to mass variation. Also, one important point in this figure is that the w Q is fluctuating with higher amplitude than w R and the  constant mass scenario. This is because the mass variation impacts the error states more easily (or the E ac ) in Figures 7(c) and (d) than the torques in Figures 9(b), (d), and (f), which leads into bigger integral state values. Thus, the fluctuation amplitude for w Q should be higher than w R because w Q is responsible for penalizing state errors.

Experiment results
To validate and investigate the reliability of the proposed controller in the presence of real disturbances and uncertainties, the controller is implemented on the robot introduced in the Experiment Setup section. To have a comparison with the simulation output, the same desired values in equation (58) are used. All the other control parameters and initial conditions are considered the same as the Simulation results section. Performances of the controllers for the main states are depicted in Figure 10(a).
Comparing the results of the three controllers in the figure gives the same conclusion as the previous section because the rate of the error rejection for the anti-windup integral controller with the ANN estimator (controller III) is considerably higher than the other two controllers. However, more overshoot is observed in the beginning of the test. The overshoot happened regarding the unexpected actuators' lag and unidentified dynamical parameters. This issue is also detectable in the trajectories of the estimated w Q and w R in Figure 11 as they have high fluctuating behavior in the beginning of the test, whereas they are converging by the time to specific values. In addition, the ANN estimator is supposed to present the parameters in which the tracking errors are minimized. Only for the control strategy with the estimator, the tracking errors drawn in Figure 10(b) are decreasing by the time due to w Q and w R identification. This infers well-practical performance of the estimator. Comparing the torque diagrams in Figure 12 illustrates that outputs of the controller with the ANN estimator (controller III) in Figure 12(c) are saturated in more time span comparing to Figures 12(a) and (b), although the results show zero-converging error for the controller. This implies a logic cooperation between the estimator and the anti-windup Figure 11. Online estimated of w Q and w R for the fabricated robot controlled case. scheme in equation (48), resulted from little sensitivity of the parameters choice to performance of the controller.

Conclusion
In this article, an innovative control methodology for a Stewart platform parallel robot with rotary actuators was investigated. The equations of motion for the system were derived and a 3D model of the system was also implemented in ADAMS. In addition, the analyses of the kinematic, dynamic, and control of the robot were investigated based on the obtained nonlinear model. To attain a desired amount of the end effector tracking error, the gain tuning LQI controller. The robustness and insensitivity of the parameter choices, besides the adaptive component, that is, the ANN estimator, made practical implementation easier, without the necessity of lengthy and costly measurements of the dynamic parameters. Finally, the simulation results revealed that the optimal LQI controller with intelligent estimator was able to control the dynamic of the system and eliminate the tracking error 45% more than the other compared controllers, averagely, considering the existence of the realistic dynamic forces and saturation in the ADAMS model. Also, the methodology was evaluated by the fabricated rotary Stewart robot to investigate the robustness of the controller with respect to the dynamic parameters, uncertainty, and realistic noise. Future developments include the optimal dimension design subject to the dynamic of the system and the study of the controller sensitivity regarding the dimension of the robot and dynamic parameters. In addition, the fabrication of a faster and smaller robot integrated with a time-delay optimal controller is another topic for the future studies to be easily adaptable to other practical cooperative robots.

Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.

Funding
The author(s) received no financial support for the research, authorship, and/or publication of this article.