Chapter 4

Delay Signals & Predictors*

Abstract

Predictive algorithms have been seen as theoretical contributions without possible real-time validation for several years due to their difficult implementation in real systems. Delays are present when working with aerial drones due to different sampling periods coming from sensor measurements and/or when computing the control schemes. These delays sometimes are big enough, and the system could become unstable. In this chapter, two schemes based on predictors are proposed and validated in real time. The first improves the attitude of a VTOL aircraft while the second compensates delays in the control input. Results are illustrated with some graphs showing good performance of the closed-loop system.

Keywords

Delay systems; Predictive algorithms; Quadcopter; Practical validation

Several control algorithms aiming at stabilization of aerial vehicles can be found in the literature [1,2]. Some of these control/navigation strategies have been applied in real time using efficient but expensive sensing systems [3]. Other research teams use commercial sensors combined with observer/predictor algorithms that improve measurements [4]. Whatever the case, a common problem when applying control strategies in real time is the measurement delay represented as input delays. When these delays are significant, the performance of the closed-loop system suffers and a crash may occur.

In the past, the control of linear processes with time delay in either the input or output has been addressed with strategies such as the Smith Predictor (SP) [5] and the Finite Spectrum Assignment (FSA) [6]. The Smith Predictor [5] can be considered as the first predictor-based control for SISO (Single-Input Single-Output) open-loop stable linear systems [7]. Later the same concept was extended for MIMO (Multiple-Input Multiple-Output) open-loop unstable systems by introducing an h units of time ahead state predictor [6,8]. The original proposals to deal with time-delay systems suffer from robustness problems and implementation issues (a good survey can be found in [9]). In [10] a discrete predictor for continuous-time plants with time delay is proposed, and the closed-loop stability is proved. More recently, in [11], the robustness of the proposed predictor was proved with respect to a delay mismatch or model uncertainties [12], and also to perform well in combination with a state observer [13]; the issue of time-varying delays was also addressed in [14]. Provided that nowadays almost any control system application is implemented using a computer, discrete-time control schemes are more interesting in practical applications [15].

This chapter presents an observer–predictor algorithm (OP-A) which is used to counteract the inherent delays in the attitude estimates. The origin of such delays is discussed and illustrated by comparing the measurements of a commercial IMU (Inertial Measurement Unit) with those coming from optical encoders. The OP-A is used to improve the estimation of the pitch and roll angles, and it is based on a Kalman Filter (KF) and a discrete-time predictor to fuse the measurements coming from gyroscopes and accelerometers. The topic of time delay systems is reviewed before introducing a discrete-time predictor and a state predictor which is based on the Fundamental Calculus Theorem and the Backstepping approach. The advantages of using predicted measurements is demonstrated in simulations and in real-time experiments.

4.1 Observer–Predictor Algorithm for Compensation of Measurement Delays

As aforementioned, the IMUs are the core of lightweight aerial robotic applications as they provide attitude estimates and angular velocity measurements. In practice it is observed that the attitude estimated by an IMU exhibits a delay with respect to its real value. This fact is more significant when using low-cost sensors. Since low-cost devices have typically worse noise performance, their signals must be filtered at lower frequencies, thus introducing larger delays. In any case, even high-performance IMUs provide delayed measurements. In order to illustrate this fact, the experimental platform described in Sect. 3.3.6.1 of Chap. 3 is used to compare the angular measurements against a commercial IMU (Mircrostrain 3DM-GX2) with those of coming from a set of encoders which are faster and more accurate than any IMU. A zoom of the comparison is represented in Fig. 4.1 where a delay of approximately 40 ms is appreciated.

Image
Figure 4.1 Measurement delay in the ϕ angle estimated by a 3DM-GX2 IMU with respect to an optical encoder.

One of the unavoidable sources of delay is the low-pass filtering before sampling. During the data acquisition process in an IMU, the signals are low-pass filtered to remove noise and avoid aliasing effects. Another issue is the computational time required to run the estimation algorithm which is often carried out in an onboard microcontroller. The incorporation of delayed measurements into the Kalman filter while preserving optimality is far from being trivial. When the delay consists of only a few sample periods, the problem can be handled optimally by augmenting the state vector [16]. However, for larger delays the computational burden of this approach becomes too large. This topic has been investigated in [17]. More recent work on this topic has been done in [18] where a general delayed KF framework is derived for linear time-invariant systems.

4.1.1 The Finite Spectrum Assignment Problem

Let us consider the following time-delay systems:

x˙(t)=Ax(t)+Bu(tτ),y(t)=x(t),x˙(t)=Ax(t)+Bu(t),y(t)=x(tτ),

Image (4.1)

where the time delay τ affects either the input or the output. Notice that, under the feedback control law u(t)=Ky(t)Image, both systems are equivalent in terms of stability. To be more specific, such a control law acting on the systems in (4.1) leads to

x˙(t)=Ax(t)+BKx(tτ)

Image (4.2)

which has an infinite-dimensional characteristic equation |sIABKeτs|=0Image. This equation (quasipolynomial) is transcendental, which makes it very difficult to solve. Moreover, if the system has uncertainties, the solution becomes even more complicated. Therefore, it would be convenient to get rid of the delay in the characteristic equation, so that conventional analysis and design techniques could be applied.

It is well known that for the systems in (4.1), the feedback control law

u(t)=eAτx(t)+0τeAθBu(tτ)dθ

Image (4.3)

yields the closed-loop characteristic equation |sI(A+BK)|=0Image; see [6]. The finite spectrum assignment (FSA) feature of this control law is a significant advantage from a design point of view. However, the practical implementation of the distributed control law (4.3) has raised several problems. A reasonable approach consists in using a numerical quadrature rule to approximate the integral term. It has been shown in [19] that the control law (4.3) with a large discretization step size may not stabilize the systems in (4.1). A safe implementation of the controller (4.3) was introduced in [20], based on including a low-pass filter in the control loop. In the next section, the discrete-time predictor presented in [10] is developed and proved to be suitable for open-loop unstable time-delay systems, robust with respect to a delay mismatch [11], or model uncertainties [12].

4.1.2 An h-Step Ahead Predictor

As discussed in the introduction of the chapter, in a quadrotor vehicle, the estimated variables are unavoidably affected by small time delays which can be counteracted by using a predictive feedback. As it can be seen in (4.3), for the implementation of the predictive control law, a model of the system is needed. The rotational dynamics of the quadrotor using the Newton–Euler approach are given by (2.8). It has been showed in several works (and corroborated in flight tests) that, under some circumstances, the rotational dynamics of the quadrotor can be reduced to a double integrator on each axis

η¨=τ˜,

Image (4.4)

where η=[ϕ,θ,ψ]TImage is the orientation of the vehicle, τ˜=J1τ=[τ˜ϕ,τ˜θ,τ˜ψ]TImage is a control transformation, τ is the vector of external torques, and JImage is the inertia matrix. In the simplified model (4.4), the axes are decoupled, and each of them can be represented in a discrete-time state-space form

xk+1=[1Ts01]Akxk+[Ts22Ts]Bkuk,

Image (4.5)

where xk=[sk,s˙k]TImage, s={ϕ,θ,ψ}Image, and TsImage is the sampling period. The discretized matrices have been obtained using

Ak=eATs=I+TsA,Bk=(0TseAsds)B.

Image (4.6)

Notice that for the assumed simplified model (4.4), the matrix A=[0100]Image is nilpotent with Aj=0Image for any j2Image, and thus there is no discretization error because the truncated expansion of the exponential matrix is exact.

Let us as assume now that the state of the plant is fully accessible, but there is a known constant transmission delay τ which is approximated1 to be a multiple of the sampling period TsImage, that is, τ=TsdImage with dZ+Image. The measured delayed state is denoted by

x¯kxkd.

Image (4.7)

The source of the measurement x¯kImage can be the output of some of the estimation algorithms presented in Chap. 3. If a conventional state feedback uk=Kx¯kImage is used to stabilize (4.5), the resulting closed-loop system will be xk+1=Akxk+BkKxkdImage. Such a system may have poor performance or even become unstable if d is sufficiently large. This is especially critical for open-loop unstable systems, as is the case for quadrotor vehicles.

In order to counteract the effect of the measurement delay, an h-step ahead predicted state is obtained by using (4.5) recursively to propagate the state of the system. Notice that

x(kd)+1=Akxkd+Bkukd,x(kd)+2=Akx(kd)+1+Bku(kd)+1,=Ak2xkd+AkBkukd+Bku(kd)+1,x(kd)+h=Akhxkd+i=0h1Akh1iBkukd+i.

Image

Taking into account the definition of the delayed measurement in (4.7), the predicted state is defined by

x˜k+hAkhx¯k+i=0h1Akh1iBkukd+i,

Image (4.8)

with the prediction horizon hZ+Image being a design parameter. Notice that choosing h=dImage (assuming perfect model matching), the prediction (4.8) will be exact and x˜k+hx(kd)+d=xkImage. Therefore, with the predictive feedback uk=Kx˜k+hImage, a delay-free closed-loop system xk+1=(Ak+BkK)xkImage is recovered.

Digital implementation of (4.8) is straightforward. Using the ZImage-transform, the predicted state can be written as

x˜(z)=F1(z)x(z)+F2(z)u(z),

Image (4.9)

with

F1(z)=AkhandF1(z)=i=0h1Hiz(di).

Image (4.10)

A buffer of size h1Image is needed to store the history of control inputs. The coefficients Hi=Akh1iBkImage and matrix AkhImage can be pre-computed to save some computational time in slow microcontrollers.

Regarding the instability issues related to the implementation of feedback controllers for open-loop unstable systems, notice that F1(z)Image is a static gain and F2(z)Image is a finite impulse response filter, which means it is BIBO stable. Then, with this approach, the instability of the predicted state for open-loop unstable plants is avoided, and if the roots of |zI(Ak+BkK)|=0Image are inside the unit circle, the closed-loop system is guaranteed to be internally stable.

The algorithm consists in applying the predictor to the Kalman filter output, that is, taking x¯kxˆkImage. In the simulations and experiments that follow, the measurement xˆkImage is computed using the simplified Kalman filter presented in (3.13)(3.14) or (3.22)(3.23). The resulting algorithm can be considered as a self-contained predictor-based observer which is depicted in Fig. 4.2.

Image
Figure 4.2 Observer–predictor scheme diagram.

4.1.3 Simulations

For the sake of clarity, only the roll axis of the quadrotor is considered in what follows. Therefore, the state of the plant is given by xk=[ϕk,ϕ˙k]TImage while the dynamic model is given by (4.5). Simulations were carried out using the Simulink model depicted in Fig. 4.3. The nonlinear quadrotor model in (3.16) is used to represent the plant, and an artificial delay of 40 ms was added to the Kalman filter output. References in the roll angle are tracked by using a simple state-feedback controller

uk=K([ϕkref,0]Txk)=kp(ϕkrefϕk)kdϕ˙k

Image (4.11)

while the pitch and yaw are driven to zero using the same approach. The predictor is applied to the delayed measurements given by the Kalman filter. The parameter h is chosen to be equal to the number of delayed sample periods d. In simulations, d is known, whereas in the experiments it has to be measured.

Image
Figure 4.3 Simulink model of the open-loop Observer–Predictor algorithm.

In the first simulation, the control loop is closed using the ideal (non-delayed) measurements. The Kalman filter and the predictor are run in parallel and do not affect the behavior of the system. The results are shown in Fig. 4.4. One can see how the Kalman estimates are delayed and the predicted state matches the ideal one.

Image
Figure 4.4 Delay-free closed-loop evolution (dashed line) and estimation algorithms running in parallel: Kalman output (dashed-dotted line) and predicted state (solid line).

As mentioned above, a delayed measurement decreases the performance of a given controller. Fig. 4.5 shows the output of the closed-loop system and the control action when different state measurements are fed to the controller. Notice how oscillations arise when the system is controlled with the delayed measurements from the Kalman filter. However, the use of the predictor improves the performance substantially, and the response gets very close to that of the system when controlled using a non-delayed measurement.

Image
Figure 4.5 Comparison of closed-loop responses when the system is controlled with: ideal (dashed line), Kalman (dashed-dotted line), and predicted (solid line) measurements.

4.1.4 Experiments

The purpose of the experiments is twofold. On the one hand, open-loop experiments are accomplished to show how the predictor works over experimental data. The output of the predictor should look like the actual state measurement but shifted backwards in time. On the other hand, closed-loop experiments illustrate the improvement in stability when the predictor is used.

4.1.4.1 Quanser Platform

Some experiments were carried out using the Quanser platform described in Sect. 3.3.6.1 of Chap. 3. The measurements coming from the optical encoders are considered to be ideal (non-delayed), and they are only used to evaluate the delay of the other state estimates, not for control purposes. The non-delayed angular rate was computed offline from the encoder measurements by using central difference approximation and filtering.

In the first experiment, the system was controlled via state feedback, according to (4.11), using the measurements coming from the 3DM-GX2. The proposed algorithm was computed offline, discretized with Ts=4 msImage, and choosing h=5Image, that is, a predictive horizon of 20 ms. The resulting state estimates are shown in Fig. 4.6. A detail of the rising phase of the response can be seen in this figure (below). One can see how the delay of the predicted state is almost negligible, while the delay of the 3DM-GX2 is about 40 ms.

Image
Figure 4.6 Open-loop experiments comparing estimates of the ϕ angle: 3DM-GX2 (dashed-dotted line), proposed OP algorithm (solid line), and optical encoders (dashed line). Bottom figure represents a zoom of top figure.

The influence of delayed measurements in the closed-loop stability was also analyzed. For this purpose the predictive scheme was implemented in real time. The gain of the controller was increased until the system controlled with 3DM-GX2 became unstable. Fig. 4.7 shows two overlapped experiments: one using 3DM-GX2 and the other using the predicted state. In both of them a step reference of 8 degrees was applied. Notice that, for a given controller, the system became unstable when the measurement of 3DM-GX2 was used, while it remained stable with the predicted measurement. This experiment shows that the observer–predictor algorithm increases the stability of the system in the presence of measurement delays.

Image
Figure 4.7 Closed-loop step responses in the ϕ angle when the system is controlled with the measurement given by 3DM-GX2 (dashed-dotted line) or with the one given by the proposed algorithm (solid line).

4.1.5 Flight Tests

Recently the feasibility of this proposal has also been validated in flight tests with a commercial device, the Parrot AR Drone 2.0, at the Heudiasyc laboratory. For these experiments, the delay in the measurements coming for the IMU was too small to clearly show the effect of the predicted algorithm, because of that artificial delays were introduced.

The prototype AR Drone has Linux 2.6.32 onboard, the embedded processor is an ARM Cortex A8 at 1 GHz, it also has a DDR2 RAM of 1 GB at 200 MHz, the sampling frequency is 200 Hz. The sensors for the navigation are a three axis gyroscope with 2000/s, an accelerometer which accuracy is ±50 mgImage. The hardware of the Parrot vehicle has been used; nevertheless, several changes have been made to the software in order to access all states and variables that usually cannot be modified in the original software and firmware of Parrot.

During the hovering experiments the measurements from an IMU where artificially delayed by 50 ms (or 10 sampling periods). The predictor was initially disabled, and then activated by sequentially increasing the prediction horizon from 0 to 50 ms (or, from 0 to 10 sampling periods). The history of both variables is depicted in Fig. 4.8. The results of the experiment (variables ϕ and ϕ˙Image) are shown in Fig. 4.9. Notice how the system starts oscillating when the delay is introduced, while the performance is recovered when the predictor kicks in (the oscillations have already disappeared with a prediction horizon of 25 ms).

Image
Figure 4.8 Artificial delay and prediction horizon evolution during the flight test.
Image
Figure 4.9 Recorded flight data of the ϕ and ϕ˙Image variables showing the influence of measurement delays in stability and ability of the predictor to counteract them.

4.2 State Predictor–Control Scheme

When working with UAVs or robotic systems with fast dynamics, it is crucial to have good closed-loop performance in order to measure the states very quickly. In general, autonomous vehicles (ground, aerial, or underwater) use slow sensors to auto-locate, this is crucial when they are performing quick tasks or when moving in unstructured environments (with obstacles). Improving the performance of the closed-loop system has been a challenge for researchers. Several works can be found in the literature; nevertheless, only a few results have been applied in real time. In this section, we introduce a state predictor–control scheme applied to a quadcopter in order to improve its behavior when the control inputs are delayed. Our result is based on the Fundamental Calculus Theorem and the demonstration made by Krstic [21]. Nevertheless, the proof is modified to better illustrate our predictive-control scheme.

Theorem 4.1

Fundamental Theorem of Calculus

Let f be a continuous function in the closed interval [a,b]Image, and let g be a function which satisfies

g(x)=f(x)x[a,b].

Image (4.12)

Then

abf(t)dt=g(b)g(a).

Image (4.13)

Note that if x=aImage, the derivative in (4.12) is the right-hand side derivative, and if x=bImage, the derivative in (4.12) is the left-hand side derivative.

The main result can be stated in the following theorem.

Theorem 4.2

Consider a delayed chain of integrators represented as

x˙(t)=Ax(t)+Bu(tτ),

Image (4.14)

where u(tτ)Image is the control input delayed by τ units of time. Then the controller

u(t)=Kxˆ(t)

Image (4.15)

stabilizes system (4.14). Here K is a vector gain that stabilizes the delay-free system, and xˆ(t)Image is the predicted state defined as

xˆ(t)=eτAx(tτ)+φ(u(t)),

Image (4.16)

where

eτA=(1ττ22τn1(n1)!01ττn2(n2)!001τn3(n3)!000τ0001);φ(u(t))=(tτttτt1tτtn1u(tn)dtndtn1dt1tτttτt1tτtn2u(tn1)dtn1dtn2dt1tτttτt1u(t2)dt2dt1tτtu(t1)dt1).

Image

Proof

Consider the following system

x˙(t)=Ax(t)+Bu(tτ),

Image (4.17)

where x(t)RnImage, ARn×nImage, BRn×pImage, and u(tτ)RpImage. Using the results in [21], the delay in the control input can be modeled by a first-order hyperbolic partial differential equation, also referred to as transport PDE. Thus,

ut(s,t)=us(s,t),u(τ,t)=U(t).

Image (4.18)

The solution to this equation is

u(s,t)=u(t+sτ),

Image (4.19)

and therefore the output u(0,t)=u(tτ)Image gives the delayed input. Hence system (4.17) can be written as

x˙(t)=Ax(t)+Bu(0,t).

Image (4.20)

The backstepping transformation

w(s,t)=u(s,t)φ(u(s,t))Γ(x(t))

Image (4.21)

maps the system (4.18)(4.20) into the target system

x˙(t)=(A+BK)x(t)+Bw(0,t),wt(s,t)=ws(s,t),w(τ,t)=0.

Image (4.22)

This transformation which is defined as (x,u)(x,w)Image has the lower-triangular form

(xw)=(In×n0n×(0,τ)Γφ+I(0,τ)×(0,τ))(xu).

Image (4.23)

Here Γ denotes the operator Γ:x(t)Θ(s)x(t)Image, where Θ(s)Image is defined as

Θ(s)=(1ss2sn101ssn2001sn3000s0001)

Image

and φ denotes the operator

φ:u(s,t)(Λ0s0s10sn1u(sn,t)dsndsn1ds1Λ0s0s10sn2u(sn1,t)dsn1dsn2ds1Λ0s0s1u(s2,t)ds2ds1Λ0su(s1,t)ds1),

Image

where Λ is a scalar that will be defined later.

Computing the time and spatial derivatives of the backstepping transformation (4.21) yields

ws(s,t)=us(s,t)Θ(s)x(t)Λ0su(sn,t)dsn,wt(s,t)=us(s,t)Θ(s)Ax(t)Θ(s)Bu(0,t)Λ0su(sn,t)dsn+u(0,t)ζ(s),

Image

where

ζ(s):=(sn1(n1)!sn2(n2)!s1).

Image (4.24)

Subtracting wt(s,t)ws(s,t)=0Image gives

0=Θ(s)ζ(s)u(0,t)Θ(s)Ax(t)Θ(s)Bu(0,t)+Θ(s)x(t),0=(Λζ(s)Θ(s)B)u(0,t)+(Θ(s)Θ(s)A)x(t),0=Λζ(s)Θ(s)B,

Image (4.25)

0=Θ(s)Θ(s)A.

Image (4.26)

Expression (4.25) is an ordinary differential equation. To find its initial condition, we set s=0Image in (4.21). Hence

w(0,t)=u(0,t)Θ(0)x(t).

Image (4.27)

Introducing (4.27) into (4.22) gives

x˙(t)=Ax(t)+Bu(0,t)+B(KΘ(0))x(t).

Image

Comparing this equation with (4.20) implies Θ(0)=KImage. Therefore, the solution of (4.25) is of the form

Θ(s)=KeAs.

Image (4.28)

From (4.26), Λ=Θ(s)Bζ1(s)=KeAsBζ1(s)Image, where ζ1(s)Image denotes the inverse operator. Therefore, we have that

eAsB=ζ(s)

Image

and then Λ=KImage. Substituting the gains Λ and Θ(s)Image into the transformation (4.21) and setting s=τImage, the controller is then given by

u(τ,t)=KeτA+Kφ(u(τ,t)).

Image (4.29)

We now prove that the closed-loop system composed of the plant (6.5) and (4.20) with the controller (4.29) is exponentially stable at the origin in the sense of the norm

(x(t)2+0τu(s,t)2ds)1/2.

Image

We first demonstrate that the origin of the target system (4.22) is exponentially stable. Consider the following Lyapunov–Krasovskii functional

V(t)=x(t)TPx(t)+a20τ(1+s)w(s,t)2ds,

Image (4.30)

where P=PT>0Image is the solution of the Lyapunov equation for some Q=QT>0Image and a>0Image. The time derivative of (4.30) is

V˙(t)x(t)TQx(t)+2ax(t)TPB2a20τw(s,t)2ds.

Image

Let us choose

a=4λmax(PBBTP)λmin(Q),

Image

where λmaxImage and λminImage are the maximum and minimum eigenvalues of the corresponding matrices. It follows that

V˙(x)λmin(Q)2x(t)2a2(1+τ)0τ(1+s)w(s,t)2ds,

Image

hence

V˙(t)μV(t),

Image (4.31)

where

μ:=min{λmin(Q)2λmax(P),11+τ}.

Image (4.32)

Using the backstepping transformation and its inverse form, we get

w(s,t)=u(s,t)Λ0su(v,t)dvΘ(s)x(t),

Image (4.33)

u(s,t)=w(s,t)+Ω0sw(v,t)dv+Φ(s)x(t).

Image (4.34)

Expression (4.30) implies that

ω1(||x(t)||2+0τw(s,t)2ds)V(t),ω2(||x(t)||2+0τw(s,t)2ds)V(t),

Image

where

ω1=min{λmin(P),a2},ω2=max{λmax(P),a(1+τ)2}.

Image

Furthermore (4.33) and (4.34) give

0τw(s,t)2dsα10τu(s,t)2ds+α2||x(t)||2,

Image (4.35)

0τu(s,t)2dsβ10τw(s,t)2ds+β2||x(t)||2,

Image (4.36)

where

α1:=3(1+τ||Λ||),β1:=3(1+τ||Ω||),α2:=3||KΘ||2,β2:=3||KΦ||2.

Image

Hence we obtain

ρ1(||x(t)||2+0τu(s,t)2ds)||x(t)||2+0τw(s,t)2ds,

Image (4.37)

ρ2(||x(t)||2+0τu(s,t)2ds)||x(t)||2+0τw(s,t)2ds,

Image (4.38)

where

ρ1:=1max{β1,β2+1},ρ2:=max{α1,α2+1}.

Image

Notice that the inequalities for ρiImage, ωiImage for i=1,2Image can be combined. Then it follows that

ρ1ω1(||x(t)||2+0τu(x,t)2dx)V(t),ρ2ω2(||x(t)||2+0τu(x,t)2dx)V(t).

Image

Finally, combining the above with (4.31) gives

||x(t)||2+0τu(x,t)2dxξ(t)(||x(0)||2+0τw(x,0)2dx),

Image

where ξ(t)=ρ2ω2ρ1ω1eμtImage, which completes the proof of exponential stability.

4.2.1 Aerial Vehicle Validation

The predictor algorithm in Theorem 4.2 is obtained for linear systems and delayed linear controllers; however, we will show in the following that it could be applied with delayed nonlinear algorithms forcing its nonlinear dynamics to have a linear behavior, and then guarantee the closed-loop stability. To better illustrate, we apply our approach to a quadcopter vehicle.

4.2.1.1 Mathematical Representation of a Quadrotor with Delayed Inputs

Aerial vehicles generally move in translational flight (or classical maneuvers) with angles between ±10 grad, which in the aerial control community and for stability analysis is considered as small angles and substantially simplifies the nonlinear equations (2.4)(2.5) because the Coriolis effects can be neglected given the following equations2:

ξ¨=f1(θ,ϕ,uz),

Image (4.39)

η¨=f2(uψ,uθ,uϕ),

Image (4.40)

with ξT=(xyz)Image and ηT=(ψθϕ)Image respectively defining the position and orientation of the vehicle. It is well known that variable τ denotes the delay in the control community. Thus, to avoid confusion in this chapter, the torques τψ,τϕ,τθImage will be represented as uψ,uϕ,uθImage, respectively.

Consider now that the control inputs uiImage are delayed, then functions f1()Image, f2()Image can be defined as

f1(θ,ϕ,uz):=(uz(t,d1)sin(θ)uz(t,d1)cos(θ)sin(ϕ)uz(t,d1,)cos(θ)cos(ϕ)mg),f2(uψ,uθ,uϕ):=(uψ(t,d1)uθ(t,d1,d2)uϕ(t,d1,d2)).

Image

Remember that θ, ϕ, and ψ represent the pitch, roll, and yaw angles, respectively. In the previous system, it is considered that the control inputs are delayed diImage sampling periods.

4.2.1.2 Altitude and Yaw Control

From (4.40), notice that the yaw angle is a linear system and could be considered decoupled from the others, i.e., ψ¨uψ(tτ)Image. Therefore, applying Theorem 4.2, it follows that

uψ(t):=Kψψˆ=kdψψˆ˙+kpψ(ψˆψd).

Image

For the altitude dynamics, z¨=cosθcosϕuz(tτ)gImage, the following controller is given by

uz(tτ):=uγ(tτ)+gcosθˆcosϕˆ,

Image (4.41)

and the closed-loop system is

z¨:=ϵeθˆ,ϕˆuγ(tτ),

Image (4.42)

where uγ(tτ)Image is the virtual delayed input and ϵeθˆ,ϕˆImage represents the error in the prediction. Hence, if the pair (θˆ,ϕˆ)(θ,ϕ)Image, then ϵeθˆ,ϕˆ=1Image. However, applying the predictor–control scheme to (4.42), it follows that

uγ(t)=Kzzˆ=kdzzˆ˙+kpz(zˆzd).

Image

The predicted states for ψ and z have the form

βˆ˙(t)=β˙(tdi)+tdituβ(l)dl,βˆ(t)=β(tdi)+diβ˙(tdi)+tdittdisuβ(l)dlds,

Image

where β is z or ψ.3 The equations for θˆImage and ϕˆImage will be defined later. Introducing (4.41) into (4.39), we have

x¨gϵeθˆ,ϕˆtanθcosϕˆ,y¨gϵeθˆ,ϕˆtanϕ.

Image

4.2.1.3 Modified Nested Saturation Algorithm for Translational Movements

The previous equations with the roll and pitch dynamics mathematically represent the lateral and longitudinal movements of the quadrotor. These dynamics are the strongest and define the stability of the flying aerial vehicle. Following the ideas proposed in [22], we will prove that nonlinear controllers based on nested saturations can be used with the predictor algorithm to stabilize the quadrotor even in the presence of delayed inputs.

It has been also proved in several works that controllers based on saturation functions impose a linear behavior in nonlinear systems when bounding mainly the angular position. Thus in our analysis we will take this fact into account, and it will signify that the quadcopter will move with small angles, i.e., cosϕ1Image and sinϕϕImage. This implies that the lateral and longitudinal dynamics can be represented by four integrators in cascade. In the following, the procedure to fully obtain the controller for the longitudinal dynamics is described step by step, a similar procedure is used to acquire the controller for the lateral dynamics.

Let us define the linear longitudinal dynamics of the quadrotor as

x¨(t)gϵθ1(t),θ¨(t)=uθ(t,d1,d2),

Image

where gϵ=gϵeθˆ,ϕˆImage and uθ(t,d1,d2)=uθ(x(t,d1),x˙(t,d1),θ(t,d2),θ˙(t,d2))Image is the delayed input.

Define the observation error as eθiˆ=θˆiθiImage. Observe from Theorem 4.1 that if eθiˆ0Image, then θˆiθiImage. Thus we can consider that after a time TθˆiImage, eθˆi1Image, so that |eθˆi|δθˆiImage with δθˆi>0Image.

We propose the following control using the predicted states:

uθ(t,d1,d2):=σ1(θˆ2+ε1),

Image (4.43)

where σi(s)Image is a saturation function such that |σi(s)|MiImage and εiImage is a bounded function, |εi|MεiImage, that will be defined later to prove convergence. We propose the following positive definite function V1(t)=12θ22(t)Image, then V˙1(t)=θ2σ1(θˆ2+ε1)Image.

If eθˆ20Image then sign(θˆ2)=sign(θ2)Image, and if |θˆ2(t)|>Mε1Image, this implies that V˙1(t)0Image. Then after a time T1Image, |θˆ2|Mε1Image. If we choose M12Mε1Image, then t>T1Image

uθ(t,d1,d2):=θˆ2ε1.

Image (4.44)

Define z1(t)θ1(t)+θ2(t)Image, then

z˙1(t)=θ2θˆ2ε1δθˆ2ε1.

Image

Define ε1:=σ2(z1(t)+ε2)Image, then Mε1=M2Image. We propose V2(t)=12z12(t)Image, then

V˙2(t)z1(σ2(z1(t)+ε2)δθˆ2).

Image

Notice that δθˆ2Image is arbitrarily small and M2δθˆ2Image, thus, if |z1|>Mε2Image, this implies that V˙2(t)0Image and then after a time T2Image, |z1|Mε2Image. If we choose M22Mε2Image, then t>T2Image

uθ(t,d1,d2):=2θˆ2θˆ1+eθˆ2+eθˆ1ε2.

Image (4.45)

Define z2(t)=z1(t)+θ1(t)x2(t)gεImage, then

z˙2(t)=eθˆ2ε2δθˆ2ε2.

Image

Take ε2:=σ3(z2(t)+ε3)Image, then Mε2=M3Image. Propose V3(t)=12z22(t)Image, then

V˙3(t)z2(σ3(z2(t)ε3)δθˆ2).

Image

Observe again that δθˆ2Image is arbitrarily small and M3δθˆ2Image, thus, if |z2|>Mε2Image, this implies that V˙2(t)0Image and then after a time T3Image, |z2|Mε3Image. If we choose M32Mε3Image, then t>T3Image

uθ(t,h1,h2)=3θˆ23θˆ1+2eθˆ2+3eθˆ1+xˆ2gεexˆ2gεε3.

Image

Finally, define z3(t)z2(t)2x2(t)gε+θ1x1(t)gεImage, then

z˙3(t)=eθˆ2ε3δθˆ2ε3.

Image

Take ε3:=σ4(z3(t))Image, then Mε3=M4Image. Propose V4=12z32Image, then V˙4=z3(σ4(z3(t))+δθˆ2)Image. Notice that M4δθˆ2Image and this implies that z3Image is bounded and decreases, so after a time T4Image the controller can be rewritten as

uθ(t,d1,d2)=4θˆ26θˆ1+4xˆ2gε+xˆ1gε+3eθˆ2+6eθˆ14exˆ2gεexˆ1gε.

Image

From Theorem 4.2, uθ(t,d1,d2)Image could be expressed as uθ(t,xˆ)Image, and, in addition, remembering that xiˆxiImage, this implies that δ(θˆi,xˆi)0Image. Hence the previous controller becomes

uθ(t,xˆ)=4θˆ26θˆ1+4xˆ2gε+xˆ1gε=Kxˆ(t),

Image

where K=[1/g4/g64]Image and xˆT=[xˆ1xˆ2θˆ1θˆ2]Image. The convergence of the states is proved by applying Theorem 4.2.

The predicted states are defined as

βˆ˙1(t)=β˙1(td2)+td2tuβ1(l)dl,βˆ1(t)=β1(td2)+d2β˙1(td2)+td2ttd2suβ1(l)dlds,βˆ˙2(t)=β˙2(td1)+td1tβˆ1(s)ds,βˆ2(t)=β2(td1)+d1β˙2(td1)+td1ttd1sβˆ1(l)dlds,

Image

where β1Image stands for θ and ϕ while β2Image denotes x or y.

4.2.2 Simulation Results

Several simulations are done to validate the proposed predictive-control scheme in the quadrotor model (4.39)(4.40). Two delays are introduced to test the performance, d1Image for the translational motion (x, y, z) and d2Image for the attitude (ψ, θ, ϕ). The sampling period, TsImage, used in simulation is Ts=0.001Image, the desired values are xd=10Image, yd=5Image, and zd=1Image, and the initial conditions for all states are set to zero except for z1(0)=10Image. First, simulations are made to illustrate good performance of the closed-loop system (4.39)(4.40) with the control inputs without considering the delays (d1=d2=0Image), see Fig. 4.10. For clarity, only the positions (x, y, z) are depicted in this figure.

Image
Figure 4.10 State responses without delay in the input, d1 = d2 = 0.

Simulations were conducted adding and increasing the delays, (d1,d2Image), until instability is presented. The Critical Delay Values (CDV) that induce system instability are d1=90TsImage and d2=240TsImage. The critical values are increased until divergence in the states is observed. Two graphs are presented here to illustrate the performance. On the one hand, Fig. 4.11 depicts the behavior for the position with d1=100TsImage, here the x position diverges at time t=5 sImage. On the other hand, in Fig. 4.12 d2Image is increased to 250TsImage, and the system diverges in just 4 seconds.

Image
Figure 4.11 Position response with delay d1 = 0.1 s.
Image
Figure 4.12 x, y, z responses with delay d2 = 0.25 s.

The predictor control scheme is applied with d1=100TsImage and d2=250TsImage, and the closed-loop system is restored. Nevertheless, we continue to increase these delays to observe the robustness of the predictor. The critical values were again increasing until d1=900TsImage and d2=300TsImage; the behavior when applying these delays and the PC-S is shown in Fig. 4.13. Observe here that all the states converge to the desired values even though the delays are bigger than the CDV.

Image
Figure 4.13 System response when applying the predictor–control scheme and with delay values d1 = 900Ts, d2 = 300Ts.

4.2.3 Experimental Results

Several experiments are carried out to accomplish the practical goal, i.e., validate the proposed scheme with real-data or in real-time experiments. Here only three cases using different sensors will be presented. First, the predictive algorithm is tested offline and in open-loop with data collected from manual tests. A virtual delay is induced to the data collection, and then the predictive algorithm is applied to the delayed data. Next the resulting array is compared with the original data to verify the performance of the predictive scheme.

In the second case, a flight test is realized to follow a square trajectory without any delay in the input. With the collected data virtual delays are induced in all the states to validate the predictive algorithm and verify its behavior with the dynamics of the quadrotor. Finally, for an UAV in a real flight mission, the yaw dynamics (ψ, ψ˙Image) was virtually delayed until signs of instability appeared, then the predictor control scheme is used in closed-loop to compensate the delay.

Open-Loop with GPS Measurements

A rectangular trajectory was made in the manual mode with a LEA-6s GPS sensor, produced by ublox. Collected data were used to test the predictive algorithm offline. The sampling period of the GPS is Ts=200 msImage. The position data is virtually delayed by 9Ts=1.8 sImage while the velocity data is delayed by just 3Ts=0.6 sImage. Figs. 4.144.15 show the obtained results and illustrate the delayed measure (red dotted line), the actual state (blue solid line), and the predicted state (black dashed line). Data are depicted in the coordinate system ECEF, and for the length of the chapter only results in the x-axis are presented. In Fig. 4.14 the x-displacement is presented, and to better illustrate the result a zoom of this figure is also shown.

Image
Figure 4.14 State response in the x-axis (and a zoom of it) in the ECEF coordinate system. (For interpretation of the colors in this figure legend, the reader is referred to the web version of this chapter.)
Image
Figure 4.15 Velocity response in the x-direction (and a zoom of it) of the ECEF coordinate system. (For interpretation of the colors in this figure legend, the reader is referred to the web version of this chapter.)

In Fig. 4.15 the velocity response and a zoom of this figure in the x-axis is presented. Recall that for aerial vehicles the velocity responses need to be very fast in order to stabilize the vehicle. Delaying this state by 1.8 s is not realistic for the sensor characteristics; therefore, it was delayed by only three sampling periods to improve the prediction. Recall also that the sampling period is 200 ms, so the delay for the velocity is 600 ms.

Open-Loop with OptiTrack Measures

Another flight was made to follow a rectangle trajectory in automatic mode without delay. The collected data was delayed in order to apply our predictor control scheme. The height z was imposed to be constant. In the following figures, and due to chapter length limitations, only the position in the horizontal plane is presented (longitudinal and lateral dynamics).

First, the delays d1Image and d2Image were set to 15TsImage. The predictor responses show that the real and predicted values of the states are similar and their difference is almost zero, see Fig. 4.16. Next delays d1Image and d2Image were increased to 40TsImage. The horizontal position responses are illustrated in Fig. 4.17. Notice that even when the delay is big, the predictor scheme is able to correctly predict the values of the states. From the obtained result, we carried on real-time experiments to implement the predictor algorithm in the closed-loop system of an octarotor vehicle.

Image
Figure 4.16 xy plane trajectory vs xˆyˆImage plane trajectory with delays d1 = d2 = 15Ts.
Image
Figure 4.17 xy plane trajectory vs xˆyˆImage plane trajectory with delays d1 = d2 = 40Ts.

4.2.3.1 CoQua Vehicle

Multirotor vehicles are the most popular aerial vehicles that can hover. In this part, we propose to validate the predictor–control scheme in a closed-loop system for the yaw dynamics. This test was made with our CoQua (Coaxial-quadrotor) vehicle, or octarotor, shown in Fig. 4.18. The aerial vehicle is controlled with an IGEPImage that controls eight drivers mikrokopterblctrlv2Image, and consequently, the eight motors roxxybl282735Image which gives the thrust and torques of the vehicle. To measure the attitude (ψ, θ, ϕ), an inertial measurement unit model 3dmgx325Image of the Microstrain brand is used. The weight of this UAV is 1.6 kg.

Image
Figure 4.18 CoQua vehicle.

In this experiment virtual delays are introduced in the yaw dynamics in order to destabilize the yaw dynamics. First, the critical delay value (CDV, delay value capable to destabilize the system) was found using a control scheme without the predictive algorithm. This value was 15 sampling periods, see Fig. 4.19. Notice the unstable ψ response in this figure when applying the delayed controller without predictor, similarly for the ψ˙Image state illustrated in Fig. 4.20.

Image
Figure 4.19 ψ response with a delayed input of 15Ts.
Image
Figure 4.20 ψ˙Image response with a delayed input of 15Ts.

The second part consisted of a repeated experiment with the CDV and the predictive algorithm in closed loop. When the predictor is applied to the unstable system, the closed-loop system becomes stable, see Figs. 4.214.22. Also in this experiment we added manual changes of reference in order to analyze the system's performance. A zoom of the yaw response can be also appreciated in Fig. 4.21. Fig. 4.22 illustrates the yaw rate response. Notice here that the stability is also recovered for this state.

Image
Figure 4.21 ψ response (and a zoom of it) with the predictor control scheme with the delay of 15Ts.
Image
Figure 4.22 ψ˙Image response with the predictor control scheme with the delay of 15Ts.

4.3 Discussion

Improving system's behavior is a challenge to many researchers. Several teams work directly on proposing robust controllers that can reject uncertainties, perturbations, or sometimes delays. In this chapter two predictor schemes to improve the closed-loop behavior in the presence of delays in the inputs were proposed. The algorithms considered real cases as delayed measurements on sensors, and it was proved that using these predictors the states are recovered.

The first scheme was based on an Observer–Predictor Algorithm that compensates delays in the control inputs. The algorithm includes an h-step ahead predictor to estimate the delayed state. Simulation and experimental results have demonstrated good performance of the closed loop even when it had been degraded. The second algorithm used the Fundamental Theorem of Calculus to design a predictor scheme to compensate the delays in the system (sensors, etc.). Stability analysis was proved using the ideas in [21]. Simulation and experimental results have corroborated good performance of the algorithm.

References

[1] K.U. Lee, H.S. Kim, J.B. Park, Y.H. Choi, Hovering control of a quadrotor, In: International Conference on Control, Automation and Systems – ICCAS. Jeju Island, Korea. 2012:162–167.

[2] T. Madani, A. Benallegue, Backstepping control for a quadrotor helicopter, In: International Conference on Intelligent Robots and Systems. Beijing, China. 2006.

[3] D. Mellinger, N. Michael, V. Kumar, Trajectory generation and control for precise aggressive maneuvers with quadrotors, The International Journal of Robotics Research 2012;31(5):664–674.

[4] A. Chan, S. Tan, C. Kwek, Sensor data fusion for attitude stabilization in a low cost quadrotor system, In: International Symposium on Consumer Electronics. Singapore, Singapore. 2011.

[5] O.J. Smith, Closer control of loops with dead time, Chemical Engineering Progress 1957;53:217–219.

[6] A. Manitius, A.W. Olbrot, Finite spectrum assignment problem for systems with delays, IEEE Transactions on Automatic Control 1979;24:541–552.

[7] J. Normey-Rico, E.F. Camacho, Dead-time compensators: a survey, Control Engineering Practice 2008;16:407–428.

[8] Z. Artstein, Linear systems with delayed controls: a reduction, IEEE Transactions on Automatic Control 1982;27:869–879.

[9] J. Richard, Time-delay systems: an overview of some recent advances and open problems, Automatica 2003;39:1667–1694.

[10] R. Lozano, P. Castillo, P. Garcia, A. Dzul, Robust prediction-based control for unstable delay systems: application to the yaw control of a mini-helicopter, Automatica 2004;40:603–612.

[11] P. Garcia, P. Castillo, R. Lozano, P. Albertos, Robustness with respect to delay uncertainties of a predictor–observer based discrete-time controller, In: Proceedings of the 45th Conference on Decision and Control (CDC). San Diego, CA, USA. IEEE; 2006:199–204.

[12] A. Gonzalez, A. Sala, P. Garcia, P. Albertos, Robustness analysis of discrete predictor-based controllers for input-delay systems, International Journal of Systems Science 2013;44(2):232–239.

[13] P. Albertos, P. García, Predictor–observer-based control of systems with multiple input/output delays, Journal of Process Control 2012;22:1350–1357.

[14] A. Gonzalez, P. Garcia, P. Albertos, P. Castillo, R. Lozano, Robustness of a discrete-time predictor-based controller for time-varying measurement delay, Control Engineering Practice 2012;20:102–110.

[15] J.E. Normey-Rico, E. Camacho, Control of Dead-Time Processes. Springer; 2007.

[16] E. Kaszkurewicz, A. Bhaya, Discrete-time state estimation with two counters and measurement delay, In: Proceedings of the 35th Conference on Decision and Control, vol. 2. Kobe, Japan. IEEE; 1996:1472–1476.

[17] T.D. Larsen, N.A. Andersen, O. Ravn, N.K. Poulsen, Incorporation of time delayed measurements in a discrete-time Kalman filter, In: Proceedings of the 37th Conference on Decision and Control, vol. 4. Tampa, Florida, USA. IEEE; 1998:3972–3977.

[18] Q. Ge, T. Xu, X. Feng, C. Wen, Universal delayed Kalman filter with measurement weighted summation for the linear time invariant system, Chinese Journal of Electronics 2011;20:67–72.

[19] V. Van Assche, M. Dambrine, J. Lafay, J. Richard, Some problems arising in the implementation of distributed-delay control laws, In: Proceedings of the 38th Conference on Decision and Control, vol. 5. Phoenix, Arizona, USA. IEEE; 1999:4668–4672.

[20] S. Mondié, W. Michiels, Finite spectrum assignment of unstable time-delay systems with a safe implementation, IEEE Transactions on Automatic Control 2003;48:2207–2212.

[21] M. Krstic, Delay Compensation for Nonlinear Adaptive and PDE Systems. Birkhäuser; 2009.

[22] P. Castillo, R. Lozano, A.E. Dzul, Modelling and Control of Mini-Flying Machines. Advances in Industrial Control. London, UK: Springer-Verlag; 2005.


*  “The results in this chapter were developed in collaboration with R. Sanz Diaz from the Universidad Politecnica de Valencia, Spain, and Angel G. Alatorre and Sabine Mondié from CINVESTAV-IPN, Mexico.”

1  “As the control structure should be robust under model parameters uncertainty, the round-off of the fractional delay will not be a problem [10].”

2  “For further analysis and without loss of generality, we set the values of the mass to one and the inertial matrix to the identity matrix.”

3  diImage denotes the delayed sampling period: for two integrators in cascade there is only one d1Image, for four integrators there are d1Image and d2Image. It does not signify that diImage needs to be the same for the yaw or altitude state, or that d1d2Image strictly.”

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset