The Implementation and Lateral Control Optimization of a UAV Based on Phase Lead Compensator and Signal Constraint Controller

Unmanned Aero Vehicles (UAV) has become a useful entity for quite a good number of industries and facilities. It is an agile, cost effective and reliable solution for communication, defense, security, delivery, surveillance and surveying etc. However, their reliability is dependent on the resilient and stabilizes performance based on control systems embedded behind the body. Therefore, the UAV is majorly dependent upon controller design and the requirement of particular performance parameters. Nevertheless, in modern technologies there is always a room for improvement. In the similar manner a UAV lateral control system was implemented and researched in this study, which has been optimized using Proportional, Integral and Derivative (PID) controller, phase lead compensator and signal constraint controller. The significance of this study is the optimization of the existing UAV controller plant for improving lateral performance and stability. With this UAV community will benefit from designing robust controls using the optimized method utilized in this paper and moreover this will provide sophisticated control to operate in unpredictable environments. It is observed that results obtained for optimized lateral control dynamics using phase lead compensator (PLC) are efficacious than the simple PID feedback gains. However, for optimizing unwanted signals of lateral velocity, yaw rate, and yaw angle modes, PLC were integrated with PID to achieve dynamical stability.


Introduction
In this new era, Unmanned Aerial Vehicle (UAV) is used for many applications.
With different applications of UAV's, mission characteristics also changes with specific requirements.However, with these maximum numbers of applications there are many difficulties that happen in real time scenario.In the practical atmosphere; it is very necessary that UAV must be fully controlled and impulsive.
Controllability and response is totally dependent upon the controller or controlling techniques that are being used [1].Moreover, UAV controllability depends on the nonlinear factors i.e. aerodynamics variables.UAV performance characteristics are determined by its flight controller mechanism, which controls the dynamics of a UAV [2].Likewise, there has been lots of research on flight control optimization using different control techniques.To cater above, different control techniques have already been designed and implemented in UAVs flight control systems such as adaptive control, robust control, predictive control, optimal control, and intelligent control [3] [4].Moreover, it is known from studies and literature that Proportional, Integral and Derivative control approach is not new, however, due to its easiness for implementation in hardware and software, maintenance is less so it is preferable over other control techniques [5].But, there is less adaptability for PID, as they are not able to produce good performance output when tested in a real-world UAV [6] [7].The conventional approach for optimizing PID performance is to use PID with gain scheduling [8].
The swapping between different controllers during flight is not always smooth, therefore it is important to design a single flight controller for a complete flight envelope [9] [10].On the other hand, PID control algorithms are more attractive in terms of practically designing optimized controllers for UAV's.This is not only due to their easy modeling and simple implantation, but as well as their safe and stable performance.Moreover, in PID controller, tuning is a critical task to achieve optimal values for PID gain parameters [11].Many methods are found to set the parameters of PID controller in the literature, i.e. internal model-based design control (IMC), the Ziegler-Nichols method and loop shaping method.All of these methods are founded on some basic characteristics of plant models.PID controller gain parameters are settled down according to certain properties and algorithms that are basis for particular plant [12].The tuning of PID gains is still worth putting effort and for which various techniques for fine tuning PID gains are already available [13].The Ziegler-Nichols is a most well-known technique in the field of PID tuning.It is easily utilized for fine tuning the PID but its performance lacks in nonlinear systems [14].Moreover, optimal control technique is also utilized for PID gain scheduling.Moreover, considerable research has been carried out in designing algorithms for UAV using modern control theory.ni investigated that by applying PID controllers on lateral and longitudinal stability optimizes the performance of the aircraft dynamics.PID controller efficaciously improved the settling time and over shoot harmonics were undermined, this demonstrates that significant amount of controllability has been achieved [15].
Controlling UAVs has become a hot topic for last couple of years.So, the term controllability is the property that determines the performance, that how much a system is reliable and stable for different input parameters.Actual working of PID is to shift poles of the system from right half plane to left half plane in root locus plot using PID gain scheduling, by doing so system becomes stable.Moreover, Muluken Regas in his research used PID with neural network controller giving insight into optimization of PID using neural networks.They compared UAV's pitch altitude control parameters developed by each controlling techniques.Thus, they concluded that for hardware implementation of any UAV model with smooth alteration to achieve better maneuverability, PID is a prime candidate for the designing of optimized controller [16].
Keeping in mind the researches related with PID optimization and checking out the literature; it is pretty much applicable that there is still room for improvement.Hence in this research efforts have been plugged to optimize PID using signal constraining and Phase Lead Compensator (PLC).
Nevertheless, in some cases of controlling lateral mode PID controller is not feasible enough to give steady state response, therefore, a good practice in this case is to implement a phase lead compensator.The PLCs are generally used for improving the transient response of a dynamic system.This controller adds up positive contribution in the sum of angles in the angle measurement.It helps in moving the close loop poles towards the negative half of the s-plane, due to which stability and speed of the system response is optimized.This technique is proven to be fruitful in one of the studies investigated for pitch and altitude control by Ahsan et al. [17].They investigated that by using a PLC, transient response characteristics were improved as compared to PID controller.However, the PLC takes longer rise time for his case, but offers negligible overshoots.

Plant Description
An initial design for this proposed model of UAV was created using XFLR5, a freeware software used for designing and modelling flight dynamics of UAVs.
XFLR5 Plane designing module lets one to easily design, as well as, visualize the input variables while changing different design parameters of the aircraft body [18].Moreover, aerodynamic stability parameters were obtained from the same software, which were used to form a mathematical model for the UAV's transfer The longitudinal equations for the plant are derived by applying laws of newton for the motion of a rigid body under the effect of constant external forces and moments summation to the angular acceleration.These are the following assumptions taken for simulating proposed model equations [19].
Assumptions taken; the geometrical shape parameters are jotted in Table 1, moreover some of the configuration, stability and control parameters were obtained from author's previous study [18].Stability analysis of UAV model requires, aerodynamic analysis of complete UAV plant to measure its different stability coefficients.The proposed model was analyzed using Vortex lattice method (VLM), while coefficient of X-Center of Gravity and Z-Center of Gravity was set at 0.09 m and 0.003 m respectively.Moreover, proposed plant was experienced with 35 m/s velocity and density for the physical attributes were settled at 1.225 Kg/m 3 , meanwhile the viscosity level was 1.461e-5 m 2 /s and Dirichlet boundary were set for analysis.
1) The Earth is non-rotating.
2) Unmanned aero vehicle is supposed to be a constant mass rigid body.

Working
MATLAB/Simulink simulation is used to incorporate the proposed model, which was achieved by designing of UAV model on XFLR5.Stability and control derivatives were also obtained and calculated through XFLR5.These derivatives and parameters for transfer functions were plugged in the MATLAB prompt to generate the longitudinal and lateral matrix.The parameters used for designing the transfer function are given in Table 1; this enabled us to design the transfer function from its state space model.Moreover, the initial control outputs determined using open loop system approach gave unstable response, obviously, system requires a feed-back response inherited with a certain controller to stabilize its response.While in this proposed study, PID was implemented for system response refinement and phase lead compensators were used for optimizing unstable dynamics of certain inputs that were not easily controlled by PID.Likewise, Rudder and Aileron parameters obtained through PID controller demonstrated stable characteristics, but 2 parameters from the both groups were further stabilized through compensating gain technique.A schematic design shows the workflow of this research in Figure 1.
The lateral stability derivative parameters for design of transfer function were obtained from XFLR5 as shown in Table 2.
By using Equations ( 1) and ( 2) and Table 1 data, state space model for the lateral dynamics was established.This lateral plant was then divided into five lateral variables that x = [v p r phi psi]; where x is the output variable that consist of v which is "lateral velocity component", p is "roll rate component", r is "yaw rate component", phi is "roll angle component".Multiple Input and Multiple Output (MIMO) system transfer function equations were designed out of these multi variable outputs (these equations are shown from Equations (3) to (12), where input variables controlling these equations were two i.e. one is for aileron input dependent represented by "Yda" and other one is rudder input dependent "Ydr".Transfer functions acquired for state space model are given from Equations ( 3)- (12) in Table 3 and Table 4.

Plant Description When in Loop with PID
We can describe PID controller with following continuous S domain transfer function.
( ) where p K , i K and d K are the proportional gain, integration and derivative coefficients.These are the feed-back gains used to stable the response of plant.In cases critical load disturbance and set-point tracking are desirables the set-point weighting technique is used for the optimization.There is always a steady state error presented in any practical system because if system will be designed it's essential to have some stable region where output of that system responds linearly as input changes.Therefore, considering only proportional control gives us tendency with increase gain and as well oscillations.As compared to proportional

Plant Description When in Loop with Lead Compensator
General equation for frequency domain description for phase lead compensator is given by Equation (4) [17]; where z 0 and p 0 are the zero and pole of the compensator respectively and K c is the controller gain.Moreover, for lead compensator zeros should be less than the number of poles i.e. z < p.In addition to phase lead compensator for the lateral controller, a yaw angle washout filter in the feedback loop is applied to the lateral sub-model for increasing the system yaw damping mode.This loop is acting in phase lead compensation mode.The block diagram of the control loops of phase lead compensator introduced with lateral velocity and yaw rate are shown in Figure 3.Where K c is a gain for compensation and for lateral case when rudder is being used as an input "K c = 288".The difference between desired yaw angle and current aircraft yaw angle is the error signal acting as the reference input for the yaw angle control loop.The gains of the phase lead compensator, as well as the positions of its zero and pole are varied to track the step input at the ailerons.( Designing a PLC is carried out using root locus technique.The lateral velocity and yawing angle with respect to aileron input for stable response is controlled with PLC, which is sketched in methodology section.

Results and Discussion
The optimization of any new unmanned vehicle for stability and control correctness is necessary.As per our design is concerned it was necessary to smoothen the lateral flight dynamics of the UAV while in flight for which, PID and PID signal constraining was used.In this section results and discussion has been presented for controlling rudder and aileron dynamics.First section is lateral control when rudder is selected as an input and second section is lateral control when aileron is selected as an input.

Lateral Control When Rudder Is Selected as an Input
This section holds results and discussion of lateral mode control using rudder as an input variable.In this section five major output variables of lateral dynamics are controlled using rudder.Those five output variables are [v p r phi psi].

Lateral Roll Rate Dynamics Dependent on Rudder Input (PR)
Lateral mode gain setting for roll rate dynamics dependent on rudder input are displayed in Table 5. Figure 4 represents the stabilization of the rudder input on the roll rate.This can be observed in the closed loop response Figure 4(c) and its root locus are within the proximity of negative s-plane.Moreover, the rudder has little or less effect on the rolling moment of the aircraft.Therefore, it gets stabilized quickly from a disturbed mode.

Lateral Roll Angle Dynamics Dependent on Rudder Input (PHIR)
Lateral mode gain setting for roll angle dynamics dependent on rudder input are displayed in Table 6.  Figure 5 represents the stabilization of the rudder input on the roll angle.This can be observed in the closed loop response Figure 5(c) and its root locus are within the proximity of negative s-plane.Moreover, the rudder has little or less effect on the rolling moment of the plane.Therefore it gets stabilized quickly from a disturbed mode.However, initially the response of the closed loop gain is taking time to settle down from disturbed oscillations to steady state.In terms of rolling motion induced due to roll angle, Dutch roll performance is present in the negative s-plane, however, near to the complex axis, demonstrating boundary level stability.

Lateral YAW Angle Dynamics Dependent on Rudder Input (PSIR)
Lateral mode gain setting for yaw angle dynamics dependent on rudder input are displayed in Table 7.
Figure 6 is representing unstable response after setting the closed loop gains for yaw angle with respect to rudder input.This is because the rudder has high influence on the yaw angle of the UAV.Therefore, it requires a compensator to overcome this divergence from the unstable zone.In addition to this, compensator was added as shown in Equation ( 16) to the feedback response of the controller to stabilize the yawing angle with respect to rudder input.This compensator helps in damping out the unwanted vibrations and oscillations involved in destabilizing of the control surface as shown in Figure 7(a) by the step response of the yaw angle dependent on rudder input.Moreover, the root locus is also in the negative half of the s-plane as shown in Figure 7     with a K = 0.01.

Lateral Yaw Rate Dynamics Dependent on Rudder Input (RR)
Lateral mode gain setting for yaw rate dynamics dependent on rudder input are displayed in Table 8.
Figure 8 demonstrates stability in the yawing rate of the UAV after initializing the robust control gains.The stability is demonstrated for the spiral and roll modes, however, spiral mode is marginally stable as it is on the complex axis as shown in Figure 8(d).

Lateral Velocity Dynamics Dependent on Rudder Input (VR)
Lateral mode gain setting for lateral velocity dynamics dependent on rudder input are displayed in Table 9.
Figure 9 presents high rate of instability for sideslip velocity component when rudder input is used.However, balancing this requires a compensator to be placed, which damps out the response of sideslip entropy.Therefore, compensator was added in a lead/lag fashion with a gain as shown in Equation (17).By    with a K = 0.01.

Lateral Control When Aileron Is Selected as an Input
This section holds results and discussion of lateral mode control using aileron as an input variable.In this section five major output variables of lateral dynamics are controlled using aileron.10.
The plot (c) in the Figure 11 shows poles in the negative region of the root locus plot.The modes that can be observed are related with Dutch roll motion of aircraft as the poles are standing on −7.72 ± 8.66 i.The value shows that Dutch roll performance of this aircraft while having input from aileron will give stable performance.Moreover, the rolling mode can create misleading movement in the aircraft motion which can cause undesired banking of the aircraft towards either of the x-axis ultimately making the aircraft to go in spiral mode, therefore, to tackle its stabilization with respect to roll-axis i.e. (x-axis) signal constrained PID were implemented to improve the stability response.In the meanwhile, the closed loop step response shows that the minimum settling time for roll rate on aileron input is less than one second.

Lateral Roll Angle Dynamics Dependent on Aileron Input (PHIA)
Lateral mode gain settings for roll angle dynamics dependent on aileron input are displayed in Table 11.From Figure 14(c) it is depicted that the closed loop response is not settling, however, to further control compensator gains will be required for signal compensation.Moreover, closed loop root locus show that gains are in the right half of s-plane therefore, Dutch roll response is unstable.Reason behind this instability is because yaw rate is hard to stabilize while controlling with aileron.Nevertheless, spiral and roll mode poles are located in negative half plane showing the controllability of the UAV.However, in addition to this a compensator was used as a washout filter as shown in equation 18 to control the undesired response of the yaw angle due to aileron input.This compensator also acts as a yaw damper.
Results of the yaw damper show that the response of the yaw angle is now in controllable region by which pilot has got enough room for response and to control the aircraft dynamics.Figure 15(b) shows yaw damping by adding washout filter demonstrating high controllability over the Dutch roll response, however, without compensator as shown in Figure 14(d), it is highly uncontrollable.Moreover, the step response after implementing compensator demonstrates stability and monotonic decaying of the response signal for a longer time period giving room to pilot over controlling of yaw moment.Due to the fact of practical implementation of maneuverability it is desired to have damped response with marginally instable spiral mode, so that pilot has room for maneuvering the aircraft easily.Therefore, using phase lead compensator apparently helps in achieving desired damped response by introducing certain zeroes and Engineering poles, where number of zeros is greater than the poles for PLC.Moreover, frequency, gain and phase margin are tweaked to achieve desired response.As compared to PID for the controlling step response of yaw rate with respect to aileron input compensator technique is more preferable as shown in Figure 15 with a gain Ka of 288.

Lateral Velocity Dynamics Dependent on Aileron Input (VA)
Lateral mode gain setting for lateral velocity dynamics dependent on aileron input are displayed in Table 14.
Figure 16 shows effect of aileron input on the sideslip velocity, it is depicted from above figures that using aileron, sideslip velocity cannot be controlled as it is dependent more on rudder rather than aileron.Moreover, the aileron effects are induced on the x-axis rather than z-axis.This enables smooth control of the rolling not for yawing motion.However, a compensator was added as shown by Equation ( 19) for controlling the sideslip velocity of the UAV and marginable control was achieved as shown by the Figure 17(b) root locus of the sideslip velocity with respect to aileron input.Moreover, the step response is also stable after adding a lead compensator to the lateral plant model.When we are using the PID controller, the response of the lateral velocity with respect to aileron input shows instability.Therefore, to stabilize the response of lateral velocity washout filter in a phase lead compensator arrangement has been inherited to overcome the instability.Moreover, in this case for better transient response phase lead compensator is more preferable due to its minimum rise time to desired lateral response as shown in Figure 17(a).
The compensator that was added to tackle the oscillation is shown in Equation (19); it is a lead compensator as the number of zeros are less than the number of poles.
Added compensator: and also a gain with it K = 288.
While in the navigation and control domain large number of onboard control algorithms has been developed.Most of the times, some non-linear techniques have been used to optimize model with high control response.In spite of their revolutionary success, few of them are used and implemented.Likewise, Sheiba-A.Loya et al.DOI: 10.4236/eng.2018.1010051706 Engineering

Figure 1 .
Figure 1.Schematic of the workflow that has been performed in this research.

Figure 3 .
Figure 3. Connection of lead compensators with lateral plant for compensating output signal i.e.(a) lateral velocity compensation and (b) yaw rate compensation.

Figure 4 .
Figure 4. Root locus and step response of lateral roll rate dynamics dependent on Rudder input (a) open loop step response, (b) root locus of open loop system, (c) closed loop step response and (d) root locus of closed loop system. (b).

Figure 5 .
Figure 5. Root locus and step response of lateral roll angle dynamics dependent on Rudder input (a) open loop step response, (b) root locus of open loop system, (c) closed loop step response and (d) root locus of closed loop system.

Figure 6 .
Figure 6.Root locus and step response of lateral yaw angle dynamics dependent on Rudder input (a) open loop step response, (b) root locus of open loop system, (c) closed loop step response and (d) root locus of closed loop system.

Figure 7 .
Figure 7.When a compensator is added to the psi angle with respect to rudder input; (a) step response (b) root locus.
adding the compensator demonstrated marginable stability over the previous closed loop results without any compensator.This compensator helps in damping out the unwanted vibrations and oscillation involved in destabilizing of lateral velocity as shown in Figure 10(a) by the step response of the sideslip velocity dependent on rudder input.Moreover, the root locus plot in Figure 10(b) demonstrates the close loop poles are now in negative s-plane region than what was seen before without a compensator in Figure 9(d).

Figure 8 .
Figure 8. Root locus and step response of lateral yaw rate dynamics dependent on Rudder input (a) open loop step response, (b) root locus of open loop system, (c) closed loop step response and (d) root locus of closed loop system.

Figure 9 .Figure 10 .
Figure 9. Root locus and step response of lateral velocity dynamics dependent on Rudder input (a) open loop step response, (b) root locus of open loop system, (c) closed loop step response and (d) root locus of closed loop system.

Figure 11 .
Figure 11.Root locus and step response of lateral roll rate dynamics dependent on aileron input (a) open loop step response, (b) root locus of open loop system, (c) closed loop step response and (d) root locus of closed loop system.

Figure 13 .
Figure 13.Root locus and step response of lateral yaw angle dynamics dependent on aileron input (a) open loop step response, (b) root locus of open loop system, (c) closed loop step response and (d) root locus of closed loop system.

Table 3 .
UAV lateral dynamic transfer functions with respect to aileron input.

Table 4 .
UAV lateral dynamic transfer functions with respect to rudder input.
control, integral controller is always used to decrease the error after this implementation, tendency towards oscillations increases with the decrease in integral time.Moreover, integral coefficient minimizes the steady state error.However, derivative term is used to decrease the damping effect on closed loop response, initially damping increases with small increase of derivative time, however, with large derivative damping becomes minimal.In this proposed research root locus based PID controller is implemented for the lateral control, using lateral sub-model of a UAV.3.

2. Plant Description When in Loop with Signal Constraining PID
Therefore, due to fast computing invention, it is now possible to use SCPC in dynamically fast process like civil air-vehicles.In this proposed model objec- required for optimization took too much time.With the advancement in automatic computational algorithms the use of SCPC is now more feasible and reliable.Fast computing also made this process efficient and safer for UAV applica-A.Loya et al.DOI: 10.4236/eng.2018.1010051711 Engineering tions.

Table 5 .
UAV roll rate dynamics dependent on Rudder input (pr).

Lateral Roll Rate Dynamics Dependent on Aileron Input (PA)
Those five output variables are [v p r phi A. Loya et al.Lateral mode gain setting for roll rate dynamics dependent on aileron input are displayed in Table