Bachelor Thesis

Control of a Three Dimension of Freedom Quadcopter Stand Using a Linear Quadratic Integral Regulator Based on the Differential Game Theory MATLABver MATLAB2020a Simulink xelatex2020

Abstract

In this study, a quadcopter stand with three degrees of freedom was controlled using game theory-based control. The first player tracks a desired input, and the second player creates a disturbance in the tracking of the first player to cause an error in the tracking. The move is chosen using the Nash equilibrium, which presupposes that the other player made the worst move.. In addition to being resistant to input interruptions, this method may also be resilient to modeling system uncertainty. This method evaluated the performance through simulation in the Simulink environment and implementation on a three-degree-of-freedom stand.

Keywords: Quadcopter, Differential Game, Game Theory, Nash Equilibrium, Three Degree of Freedom Stand, Model Base Design, Linear Quadratic Regulator

Plant

This is three degree of freedom quadcopter stand.

Differential game

In game theory, differential games are a group of problems related to the modeling and analysis of conflict in the context of a dynamical system. More specifically, a state variable or variables evolve over time according to a differential equation.

LQDG controller

Optimum answer of LQDG come from solving two coupled riccati equation. riccati equation mentioned before:

$$ \begin{split} \boldsymbol{\dot{K}_1}(t) &= -\boldsymbol{A}^\mathrm{T}\boldsymbol{K_1}(t) - \boldsymbol{K_1}(t)\boldsymbol{A} - \boldsymbol{Q_1} +\boldsymbol{K_1}(t)\boldsymbol{S_1}(t)\boldsymbol{K_1}(t) + \boldsymbol{K_1}(t)\boldsymbol{S_2}(t)\boldsymbol{K_2}(t)\\ \boldsymbol{\dot{K}_2}(t) &= -\boldsymbol{A}^\mathrm{T}\boldsymbol{K_2}(t) - \boldsymbol{K_2}(t)\boldsymbol{A} - \boldsymbol{Q_2} +\boldsymbol{K_2}(t)\boldsymbol{S_2}(t)\boldsymbol{K_2}(t) + \boldsymbol{K_2}(t)\boldsymbol{S_1}(t)\boldsymbol{K_1}(t) \end{split} $$

Optimum control command:

$$ \boldsymbol{u_i}(t) = -\boldsymbol{R_{ii}}^{-1}\boldsymbol{B_i}^\mathrm{T}\boldsymbol{K_{i}}(t)\boldsymbol{x}(t),\quad i = 1, 2 $$

LQIDG controller

When there is uncertanity in model it is better to use LQIDG controller. In this controller, the integral of the difference between the system output and the desired value is added to the state vector.

$$ \boldsymbol{x_a} = \begin{bmatrix} \boldsymbol{x_d} - \boldsymbol{x}\\ \displaystyle \int (\boldsymbol{y_d} - \boldsymbol{y}) \end{bmatrix} $$

New space state matrix:

$$ \boldsymbol{A_a} = \begin{bmatrix} \boldsymbol{A} &0\\ \boldsymbol{C} & 0 \end{bmatrix} $$

$$ \boldsymbol{B_a} = \begin{bmatrix} \boldsymbol{B}\\ 0 \end{bmatrix} $$

and C matrix is identity matrix. LQIDG coupled riccati equation:

$$ \begin{split} \boldsymbol{\dot{K}{a_1}}(t) &= -\boldsymbol{A}^\mathrm{T}\boldsymbol{K{a_1}}(t) - \boldsymbol{K_{a_1}}(t)\boldsymbol{A} - \boldsymbol{Q_{a_1}} +\boldsymbol{K_{a_1}}(t)\boldsymbol{S_{a_1}}(t)\boldsymbol{K_{a_1}}(t) + \boldsymbol{K_{a_1}}(t)\boldsymbol{S_{a_2}}(t)\boldsymbol{K_{a_2}}(t)\ \boldsymbol{\dot{K}{a_2}}(t) &= -\boldsymbol{A}^\mathrm{T}\boldsymbol{K{a_2}}(t) - \boldsymbol{K_{a_2}}(t)\boldsymbol{A} - \boldsymbol{Q_{a_2}} +\boldsymbol{K_{a_2}}(t)\boldsymbol{S_{a_2}}(t)\boldsymbol{K_{a_2}}(t) + \boldsymbol{K_{a_2}}(t)\boldsymbol{S_{a_1}}(t)\boldsymbol{K_{a_1}}(t) \end{split} $$

LQIDG omptimum control command:

$$ \boldsymbol{u_i}(t) = -\boldsymbol{R_{ii}}^{-1}\boldsymbol{B_{a_i}}^\mathrm{T}\boldsymbol{K_{a_i}}(t)\boldsymbol{x_a}(t),\quad i = 1, 2 $$

Model of quadcopter stand

This Article used perivous work to model the quadcopter stand. Final model is shown below.

$$ \boldsymbol{\dot x} = \boldsymbol f(\boldsymbol x, \boldsymbol{\omega}) $$

$$ \boldsymbol f = \begin{bmatrix} x_4 + x_5\sin(x_1)\tan(x_2) + x_6\cos(x_1)\tan(x_2)\\ x_5\cos(x_1)- x_6\sin(x_1)\\ (x_5\sin(x_1) + x_6\cos(x_1))\sec(x_2)\\ A_1\cos(x_2)\sin(x_1) + A_2x_5x_6 + A_3\sigma_1+ A_4x_5\sigma_4- \dfrac{x_4}{\lvert x_4\rvert}A_5+A_6\cos(x_1)\\ B_1\sin(x_2) + B_2x_4x_6 + B_3\sigma_2+ B_4x_4\sigma_4- \dfrac{x_5}{\lvert x_5\rvert}B_5 + B_6\cos(x_2)\\ C_1x_4x_5 + C_2\sigma_3- \dfrac{x_6}{\lvert x_6\rvert}C_3 \end{bmatrix} $$

Constants used above are shown below.

$$ \begin{align*} &A_1 = \dfrac{h_{cg}gm_{tot}}{m_{tot}h_{cg}^2+J_{11}}& &A_2 = \dfrac{2m_{tot}h_{cg}^2+J_{22}-J_{33}}{m_{tot}h_{cg}^2+J_{11}}& &A_3 = \dfrac{bd_{cg}}{m_{tot}h_{cg}^2+J_{11}}& \\ & A_4 = \dfrac{J_R}{m_{tot}h_{cg}^2+J_{11}} & & A_5 = \dfrac{m_1g\mu r_x}{m_{tot}h_{cg}^2 + J_{11}} & & A_6= \dfrac{m_{tot}x_{cg}}{m_{tot}h_{cg}^2+J_{11}} \\ &B_1 = \dfrac{h_{cg}gm_{tot}}{m_{tot}h_{cg}^2+J_{22}}& &B_2 = \dfrac{-2m_{tot}h_{cg}^2-J_{11}+J_{33}}{m_{tot}h_{cg}^2+J_{22}}& &B_3 = \dfrac{bd_{cg}}{m_{tot}h_{cg}^2+J_{22}}& \\ &B_4 = \dfrac{-J_R}{m_{tot}h_{cg}^2+J_{22}}& & B_5 = \dfrac{m_2g\mu r_y}{m_{tot}h_{cg}^2 + J_{22}}& & B_6= \dfrac{m_{tot}y_{cg}}{m_{tot}h_{cg}^2+J_{22}} \end{align*} $$

$$ \begin{align*} C_1 =\dfrac{J_{11}-J_{22}}{J_{33}}\quad C_2 =\dfrac{d}{J_{33}}\quad C_3 = \dfrac{m_3g\mu r_z}{ J_{33}} \end{align*} $$

The parameter used in this model introduced in the article.

Simulation in MATLAB simulink

In this article used simmulink to simulate the quadcopter stand. Simulation in MATLAB simulink is shown below.

Stand_Model

Solving differtial eqautions using ode45.

Integrator

All 6 chanell of quadcopter are shown in the figure below.

All-six

Simulation of quadcopter with LQIDG controller in MATLAB simulink

Three degree of freedom simulation of quadcopter are shown in the figure below. For optimzation of LQIDG weighting matrix used TCACS algorithm.

roll pitch
yaw

Motor commands simulation of quadcopter are shown in the figure below.

Motor 1 Motor 2
Motor 3 Motor 4

Final test of quadcopter with LQIDG controller in MATLAB simulink

Three degree of freedom final test of quadcopter are shown in the figure below. For optimzation of LQIDG weighting matrix used TCACS algorithm that used in simulation.

roll pitch
yaw

Motor commands final test of quadcopter are shown in the figure below.

Motor 1 Motor 2
Motor 3 Motor 4

This project is licensed under the MIT License - Author: Ali BaniAsad