A New Self-Tuning Nonlinear PID Motion Control for One-Axis Servomechanism with Uncertainty Consideration

— this paper introduces a new study for one-axis servomechanism with consideration the parameter variation and system uncertainty. Also, a new approach for high-performance self-tuning nonlinear PID control was developed to track a preselected profile with high accuracy. Moreover, a comparison study between the proposed control technique and the well-known controllers (PID and Nonlinear PID). The optimal control parameters were determined based on the COVID-19 optimization technique. The parameters of the servomechanism system changed randomly at a preselected range through the online simulation. The change of these parameters acts as the nonlinearity resources (friction, backlash, environmental effects) and system uncertainty. A comparative study between the linear and nonlinear models had been accomplished and investigated. The results show that the proposed controller can track several operating points with high accuracy, low rise time, and small overshoot.


I. INTRODUCTION
The main component of the majority of CNC machines is the one-stage servomechanism system [1], [2]. For these machines to manufacture goods of a high caliber, exact motion control is required [3], [4]. Additionally, numerous high-speed and high-accuracy position applications have been rapidly made to support sophisticated automatic industrial processes [5], [4].
The friction and backlash models' parameters are typically unknown for servomechanism systems, which causes system uncertainty [6], [7]. High steady-state error is caused by friction, while unwanted vibration is caused by blowback [8], [9]. There hasn't been a concrete model developed yet to explain accurately the friction issue in servomechanism systems [10], [11].
As a result, the control task for this procedure is quite difficult. For single-axis controllers, there are numerous design strategies available, including traditional PID control, self-tuning PID control, fuzzy PID control, adaptive control, and sliding mode control [12]- [15].
The benefit of the sliding mode technique is that it offers good tracking performance throughout a range of position command operating points [16], [11]. On the other side, chattering phenomena can make it difficult to increase control accuracy and, in rare situations, it can lead to system instability [17]- [19]. The fuzzy logic system is an effective method for handling complex systems' nonlinearity and uncertainty issues. But, it needs big memory data and high processing speed [20]- [24]. Also, the neural network needs a high training time and big data storage. So, most industrial applications use the conventional PID control or Nonlinear PID control which achieves a satisfactory response for traditional applications (pick and place tasks or low accuracy motion) [25]- [28].
It is well known that Model Reference Adaptive Control (MRAC) is a very effective adaptive control that compels the entire system to behave by a predetermined model reference. Depending on the designer's viewpoint, the chosen model reference may be a first-order or second-order system. Although MRAC performs quickly, some systems may not like the high overshoot it experiences [29]- [33].
The nonlinear PID controller consists of six parameters which are classified into two parts, the first part is the traditional PID parameters while the second part is the fixed three parameters integrated into the nonlinear function [34]- [38]. This type of controller has a satisfying behavior with several nonlinear systems but it has a poor performance when there are uncertainty and parameter variations [39], [40]. This paper seeks to develop a new self-tuning for these six parameters at the same time online using an adaptive mechanism based on a preselected model reference. The proposed control technique treats the nonlinearity resources such as friction and backlash. Also, it can deal with the uncertainty problem without using a complex model for friction and backlash. A friction Compensation Method for Servomechanism was presented in [41]. Analysis of limit cycle mechanism for two-mass system with backlash nonlinearity was demonstrated in [42]. Sinusoidal servo compensator implementations with real-time requirements and applications was presented in [43]. Dynamic analysis of an XY positioning table was illustrated in [44]. Evaluation on tracking performance of PID, gain scheduling and classical cascade p/pi controller on XY table balls crew drive system was displayed in [45].
The paper is prepared as following, firstly, the system modeling is presented. Secondly, the proposed control

II. SYSTEM MODELING
This section demonstrates the single-axis model in two forms. The first model presents a linear behavior without parameter variations and uncertainty. The second model was developed to simulate the actual uncertainty and nonlinearity. This paper can define uncertainty as the random change in system parameters. Fig. 1 shows the general structure of the single-axis servomechanism.  (3) where is the armature voltage, is the armature resistance, is armature current, is the inductance of motor windings, is the back emf constant, is the rotor speed, is the motor torque, is the torque constant, is the total equivalent moment of inertia as seen by the motor, is the viscous damping coefficient and is the total static torque reflected in the lead screw shaft.
There are three sources for the total static torque reflected in the lead screw shaft ( ) as in equation (4) where is the static torque contributed by the friction in the guideways, is the torque lost in bearings due to friction, is the torque required to overcome the feed forces.
In the case of a gear between the motor shaft and the lead screw shaft the will be determined as equation (5) where is the gear reduction.
Equation (6) illustrates the static torque due to guideways friction where ∅ is pitch of lead screw, is the friction coefficient in guides, is the table mass, is the maximum mass for the workpiece and is the maximum vertical force.
Equation (7) demonstrates the lost static torque due to bearing friction where is the friction coefficient of bearings, is the leadscrew diameter, is the maximum feeding force and is preload force in the thrust bearings.
The required torque to overcome feed forces can be calculated as (8).
The total equivalent moment of inertia as seen by the motor ( ) depends on the moment of inertia of table and workpiece reflected on the lead screw shaft, is the lead screw inertia and motor shaft inertia can be calculated as (9).
The moment of inertia of table and workpiece can be determined based on mass table ( ) and maximum mass of workpiece ( ) as shown in (10).
The lead screw moment inertia is determined using lead screw mass as equation (11).
Equation (1) will be reorganized to obtain as in (12).
Also, equation (3) will be reformed to result as in (13).
Equations (12) and (13) are used to build the DC motor model incorporated with servomechanism system, so obtained model as (14).
To find the transfer function between and assumes = 0, as shown in the equation (15).
To obtain the transfer function between and assumes = 0 will result the following transfer function in as equation (16).

Journal of Robotics and Control (JRC)
ISSN: 2715-5072 120 Mohamed A. Shamseldin, A New Self-Tuning Nonlinear PID Motion Control for One-Axis Servomechanism with Uncertainty Consideration The actual position table can be calculated using equation (17).
To simulate the uncertainty and nonlinearity of the servomechanism, the system parameters will change randomly online. For example, to imitate the backlash behavior the , and ∅ will be changed continuously online. Also, to capture the friction behavior the , and B will be fluctuated in a preselected range randomly. Moreover, the motor uncertainty will be executed by change the and randomly.
The following Table 1 shows the system parameters values and the borders of change.
The following Table 2 demonstrates the fixed parameters of servomechanism system.

III. COVID-19 OPTIMIZATION
There are many methods to define the parameters of the PID controller such as try and error and Ziegler-Nichols methods but most of these methods are rough roads. This study introduces a new effective optimization technique which is the COVID-19 optimization algorithm to find the optimal parameters of the proposed controllers (PID and NPID) based on the output response behavior and the desired performance. This section is focused on determining the optimal value of the PID and NPID controller parameters [46]- [48].
The first step is the generation of the initial population. The initial population represents zero patients. It contains three columns ( , and ) for the PID controller and six columns ( , , , 1 , 2 and 3 ) for the NPID controller and n rows (number of solutions). As in the COVID-19 epidemic scenario, it recognizes the first human being infected.
In the second step, the disease spread depends on the behavior of the population matrix (zero patients), several cases can be considered. The first case is some of the infected individuals die. The possibility of death is according to the COVID-19 virus death rate. Such individuals can no longer infect new individuals. The second case is the individuals surviving the COVID-19 virus will infect new individuals (intensification). Therefore, two types of disease propagation are taken into account, according to a given probability. For The third step, modernizing populations: Three populations are preserved and updated for each generation. Dead population: If any individual dies, it is added to this population and can never be used again. Recovered population: After each iteration, infected individuals (after spreading the COVID-19 virus according to the previous step) are sent to the recovered population. It is known that there is a reinfection probability. Hence, an individual fitting to this population could be re-infected at any iteration provided that it matches the reinfection criterion.
Another condition must be measured since individuals can be isolated simulating they are executing the social distancing procedures. For easiness, it is considered that an isolated individual is sent to the recovered population as well when meeting an isolation probability.
Recently, a newly infected population: This population collects all individuals infected at each iteration, according to the procedure described in the previous steps. It is possible that repeated new infected individuals are created at each iteration and, consequently, It is recommended to eliminate such repeated individuals from this population before the next iteration starts running. The Vaccines consider the used objective function, which can treat the infected population.
The fourth step is the stop criterion. One of the most important features of the proposed algorithm lies in its capability to end without the need of controlling any parameter. This situation occurs because the recovered and dead populations are constantly increasing as time goes by, and the newly infected population cannot infect new individuals. It is estimated that the number of infected individuals increases for a certain number of iterations. However, from a particular iteration on, the size of the newly infected population will be smaller than that of the current one because recovered and dead populations are too big, and the size of the infected population decays over time.
The initial population contains the upper and lower values of the PID and NPID controller parameters for example the PID population matrix is shown in the equations from (18) to (20).
The performance of each row will be investigated according to the objective function in equation (21) to (25). The poor performance specifies the infected population, which can die. While the good performance indicates the recovered population from COVID-19. The COVID-19 optimization parameters is the same as in [15]. It can be demonstrated that the objective function seeks to fulfill the designer's needs using four sub-objective functions.
The first sub-objective function emphasizes improving the rise time of overall drive systems. The second subobjective function tries to reduce the settling time. The third sub-objective function measures the steady-state error. The fourth sub-objective function investigates the required overshoot. The value of each sub-objective function ranges from zero to one. So, the overall objective function considers the average of the sum of four sub-objective functions.

IV. AUTO-TUNING NONLINEAR PID CONTROL
The Model Reference Adaptive Control (MRAC) is a high-ranking adaptive controller [49], [43], [50], [42]. It may be regarded as an adaptive servo system in which the desired performance is expressed in terms of a reference model [51]- [60]- [62]. In this work, the NPID control parameters will be adjusted online using the model reference adaptive technique and the nonlinear function. Fig. 4 presents the main structure of auto-tuning NPID based on the model reference technique.
The proposed form of NLPID control can be described as (26).
where ℵ n1 (e), ℵ n2 (e) and ℵ n3 (e) are nonlinear gains. The nonlinear gains represent any general nonlinear function of the error which is bounded in the sector 0 < ℵ ( ) < ℵ ( ) . There is a wide range of choices available for the nonlinear gain ℵ ( ). One simple form of the nonlinear gain function can be described as (27). The MIT rule is the original approach to model reference adaptive control. The name is derived from the fact that it was developed at the Instrumentation Laboratory (now the Draper Laboratory) at MIT. To adjust parameters in such a way that the loss function is minimized as in (28).
To make j small, it is reasonable to change the parameters in the direction of the negative gradient of j, that is obtained as (29) and (30), Assume that the plant can be simplified to a first order system as obvious in the equation (31).
where and are unknown parameters. Also, assume that the model reference takes a form first order system as the following relationship in (32).
where and are selected by designer.
To achieve the desired performance, the following condition must be hold as in (43) and (44).
From the MIT rule can obtain as equations (45) to (48) for the following relationship where (0) is the initial value of proportional gain obtained as (49).
To achieve the desired performance, the condition must be hold in equation (53).
From the MIT rule can obtain equations (54) to (57) where (0) is the initial value of proportional gain obtained as equations (58) to (61).
Also, from equation (59) and equation (61), can be obtained as equations (62) where (0) is the initial value of derivative gain .

V. RESULTS AND DISCUSSION
This section demonstrates the motion control behavior of the one axis servomechanism using several control techniques. Two models of servomechanism were developed, the first is the model without uncertainty and the second is the model with parameter uncertainty. The PID control technique was applied on the two models to investigate the system performance. The other control techniques. The other control techniques used the model with uncertainty and nonlinear behavior. Two tests had been implemented, the first measures the motion accuracy through a step operating point. The second investigates the performance through a stair operating points. speed. It can be noted that the difference between the output of linear and nonlinear models. The stage reaches the operating point through a 5 seconds which considers not satisfied for high performance applications. In case of the model with uncertainty the PID control cannot absorb the uncertainty and has a high fluctuation about the operating point. Also, the high rise time makes the performance of the system is poor and not acceptable for high accuracy industrial applications. Fig. 6 demonstrates the corresponding controller output of the PID control for both models. It can obvious that the output of the PID control suffers from high shuttering due to the system uncertainty. Also, it try to realize the reference operating point as possible. So, the other control techniques will be used to treat this problem. Fig. 7 illustrates a comparative study between the PID control, NPID control and the self-tuning NPID control for test one (step operating point). It can be noted that the selftuning NPID control has a low rise time among other techniques. Also, the proposed self-tuning NPID control not has a fluctuations about the reference operating point. The NPID control suffers from a high overshoot and high fluctuations about the reference point.  Mohamed A. Shamseldin, A New Self-Tuning Nonlinear PID Motion Control for One-Axis Servomechanism with Uncertainty Consideration Fig. 7. Performance of the PID, NPID, and self-tuning NPID to track a step reference position test. Fig. 8 demonstrates the corresponding controller output. It is demonstrated that the PID and self-tuning NPID controller have a high starting value. In contrast, the NPID has a low starting output. Also, it is noted that the PID output has a high shuttering compared to other control techniques. Fig. 9 shows the performance of the control techniques for the second test (stair operating point). It is illustrated that the self-tuning NPID control has a high accuracy in tracking and following the continuous change of the operating point. In case of the PID and NPID controllers, they suffer from a high delay compared to the self-tuning NPID control. Fig. 10 display the corresponding controller output for continuous change of operating point test. It is illustrated that the self-tuning NPID controller has a high starting value at each new operating point. Also, the change in controller output is faster than the PID and NPID controllers which makes the self-tuning NPID tack accurately the position reference and absorb the system uncertainty. Fig. 8. The corresponding output of the PID, NPID, and self-tuning NPID to track a step reference position test. Fig. 9. The system motion behavior for the PID, NPID, and self-tuning NPID to track a continuous reference position test Fig. 10. The corresponding output of the PID, NPID, and self-tuning NPID to track a step reference position test.

VI. CONCLUSION
In this research, a novel one-axis servomechanism investigation is presented, taking into account parameter fluctuation and system uncertainty. Additionally, a novel method for very effective self-tuning nonlinear PID control was created to accurately monitor a chosen profile. A comparative study between the suggested control method and the well-known controllers is also included (PID and Nonlinear PID). The COVID-19 optimization technique was used to determine the best control parameters. Through the online simulation, the servomechanism system's settings were modified at random within a predetermined range. As nonlinearity resources (friction, backlash, environmental influences), these parameters fluctuate and contribute to system uncertainty. It had been completed and looked at to compare the linear and nonlinear models. The findings demonstrate that the suggested controller has a high tracking accuracy, a rapid rise time, and a low overshoot.