^{1}

^{*}

^{1}

^{*}

The aim of this study is designing an optimal controller with linear quadratic regulator (LQR) method for a small un manned air vehicle (UAV). To better evaluate the effect of disturbances on the obtained measurements a Kalman filter is also used in the system. For this purpose a small UAV that is normally used as a radio controlled plane is chosen. The linearized equations for a wings level flight condition and the state space matrices are obtained. An optimal controller using LQR method to control the altitude level is then designed. The effect of the disturbances on the measurements are taken into account and the effectiveness of the Kalman filter in obtaining the correct measurements and achieving the desired control level are shown using the controller designed for the system. The small UAV is commanded to the de sired altitude using the LQR controller through the control inputs elevator deflection and thrust rate. The LQR effec tiveness matrices are chosen to find the gains necessary to build an effective altitude controller. Firstly the controller is tested under the situation where disturbances are absent. Then a Kalman filter is designed and the system under distur bances is tested with the designed controller and the filter. The results reveal the effectiveness of the Kalman filter and the LQR controller .

Unmanned air vehicles (UAVs) have become a popular research subject in the last years. These vehicles can be used for many different missions including rescue, data gathering and military missions.

To design a control system for an UAV defining the dynamic model and finding the aerodynamic coefficients are the first steps. The non-linear model can then be linearized to design a linear controller for the UAV [

The optimal control technique linear quadratic regulator (LQR) is chosen to design a controller for the longitudinal motion of a small fixed-wing type UAV. Kalman filter technique is then applied to see how the controller is affected by disturbances. The effectiveness of the controller with and without the Kalman filter is also shown through simulations. Linear quadratic control is an optimal control technique that is used for controlling the aircraft. This control technique aims to decrease the energy that is used to control the aircraft. This technique can be applied together with a filtering technique (Kalman filter etc.) in cases where some of the states are not available for measurement or when the measurements are noisy.

Studies that include LQR control design for different types of aircraft are present [

In some studies filtering techniques are used to analyze the effects of LQR design and increase the effectiveness of the controller. The paper [

Some advanced techniques including robust and adaptive control techniques are also used in UAV control. For example in one study by Johnson and Calise, Hinfinity technique is used to design a velocity and altitude controller that follows a determined model [

In this study an altitude controller is designed for a small UAV using the optimal LQR control method with Kalman estimator. Finally the effectiveness of the controller with the gains found by LQR method is investigated under the effect of disturbances and with the Kalman filter.

In this study the longitudinal motion of the small UAV is investigated. We can find the longitudinal equations of motion for the UAV by linearizing the equations for wings-level flight.

The longitudinal state model is given below:

where, and are the elevator and throttle control inputs, u is the forward velocity, w is the vertical velocity, q is the pitch rate, θ is the pitch angle and h is the altitude, , , , , , , , , and, , , are the dimensional stability derivatives.

The mathematical model (1) can be presented in the matrix form:

where is the state vector of the longitudinal motion of UAV,

is the system transition matrix,

is the control distribution matrix and is the vector of control input.

Characteristic equations are investigated firstly to analyze the stability of the UAV. The longitudinal equations can be calculated using the transfer functions. The characteristic equation for the longitudinal motion is as follows:

Longitudinal motion can be represented by two different modes, namely short period and phugoid mode. Phugoid mode has the characteristic of longer period times and lower damping factors and can be easily controlled. Phugoid mode can be described as the change in kinetic and potential energy in which attack angle changes are significantly smaller than the changes in velocity and pitch angle. Short period mode occurs in a smaller time period where the change in pitch and attack angles are significant and it also has high damping factor. The longitudinal roots show a stable motion. Some of the characteristic values for these longitudinal motions are given in

In this study, LQR is adopted as an optimal control technique for the UAV. Considering a system with state space model (2), the optimal control vector is as follows:

In order to determine the optimal control inputs, while optimizing the state variables at the same time, the following cost function (also called quadratic performance index) has to be minimized [

where Q is a semi-positive definite symmetric matrix and R is a positive definite symmetric matrix. Q and R weight matrices are chosen to control each state effectively using little control effort according to the performance index (5).

The gain matrix of the optimal control vector can be computed by the following equation:

Therefore, optimal control equation becomes:

If one positive definite P matrix can be calculated by the following Ricatti equation then the system is said to stable:

Under some special conditions the LQR controller can be designed using the Riccati Equation (8) without changing the state and control matrices to find the optimal gain matrix [

The optimal filter can also be considered in cases where some unknown states are present [

For this system without adding an integrator we can use the previously determined A and B matrices together with the control and state weight matrices Q and R to find the optimal gain matrix K that will let us find the control input.

LQR height controller simulation results are shown in Figures 1-3. The altitude change input (20 m) is used in

the simulations. Also the effect of using different weight matrices is shown using different Q matrices.

The effectiveness matrices used in LQR controller are given below:

.

It is understood that LQR controller works well for longitudinal UAV control system. By changing Q we may change the results of the state variables according to the requirements. With Q_{1} as can be seen in

In this study an LQR controller is designed without taking the effect of the disturbances on the measurements. The system equations are discretized using the Euler approach. Firstly the LQR altitude controller without the effect of disturbances is tested then the response of the system with the controller under the disturbances is tested with and without Kalman filter. The effectiveness of the Kalman filter is shown using the results.

Kalman filter uses state equations (state space matrices) and initial values to calculate the residue and gain values and to estimate the real signal value. The steps of the Kalman filter can be explained using linear discretized state and measurement equations:

In the state equation is the state vector of the system, A is the system transition matrix, is the input vector, B is the control distribution matrix, is the random Gaussian noise vector (system noise) with zero mean and known covariance structure, G is the transition matrix of the system noise. In the measurement equation is the measurement vector, H is the measurement matrix, is the measurement noise vector with zero mean and known covariance structure. There is no correlation between the system noise and the measurement noise. The covariance matrices for the and vectors are given by:

Here E is the expected value operator, is the Kronecker symbol.

The optimum linear Kalman filter that estimates the state vector of the system (9) is expressed with the following recursive equations system:

Equation of the extrapolation value,

The innovation sequence,

Equation of the estimation value,

Gain matrix of the optimum linear Kalman filter,

The covariance matrix of the filtering error is,

The covariance matrix of the extrapolation error is,

where is the desired vector, I is the identity matrix.

Kalman filter tries to estimate the real signal from the signal with disturbance which has Gaussian distribution using the described steps and decreasing the value between two signals [9,10].

The model of longitudinal motion (2) can be discretized using Euler approach and determining time period dt. Thus the new discretized A and B matrices to be used in the filtering approach can be found by and.

The discretized UAV model can be given as follows:

In our case disturbance with Gaussian white noise characteristics generated by Matlab commands is applied to the real values found using our UAV model. Kalman filtering technique is then applied and its effectiveness is shown. In the real scenario the disturbances in measurements and process is usual and have an effect on the controller. Thus using a filtering technique is important.

The values of the states can be calculated using Equation (17) that includes the control rule. The disturbances on the states of course must be determined firstly and applied to the system. Finally Kalman filter can be applied to the system with the disturbances to develop an effective controller. To do this a Matlab code is written. The results are given in Figures 4-7. The Kalman filter that works as an optimal observer is estimating the new values of the states correctly and decreasing the error.

As seen from Figures 4-7, in case of disturbances, using a Kalman filter to estimate the values of the states clearly increase the effectiveness of the LQR controller.

In this study an altitude control system is designed for a small UAV using the optimal control method LQR. This method which is effective in controlling the longitudinal motion of the UAV is based on the acceptance that all

states can be measured truly however in real cases it is not generally possible. To make the controller more effective Kalman filter approach is used in the study. A Kalman filter is designed and added to the system and the response of the controller with and without disturbances and the Kalman filter is tested. The simulations show that in case of disturbances using a Kalman filter to estimate the values of the states clearly increase the effectiveness of the LQR controller. In conclusion it is found that an LQR controller with Kalman filter is effective in controlling the longitudinal motion of the UAV and can be used for such applications.