# On the Rejection of Random Perturbations and the Tracking of Random References in a Quadrotor

Authors: Jesus Alberto Meda-Campaña; Jonathan Omega Escobedo-Alva; José de Jesús Rubio; Carlos Aguilar-Ibañez; Jose Humberto Perez-Cruz; Guillermo Obregon-Pulido; Ricardo Tapia-Herrera; Eduardo Orozco; Daniel Andres Cordova; Marco Antonio Islas
Journal: Complexity
 (2022)

---

## Abstract

In this note, the problem of tracking random references and rejecting random perturbations in a quadrotor, both generated by an auxiliary system named exosystem, is solved by extending the deterministic tracking problem to the area of stochastic processes. Besides, it is considered that only a part of the state vector of the quadrotor is available through measurements. As a consequence, the state vector of the plant must be estimated in order to close the control loop. On this basis, a controller to track random references and to reject random perturbations is developed by combining a Kalman filter to estimate the references and perturbations of an exosystem and an observer to estimate the states of a quadrotor. Besides, to obtain a more practical controller, the analysis is carried out in discrete time. Numerical simulations are used in a quadrotor to confirm the validity and effectiveness of the proposed control.


---

## Body

## 1. Introduction

In the control field, the problem of imposing random references on some outputs of unmanned aerial vehicles is a very recurrent problem. This is because such scenarios appear in many disciplines of science and technology, and among them, aeronautics is one of those areas. Besides, the study of a quadrotor is gaining great interest because of their wide range of applications and low cost [1]. For instance, the chaotic approach [2–4], the chaotic attractors [5–7], the adaptive technique [8–10], the sliding mode strategy [11–13], the robust technique [14–16], the learning strategy [17–19], and the structure method [20, 21] are used for the tracking of quadrotors. As can be expected, the bibliography related to the control of quadrotors is vast and it goes on and on.In other orders of ideas, the tracking theory is a well-posed frame of work providing the tools to ensure asymptotic stability while references are tracked and perturbations are rejected. Roughly speaking, the solution for the tracking problem is provided by a control vector achieving two goals: (1) the asymptotic stabilization of the equilibrium of the quadrotor and (2) the tracking of random references and the rejecting of random perturbations, both produced by an auxiliary system named exosystem [22].For the linear problem, the solution has been presented by [23]. There, the author showed that the existence of the desired control coincides with the existence of the solution of some simultaneous equations, which can be represented in a matrix form and they are named Francis equations. Afterward, the nonlinear tracking problem was analyzed and it was concluded that the linear result is a particular case of the nonlinear problem. However, some nonlinear partial differential equations need to be solved in order to obtain the nonlinear control. Unfortunately, in many cases, the solution of such nonlinear partial differential equations is very difficult to obtain [22]. Thus, the avoiding of such nonlinear partial differential equations has been also studied. For instance, Takagi-Sugeno fuzzy systems and neural networks have been successfully used to extrapolate the linear control to the nonlinear field, without involving nonlinear partial differential equations [24].On the other hand, most of the references and perturbations in nature are not perfectly harmonic. For instance, the flight of butterflies, the behavior of the heart, brain, human march, among others, include a little bit of randomness, to say the least. To estimate these kinds of references and perturbations, the Kalman filter [25] has been and still is a very good alternative. In this sense, in [26], the Kalman filter is used for the quadrotors parameters identification, and in [27, 28], the Kalman filter is used for the quadrotors states estimation.With all this in mind, the problem to be studied in current work can be stated as the problem of ensuring that the output of a quadrotor behaves as an external random perturbation while the stability property is maintained. Roughly speaking, the main contribution of this paper is the extension of the deterministic references tracking and deterministic perturbations rejection to the stochastic field, by assuming that the generator of references and perturbations is subject to random uncertainties.Besides, in order to make the problem more realistic, it is assumed that only a part of the state is available. The novelty of the proposed approach is the combination of the Kalman filtering and the regulation theory to solve the references tracking and perturbations rejection; this problem cannot be solved by the Kalman filter or the regulation theory by themselves. In this sense, the desired controller must achieve two goals which are very similar to those considered in the tracking problem: (1) to stabilize the quadrotor around an operation point when the exosystem is affecting it and (2) to minimize the tracking error when the quadrotor is influenced by external perturbations. On the basis of the observer and Kalman filter, some random references will be imposed on the quadrotor, while some random perturbations are rejected as well.The rest of the work is arranged in the following way: Brief reminders of the tracking and Kalman filter are given in Section2. Besides, the numerical model of the quadrotor and the definition of the problem are also included there. Section 3 is devoted to obtaining the main results. The numerical simulations of a quadrotor are analyzed in Section 4, while some conclusions are given in Section 5.


## 2. Problem Setup

In this section, the control problem is defined. But before that, the control, the Kalman filter, and the quadrotor are briefly introduced.


### 2.1. The Control for Deterministic Plants

Let the plant be(1)x˙t=Axt+But+Pwt,zt=Czxt,where xt∈ℜn is the state of the plant, ut∈ℜp is the control input, zt∈ℜmz is the output, and wt∈ℜℓ is the solution of the exosystem:(2)w˙t=Aexowt,zreft=Cexowt.Withzreft∈ℜmz as the references to be tracked and Pwt as the perturbations to be rejected, system (1) and (2) corresponds to the regulation problem in continuous time, where (1) is the plant to be regulated, while (2) is an auxiliary system used to model the references/perturbations signals.Clearly, it is possible to construct a block diagonal matrixAexo, such that each block on the diagonal describes the behavior of the references or perturbations to be generated by (2). So, Cexo and P can be viewed as output matrices for such an exosystem.The tracking error iset=zt−zreft, and the control ut must achieve(3)limt⟶∞et=0.In [22, 23], it has been shown that the control ut which solves the control problem is(4)ut=Kxt−Πwt+Γwt,where the steady-state xsst=Πwt is invariant through usst=Γwt, where Π∈ℜn×ℓ and Γ∈ℜp×ℓ solve the Francis equations, defined as(5)AΠ+BΓ+P=ΠAexo,CzΠ−Cexo=0.Notice that equations (5) are a set of n×ℓ+mz×ℓ simultaneous equations with n×ℓ+p×ℓ unknowns. These equations can be readily solved. These equations can be solved analytically or with the help of numerical tools, in general, when p≥mz. The following theorem summarizes the previous analysis.Theorem 1.
Assuming that the exosystem is given by (2) and H1: There exists a matrix K which stabilizes the pair (A , B) and H2: There exists a solution for Francis equations (5) given by Π∈ℜn×ℓ and Γ∈ℜp×ℓ, then, the tracking problem described by (1) and (2) can be solved by (4).Proof.
Consideresst=xt−Πwt as the steady-state error. Now, its first-order derivative is(6)e˙sst=x˙t−Πw˙t,⇒e˙sst=Axt+But+Pwt−ΠAexowt.
At this point, it is easy to obtain(7)e˙sst=A+BKesst+AΠwt+BΓwt+Pwt−ΠAexowt.
From (7), it is clear that esst is zeroed as t⟶∞ if (1) A+BK is Hurwitz (Assumption H1), and (2) AΠ+BΓ+P=ΠAexo, which coincides with (5). Observe that (5) involves n×ℓ equations with n×ℓ+p×ℓ unknowns.
But, the tracking error is rewritten as(8)et=Czesst+Πwt−Cexowt.
The missing equations are obtained. Notice that (8) coincides with (5), in steady-state, i.e., when esst=0. To conclude, notice that if mz=p, then equation (5) may have a unique solution; if p>mz, then an infinite of solutions may exist. And, if p<mz, then (5) may not have solution, in general [23].


### 2.2. Kalman Filter (KF)

The Kalman filter is an iterative process based on the least square method, which is able to estimate the states of a plant in an optimal way [25].Consider the following discrete-time plant:(9)xk+1=Axk+Buk+Mξk,yk=Cxk+Nηk,where, as usual, the discrete time is represented by k, and xk∈ℜn, uk∈ℜp, and yk∈ℜm are the state, input, and output vectors, respectively. The dynamic noise is ξk∈ℜq with normal distribution, zero mean, and variance Q∈ℜq×q, while the measurement noise is ηk∈ℜr with normal distribution, zero mean, and variance R∈ℜr×r. It is important to mention that matrices A∈ℜn×n, B∈ℜn×p, C∈ℜm×n, M∈ℜn×q, and N∈ℜm×r are obtained by linearizing the discrete-time quadrotor plant around a suitable operation point. On this basis, the Kalman filter (KF) is defined by(10)x^k|k−1=Ax^k−1|k−1+Buk−1,Pk|k−1=APk−1|k−1AT+MQMT,Gk=Pk|k−1CTCPk|k−1CT+R−1,x^k|k=x^k|k−1+Gkyk−Cx^k|k−1,Pk|k=I−GkCPk|k−1,where x^k−1|k−1 and Pk−1|k−1 are the estimations for the state xk−1 and error variance at iteration k−1, respectively, while x^k|k−1 and Pk|k−1 are the predictions for state xk and variance at iteration k, respectively. And, x^k|k and Pk|k are the updated estimations, through the Kalman gain Gk, for state xk and error variance at iteration k, respectively [25].Evidently, the Kalman filter can be extended to the nonlinear domain by linearizing the quadrotor plant at every discrete instant and by applying the previous equations iteratively. Such a result is known as the extended Kalman filter (EKF).


### 2.3. The Mathematical Model of the Quadrotor

The proposed controller will be tested on a quadrotor with sufficiently complex behavior; the quadrotor can be considered as an aerial robot. The free-body diagram of the quadrotor is given in Figure1, while its mathematical model is [29](11)x˙t=fxt,ut,wt,yt=hxt.Figure 1
Quadrotor free-body diagram.Withxt=x1t…x12tT, ut=u1t…u4tT,(12)fx,u=x2t,f1xt,ut,x4t,f2xt,ut,x6t,−g+cosx9tcosx7tβ1m,x8t,x10tx12tIyy−IzzIxx−JtpIxxx10tω+lβ2Ixx,x10t,x8tx12tIzz−IxxIyy+JtpIyyx8tω+lβ3Iyy,x12t,x8tx10tIxx−IyyIzz+β4Izz..With(13)f1xt,ut=sinx11tsinx7t+cosx11tsinx9tcosx7tβ1m,f2xt,ut=−cosx11tsinx7t+sinx11tsinx9tcosx7tβ1m,β1=bu1t2+u2t2+u3t2+u4t2,β2=bu42+u32−u12−u22,β3=bu2t2+u3t2−u1t2−u4t2,β4=du1t2+u3t2−u2t2−u4t2,Ω=u1t−u2t+u3t−u4t,hxt=Cxt,where C is chosen, (14)hxt=x1tx3tx5tx7tx9tx11tT.t is the continuous time. The frequencies of rotors 1, 2, 3, and 4, which are in fact the effective controls, are described by u1t, u2t, u3t, and u4t, respectively, and they are given in radians per second. The states x1t, x3t, and x5t are given in meters and they describe the linear movements along the Earth fixed axes Xe, Ye, and Ze, respectively. On the other hand, states x7t, x9t, and x11t are given in radians representing angular movements around the body-fixed axes Xb, Yb, and Zb, respectively. And, the even states can be easily identified as the velocities of abovementioned states.The value of the parameters are as follows [29]: b=54.2×10−6N⋅s2 is the thrust coefficient, d=1.1×10−6N⋅m⋅s2 is the drag coefficient, l=0.24m is measured from the quadrotor's center to the rotors' middle point, m=1kg is the mass of the quadrotor, g=9.81m/s2 is the gravity constant, Jtp=104×10−6N⋅m⋅s2 is the rotors' momentum, and Ixx=8.1×10−3N⋅m⋅s2, Iyy=8.1×10−3N⋅m⋅s2, and Izz=14.2×10−3N⋅m⋅s2 are the momentum respect to Xe, Ye, and Ze, respectively. With these values, the quadrotor can be maintained in hovering when uo1=uo2=uo3=uo4≈212.7183rad/s, where u1…u4 are the static controls needed to keep the quadrotor in a static floating position.The discrete-time approximation for equation (11) can be derived by means of the Euler discretization method [25]:(15)x˙t≈xt+T−xtT,where T is the sampling time and it is sufficiently small such that the main features of the continuous-time system are preserved, while the controllability property is not affected. Thus,(16)xt+T≈xt+Tx˙t.Consequently, the discrete-time approximation for (11) is(17)xk+1=xk+Tfxk,uk,wk,yk=hxk,wk,with f⋅,⋅,⋅ as in (12), with T=1/40s.On the other hand, in order to produce the random references and random perturbations, the following stochastic exosystem is considered:(18)wk+1=Aexowk+qMkξk,zref,k=Cexowk+rNkηk,where for this case Aexo∈ℜ5×5, Mk=I5×5, Cexo∈ℜ3×5, and Nk=I3×3, while the dynamic and measurement noises are characterized by their standard deviations q and r, respectively, such that Q=q2Mk and R=r2Nk. Equation (18) is the Euler discretization of the nonlinear model of the quadrotor, and equation (19) is the stochastic exosystem generating the references to be tracked and the perturbations to be rejected. In the following section, the dimensions of Aexo and Cexo are clarified.


### 2.4. The Problem of Tracking Random References in the Presence of Random Perturbations

In this work, it is supposed that only six from the twelve states of the quadrotor are available for measurement, namely,x1, x3, x5, x7, x9, and x11; i.e., only the linear and angular displacements in the axes Xe, Ye, Ze, Xb, Yb, and Zb are available. To overcome this problem, a full-state observer will be considered during the stabilization of the quadrotor.Under such conditions, one random reference will be imposed onx1, another on x3, and the last one on x5. Besides, a random perturbation will affect x2.Both the references and perturbations are generated by a set of equations similar to (9) and (19):(19)wk+1=Aexowk+Mkξk,zref,k=Cexowk+Nkηk.For the definition of structure of the exosystem, it is important to mention that the references and perturbations to be imposed onx1, x3 are pseudoperiodic with frequency of πrad/s, the reference to be imposed on x5 is random with zero mean, and the perturbations affecting the state x2 are also pseudo periodic of π/2rad/s. Therefore, by considering the dimensions of system (11), one way of generating such references and perturbations is through (20) with matrices Aexo=aexo,ij∈ℜ5×5, Cexo=cexo,ij∈ℜ3×5, and P=pij∈ℜ12×5, where aexo,11=aexo,22=0.997, aexo,12=−aexo,21=0.078, aexo,44=aexo,55=0.999, and aexo,45=−aexo,54=0.039, the other terms of Aexo have a value of 0, cexo,11=cexo,22=cexo,33=1, the other terms of Cexo have a value of 0, p25=1, and the other terms of P have a value of 0. At this point, the perturbations can be defined as Pwk.Thus, as mentioned before, in order to track the random references and to reject the random perturbations, they will be estimated online by means of a Kalman filter. In the following section, the structure of the matrices involved in the estimation of the references and perturbations is thoroughly analyzed.


## 2.1. The Control for Deterministic Plants

Let the plant be(1)x˙t=Axt+But+Pwt,zt=Czxt,where xt∈ℜn is the state of the plant, ut∈ℜp is the control input, zt∈ℜmz is the output, and wt∈ℜℓ is the solution of the exosystem:(2)w˙t=Aexowt,zreft=Cexowt.Withzreft∈ℜmz as the references to be tracked and Pwt as the perturbations to be rejected, system (1) and (2) corresponds to the regulation problem in continuous time, where (1) is the plant to be regulated, while (2) is an auxiliary system used to model the references/perturbations signals.Clearly, it is possible to construct a block diagonal matrixAexo, such that each block on the diagonal describes the behavior of the references or perturbations to be generated by (2). So, Cexo and P can be viewed as output matrices for such an exosystem.The tracking error iset=zt−zreft, and the control ut must achieve(3)limt⟶∞et=0.In [22, 23], it has been shown that the control ut which solves the control problem is(4)ut=Kxt−Πwt+Γwt,where the steady-state xsst=Πwt is invariant through usst=Γwt, where Π∈ℜn×ℓ and Γ∈ℜp×ℓ solve the Francis equations, defined as(5)AΠ+BΓ+P=ΠAexo,CzΠ−Cexo=0.Notice that equations (5) are a set of n×ℓ+mz×ℓ simultaneous equations with n×ℓ+p×ℓ unknowns. These equations can be readily solved. These equations can be solved analytically or with the help of numerical tools, in general, when p≥mz. The following theorem summarizes the previous analysis.Theorem 1.
Assuming that the exosystem is given by (2) and H1: There exists a matrix K which stabilizes the pair (A , B) and H2: There exists a solution for Francis equations (5) given by Π∈ℜn×ℓ and Γ∈ℜp×ℓ, then, the tracking problem described by (1) and (2) can be solved by (4).Proof.
Consideresst=xt−Πwt as the steady-state error. Now, its first-order derivative is(6)e˙sst=x˙t−Πw˙t,⇒e˙sst=Axt+But+Pwt−ΠAexowt.
At this point, it is easy to obtain(7)e˙sst=A+BKesst+AΠwt+BΓwt+Pwt−ΠAexowt.
From (7), it is clear that esst is zeroed as t⟶∞ if (1) A+BK is Hurwitz (Assumption H1), and (2) AΠ+BΓ+P=ΠAexo, which coincides with (5). Observe that (5) involves n×ℓ equations with n×ℓ+p×ℓ unknowns.
But, the tracking error is rewritten as(8)et=Czesst+Πwt−Cexowt.
The missing equations are obtained. Notice that (8) coincides with (5), in steady-state, i.e., when esst=0. To conclude, notice that if mz=p, then equation (5) may have a unique solution; if p>mz, then an infinite of solutions may exist. And, if p<mz, then (5) may not have solution, in general [23].


## 2.2. Kalman Filter (KF)

The Kalman filter is an iterative process based on the least square method, which is able to estimate the states of a plant in an optimal way [25].Consider the following discrete-time plant:(9)xk+1=Axk+Buk+Mξk,yk=Cxk+Nηk,where, as usual, the discrete time is represented by k, and xk∈ℜn, uk∈ℜp, and yk∈ℜm are the state, input, and output vectors, respectively. The dynamic noise is ξk∈ℜq with normal distribution, zero mean, and variance Q∈ℜq×q, while the measurement noise is ηk∈ℜr with normal distribution, zero mean, and variance R∈ℜr×r. It is important to mention that matrices A∈ℜn×n, B∈ℜn×p, C∈ℜm×n, M∈ℜn×q, and N∈ℜm×r are obtained by linearizing the discrete-time quadrotor plant around a suitable operation point. On this basis, the Kalman filter (KF) is defined by(10)x^k|k−1=Ax^k−1|k−1+Buk−1,Pk|k−1=APk−1|k−1AT+MQMT,Gk=Pk|k−1CTCPk|k−1CT+R−1,x^k|k=x^k|k−1+Gkyk−Cx^k|k−1,Pk|k=I−GkCPk|k−1,where x^k−1|k−1 and Pk−1|k−1 are the estimations for the state xk−1 and error variance at iteration k−1, respectively, while x^k|k−1 and Pk|k−1 are the predictions for state xk and variance at iteration k, respectively. And, x^k|k and Pk|k are the updated estimations, through the Kalman gain Gk, for state xk and error variance at iteration k, respectively [25].Evidently, the Kalman filter can be extended to the nonlinear domain by linearizing the quadrotor plant at every discrete instant and by applying the previous equations iteratively. Such a result is known as the extended Kalman filter (EKF).


## 2.3. The Mathematical Model of the Quadrotor

The proposed controller will be tested on a quadrotor with sufficiently complex behavior; the quadrotor can be considered as an aerial robot. The free-body diagram of the quadrotor is given in Figure1, while its mathematical model is [29](11)x˙t=fxt,ut,wt,yt=hxt.Figure 1
Quadrotor free-body diagram.Withxt=x1t…x12tT, ut=u1t…u4tT,(12)fx,u=x2t,f1xt,ut,x4t,f2xt,ut,x6t,−g+cosx9tcosx7tβ1m,x8t,x10tx12tIyy−IzzIxx−JtpIxxx10tω+lβ2Ixx,x10t,x8tx12tIzz−IxxIyy+JtpIyyx8tω+lβ3Iyy,x12t,x8tx10tIxx−IyyIzz+β4Izz..With(13)f1xt,ut=sinx11tsinx7t+cosx11tsinx9tcosx7tβ1m,f2xt,ut=−cosx11tsinx7t+sinx11tsinx9tcosx7tβ1m,β1=bu1t2+u2t2+u3t2+u4t2,β2=bu42+u32−u12−u22,β3=bu2t2+u3t2−u1t2−u4t2,β4=du1t2+u3t2−u2t2−u4t2,Ω=u1t−u2t+u3t−u4t,hxt=Cxt,where C is chosen, (14)hxt=x1tx3tx5tx7tx9tx11tT.t is the continuous time. The frequencies of rotors 1, 2, 3, and 4, which are in fact the effective controls, are described by u1t, u2t, u3t, and u4t, respectively, and they are given in radians per second. The states x1t, x3t, and x5t are given in meters and they describe the linear movements along the Earth fixed axes Xe, Ye, and Ze, respectively. On the other hand, states x7t, x9t, and x11t are given in radians representing angular movements around the body-fixed axes Xb, Yb, and Zb, respectively. And, the even states can be easily identified as the velocities of abovementioned states.The value of the parameters are as follows [29]: b=54.2×10−6N⋅s2 is the thrust coefficient, d=1.1×10−6N⋅m⋅s2 is the drag coefficient, l=0.24m is measured from the quadrotor's center to the rotors' middle point, m=1kg is the mass of the quadrotor, g=9.81m/s2 is the gravity constant, Jtp=104×10−6N⋅m⋅s2 is the rotors' momentum, and Ixx=8.1×10−3N⋅m⋅s2, Iyy=8.1×10−3N⋅m⋅s2, and Izz=14.2×10−3N⋅m⋅s2 are the momentum respect to Xe, Ye, and Ze, respectively. With these values, the quadrotor can be maintained in hovering when uo1=uo2=uo3=uo4≈212.7183rad/s, where u1…u4 are the static controls needed to keep the quadrotor in a static floating position.The discrete-time approximation for equation (11) can be derived by means of the Euler discretization method [25]:(15)x˙t≈xt+T−xtT,where T is the sampling time and it is sufficiently small such that the main features of the continuous-time system are preserved, while the controllability property is not affected. Thus,(16)xt+T≈xt+Tx˙t.Consequently, the discrete-time approximation for (11) is(17)xk+1=xk+Tfxk,uk,wk,yk=hxk,wk,with f⋅,⋅,⋅ as in (12), with T=1/40s.On the other hand, in order to produce the random references and random perturbations, the following stochastic exosystem is considered:(18)wk+1=Aexowk+qMkξk,zref,k=Cexowk+rNkηk,where for this case Aexo∈ℜ5×5, Mk=I5×5, Cexo∈ℜ3×5, and Nk=I3×3, while the dynamic and measurement noises are characterized by their standard deviations q and r, respectively, such that Q=q2Mk and R=r2Nk. Equation (18) is the Euler discretization of the nonlinear model of the quadrotor, and equation (19) is the stochastic exosystem generating the references to be tracked and the perturbations to be rejected. In the following section, the dimensions of Aexo and Cexo are clarified.


## 2.4. The Problem of Tracking Random References in the Presence of Random Perturbations

In this work, it is supposed that only six from the twelve states of the quadrotor are available for measurement, namely,x1, x3, x5, x7, x9, and x11; i.e., only the linear and angular displacements in the axes Xe, Ye, Ze, Xb, Yb, and Zb are available. To overcome this problem, a full-state observer will be considered during the stabilization of the quadrotor.Under such conditions, one random reference will be imposed onx1, another on x3, and the last one on x5. Besides, a random perturbation will affect x2.Both the references and perturbations are generated by a set of equations similar to (9) and (19):(19)wk+1=Aexowk+Mkξk,zref,k=Cexowk+Nkηk.For the definition of structure of the exosystem, it is important to mention that the references and perturbations to be imposed onx1, x3 are pseudoperiodic with frequency of πrad/s, the reference to be imposed on x5 is random with zero mean, and the perturbations affecting the state x2 are also pseudo periodic of π/2rad/s. Therefore, by considering the dimensions of system (11), one way of generating such references and perturbations is through (20) with matrices Aexo=aexo,ij∈ℜ5×5, Cexo=cexo,ij∈ℜ3×5, and P=pij∈ℜ12×5, where aexo,11=aexo,22=0.997, aexo,12=−aexo,21=0.078, aexo,44=aexo,55=0.999, and aexo,45=−aexo,54=0.039, the other terms of Aexo have a value of 0, cexo,11=cexo,22=cexo,33=1, the other terms of Cexo have a value of 0, p25=1, and the other terms of P have a value of 0. At this point, the perturbations can be defined as Pwk.Thus, as mentioned before, in order to track the random references and to reject the random perturbations, they will be estimated online by means of a Kalman filter. In the following section, the structure of the matrices involved in the estimation of the references and perturbations is thoroughly analyzed.


## 3. Main Result

To estimate the random references and random perturbations by means of the Kalman filter, it must be recalled that both matricesCexo and P can be viewed as output matrices for the exosystem, and because of their dimension, they can be used to construct an overall output matrix for the exosystem, namely, CTot=CexoTPTT, with CTot∈ℜ15×5.With this in mind, and by considering the expressions for the exosystem, i.e., (20), the estimation problem for the references and perturbations can be solved by a Kalman iterative process like the one defined through equations (9) and (10), where A=Aexo, B=0, and C=CTot, for all k≥0.On the other hand, an observer capable of estimating the full state of a plant from the available outputs when it is subject to random perturbations must be designed. So, for system (21), a quasi-solution for the observability problem is given next.Theorem 2.
Consider a plant in the form of(20)xk+1=Axk+Buk+Pwk,zk=Czxk,yk=Cxk.yk is considered as the vector of available output and zk as the set of output where the references are to be imposed. As before, xk∈ℜn, uk∈ℜp, yk∈ℜm, zk∈ℜmz, and wk∈ℜℓ as the solution of the exosystem(21)wk+1=Aexowk,zref,k=Cexowk.zref,k∈ℜmz are considered as the vector of references to be tracked. Then, the state xk can be taken to a neighborhood around its equilibrium if the pair (A, B) is stabilizable, the pair (A, C) is detectable, and there exists an estimation for perturbation pk=Pwk. Moreover, the quasi-stabilizer is given by the dynamic system:(22)xo,k+1=Axo,k+Buk+p⌢k+Lyk−yo,k,yo,k=Axo,k,uk=Kxo,k,where xo,k is the state of the observer.Proof.
Let the observer for (21) be (23) and eo=xk−xo,k with uk as in (22) for both (21) and (23). Thus eo,k+1 can be written as(23)eo,k+1=Aeo,k+ep,k+LCeo,k,where ep,k=pk−p^k. Thus, by continuity, if the system (21) is detectable and if ep,k is sufficiently small, then gain L exists because ep,k could be disregarded. Besides, if (21) is stabilizable the gain K also exists and both state vectors xk and xo,k tend to a neighborhood around the equilibrium by means of (22).
Notice that, previously, it has been supposed thatpk can be estimated by the Kalman filter.
Now, the regulation problem presented in Section2.1 must be extended to the field of the discrete-time systems, but considering that the states and output of the exosystem are influenced by noise. To this end, consider the discrete-time plant (21) and the exosystem (20).
Thus, by mimicking the procedure in Section2.1, the tracking error is given by ek=zk−zref,k, and the tracking problem for discrete time is solved by a control vector uk such that(24)limk⟶∞ek=0.
As above, it will be considered that the tracking problem for discrete-time plants is solved by(25)uk=Kxo,k−Πw^k+Γw^k,where xo,k is the observed state of the plant, w^k is the Kalman estimation for wk, the manifold of steady-state is xss,k=Πw^k, and the steady-state input is uss,k=Γw^k, with Π∈ℜn×ℓ and Γ∈ℜp×ℓ as the solution of(26)AΠ+BΓ+P=ΠAexo,CΠ−Cexo=0.
At this point, the following result naturally arises.Theorem 3.
Considering the tracking problem defined by (20) and (21), and assuming H1: There exists a matrix K which stabilizes (A, B), H2: There exists a matrix L, such that the pair (A, C) is detectable, and H3: There exists a solution for Francis equation (26) given by Π∈ℜn×ℓ and Γ∈ℜp×ℓ, then, the tracking problem for the discrete-time system defined by (20) and (21) is solved by (25).Proof.
Let the steady-state error beess,k=xo,k−Πw^k. Thus,(27)ess,k+1=xo,k+1−Πw^k+1,⇒ess,k+1=Axo,k+Buk+Pwk−ΠAexow^k.
By the definition ofess,k and by substituting (26) in (27), one gets(28)ess,k+1=A+BKess,k+AΠw^k+BΓw^k+Pw^k−ΠAexow^k.
From (28), it is obvious that ess,k dissipates when (1) matrices A+BK and A−LC have their eigenvalues inside the unit circle [30] (Assumptions H1 and H2), and (2) AΠ+BΓ+P=ΠAexo, which coincides with (26). As in Theorem 1, by considering the tracking error ek=zk−zref,k in steady-state, the missing equations are obtained from(29)ek=Czess,k+Πw^k−Cexow^k.
In steady-state it coincides with (26). As above, this analysis entirely relies on the fact that the Kalman estimation w^k is sufficiently close to wk. The rest of the proof follows the same path as in Theorem 1.Remark 1.
Theorems1 and 2 correspond to results in continuous time and discrete time, where no uncertainties were considered. However, Theorem 3 states the conditions under which that regulation problem can be solved, even if the exosystem is subject to uncertainties.Remark 2.
The proposed approach entirely relies on the estimation of the Kalman filter. For that reason, the proposed exosystem complies with the requirements established by the Kalman theory, andAexo must be known. Future works may be oriented to estimate the elements of Aexo when such matrix is unknown, but that problem exceeds the scope of the present work.
The control scheme is graphically described in the block diagram of Figure2.Figure 2
Control scheme.


## 4. Numerical Simulations

Please refer to Appendix where a detailed description of the matrices considered to construct the control is given.The numerical simulations are carried out considering a linearization of (17) around the origin, because the ground effect is not considered in the mathematical model. Consequently, the observer (23) is construct from the matrices A=aij∈ℜ12×12, B=bij∈ℜ12×4, C=cij∈ℜ6×12, and L=lij∈ℜ12×6, and L has been computed by considering the set of desired eigenvalues:(30)λ=0.4350.440.4450.450.4550.460.4650.470.4750.480.4850.49.The control (26) is formed from the matrix K=kij∈ℜ12×4. K has been computed by the dlqr algorithm with Q=103I12, and R=10−3I4 with Ij as the identity matrix of dimension j, and the solution for (27) is given by Π=πij∈ℜ12×5 and Γ=γij∈ℜ4×5, Aexo, Cexo, and P are given in Section 2.4.Remark 3.
The design of the controller has been performed on the linear model of the quadrotor, although the results presented correspond to the response of the nonlinear system under the action of the designed controller.
With all of the basis stated in previous sections, the results are given next.Example 1.
Minimum randomness with the proposed method.
At first, the simulations are carried out with very small randomness in order to validate the approach in the quasi-deterministic case. As mentioned beforeMk=I5×5, Nk=I3×3, while the dynamic and measurement noises are characterized by their standard deviations q and r, respectively, such that Q=q2Mk and R=r2Nk. The results are given in Figures 2 to 6.
So, for this example, the standard deviation values areq=1×10−6 and r=1×10−6. The initial conditions for the nonlinear model of the quadrotor (18) are x0=0,1,0,0,2,0,0,0,0,0,0,0T, while the initial state for the observer is xo,0=0,1+ε1,0,0,2+ε2,0,0,0,0,0,0,0T, where ε1 and ε2 are random numbers with zero mean and standard deviation q. On the other hand, the references and perturbations are generated by the exosystem (19) with initial conditions w0=0,1,3,0,0T, while the initial state for the Kalman filter is w^0=w0+η1,η2,η3,η4,η5T, where η1…η5 are random numbers with zero mean and standard deviation r. Under these conditions, the obtained results are depicted from Figures 3 to 7.
In Figure3 are shown the tracking outputs against the corresponding reference. It can be observed how the proposed controller achieves the desired goals. Besides, in the same figure, the available outputs are depicted also. Figure 4 might be more helpful to determine the efficacy of the controller by showing the tracking errors under the mentioned conditions. Please, note that the oscillations presented in such a figure are due to the fact that a controller is applied to a quadrotor. In other words, persistent oscillations can be reduced or even eliminated by means of a nonlinear controller; however, such analysis exceeds the scope of the present work.
The estimation of the references and the perturbations can be viewed in Figure5. From there, it can be concluded that the estimates provided by the Kalman filter are acceptable, at least in this case.
Thus, the 3D behavior of the quadrotor is shown in Figure6 and the rotors’ frequencies appear in Figure 7. It is worth mentioning that the frequencies of the rotors remain positive, all of them. This is an important feature of the quadrotor that must be kept all the time because the rotors of such system rotate in one and only one direction.
Notice also that the frequencies of the rotors are not the same. This is due to the fact that the quadrotor is describing circles during its operation.Figure 3
Tracking and available outputs when minimum randomness is considered.Figure 4
Tracking errors with minimum randomness.Figure 5
Estimation of references and perturbation with minimum randomness.Figure 6
Behavior of the quadrotor when minimum randomness references are tracking.Figure 7
Rotors frequencies for minimum randomness tracking.Example 2.
Stochastic problem with the structure method.
Now, a more interesting case is simulated with bigger values forq and r; i.e., the randomness of the problem is now notably increased. In this case q=0.05 and r=0.5. The rest of the parameters remain as those considered in Example 1. The results are given in Figures 8 to 9.
The simulation considers the same situation presented in the previous example, but the structure method of [20, 21] is used in which the Kalman estimating is omitted and it is assumed that the structure method is sufficient to describe both the references and the perturbation even when they are, in fact, random. The results are given in Figures 8 and 9. Notice now that the references are much more complex due to the random nature of the exosystem provoked by the values of q and r.
In this case, the boundedness of the tracking errors can not be ensured, which totally justifies the use of the proposed method of the next example.Figure 8
Tracking random references considering the structure method.Figure 9
Tracking errors for random references considering the structure method.Example 3.
Stochastic problem with the proposed method.
This numerical experiment considers the same situation presented in Example2; i.e., q=0.05 and r=0.5. However, in this case the Kalman estimation is considered. The rest of the parameters remain as those considered in Example 1. The results are given in Figures 10 to 14.
In Figure10 are depicted the tracking outputs against their respective references. The tracking errors are shown in Figure 11. Observe how, in this case, the errors are smaller than those obtained in Example 2.
The performance of the Kalman filter can be assessed through the results given in Figure12. From there, one can conclude that the estimations of the references and the perturbation are acceptable again despite the randomness introduced in the exosystem, corroborating in this way, that the main issue of the tracking problem, in this case, is the nature of the linear control.
Finally, the 3D behavior of the quadrotor is shown in Figure13 and the rotors' frequencies appear in Figure 14. Observe that the random reference is changing so abruptly that the quadrotor is unable to track it exactly because of its own physical restrictions. However, the quadrotor is kept in a neighborhood around the reference, meaning that the tracking errors are bounded. Again, the frequencies are all positives, which implies that the controller is imposing normal behavior in the rotors. Obviously, the strange behavior of the quadrotor is due to complex response of the rotors.
Comparison of Examples1–3:
Finally, the mean squared error (MSE) between the tracking states of the quadrotor and the corresponding states of the exosystem for Examples1–3 is depicted in Table 1.
Clearly, the inclusion of the Kalman filter for estimating the states of the stochastic exosystem drastically reduces the MSEs. Therefore, its use cannot be neglected when the reference or perturbation is not fully known.Figure 10
Tracking random references and available outputs.Figure 11
Tracking errors for random references and random perturbation.Figure 12
Estimation of random references and random perturbation.Figure 13
Behavior of the quadrotor when random references are tracking.Figure 14
Rotors frequencies for random tracking.Table 1
MSEs for Examples1–3.
xk,1vszref,k,1xk,3vszref,k,2xk,5vszref,k,310.018324140.18379350.247128821835.7050.77430191.995679326.19420.54490.5347Remark 4.
Example3 should be compared with Example 2 because the same big noises with standard deviation values of q=0.05 and r=0.5 are used in Examples 2 and 3; the difference of this comparison is that the Kalman estimating is omitted in Example 2, while the Kalman estimating is used in Example 3. Example 1 should not be compared with Examples 2 and 3 because small noises with standard deviation values of q=1×10−6 and r=1×10−6 are used in Example 1, and the Kalman estimating is omitted in Example 1.


## 5. Conclusion

On the basis of the observer and Kalman filter, an approach to track random references while random perturbations are rejected has been proposed. The control scheme analyzed in this work can be viewed as an extension of the deterministic tracking problem to the area of stochastic processes. It has been shown that the estimation of the references and perturbation makes a great difference because, in general, the controller is constructed on the basis that the same matrices need to solve the deterministic case. The validity of the approach has been illustrated by several numerical simulations considering the mathematical model of a quadrotor. In the future work, for the case where the quadrotor includes random dynamics, then the observer will be substituted for an unscented Kalman filter, an extended Kalman filter, or another estimator as the James-Stein filter.



---

*Source: 3981340-2022-01-20.xml*