MPC-Based Optimal Path Following for

0 downloads 0 Views 215KB Size Report
Keywords: Path following, underactuated vessels, MPC, stability, nonlinear systems. 1. ... studied the 3D case for underactuated underwater vehicles. In (Børhaug et al., 2006a ... Another MPC scheme designed for an autonomous un- derwater ...
Preprints of the 8th IFAC International Conference on Manoeuvring and Control of Marine Craft, September 16-18, 2009 Casa Grande Hotel, Guarujá (SP), Brazil

MPC-based optimal path following for underactuated vessels Alexey Pavlov ∗ H˚ avard Nordahl ∗∗ Morten Breivik ∗∗∗ ∗ Department of Engineering Cybernetics Norwegian University of Science and Technology, NO-7491, Trondheim, Norway (e-mail: [email protected]) ∗∗ Marine Cybernetics, P.O. Box 1572, NO-7435, Trondheim, Norway (e-mail: [email protected]). ∗∗∗ Centre for Ships and Ocean Structures Norwegian University of Science and Technology, NO-7491, Trondheim, Norway (e-mail: [email protected])

Abstract: In this paper we propose a control law for an underactuated vessel to follow a straight line path using a line-of-sight (LOS) guidance law. To achieve optimal performance of the closed-loop system, a parameter of the LOS guidance law, the lookahead distance, is chosen to be time-varying and updated with a model predictive control (MPC) algorithm. For the closed-loop system we prove guaranteed global asymptotic stability (convergence to the path) and demonstrate in simulations that the performance of the system (fast convergence to the path with minimal overshoot) is improved compared to what can be achieved with a constant (small or large) lookahead distance. It is shown that global asymptotic stability of the closedloop system is preserved even in the case when the MPC solver cannot find a solution to the optimization problem within given computation time limits. Keywords: Path following, underactuated vessels, MPC, stability, nonlinear systems 1. INTRODUCTION Path following for marine vehicles is an important practical problem. For a single vessel this problem has been investigated in a number of publications. In (Fossen et al., 2003; Breivik and Fossen, 2004; Fredriksen and Pettersen, 2006) the problem has been considered for underactuated surface vessels and the proposed controllers are validated in simulations and experiments. Encarna¸c˜ao and Pascoal (2000) and Børhaug and Pettersen (2005) have studied the 3D case for underactuated underwater vehicles. In (Børhaug et al., 2006a; Pavlov et al., 2007) the straight line path following problem has been investigated as a part of a more complex formation control problem. In the underactuated case, i.e., when the vehicle has less actuators than degrees of freedom, the problem of path following becomes especially challenging and requires advanced analysis to guarantee stability of the nonlinear closed-loop system. With such complications already at the stage of stability analysis of these nonlinear systems, little has been done in optimizing their performance. By optimal performance we understand fast convergence to the path, small (if any) overshoot and low sensitivity to external disturbances like ocean currents and waves. For general nonlinear systems performance optimization is poorly investigated, while practical demand for such an optimization is significant. In this paper, which is an extension of the initial work carried out in (Nordahl, 2008), we approach the problem of performance optimization within the problem of ⋆ This research is supported by the Strategic University Program of Computational Methods in Nonlinear Motion Control at NTNU.

340

path following for underactuated vessels. To keep the paper focused, we aim at minimizing convergence time to the path and simultaneously reducing possible overshoot, while preserving closed-loop stability. This problem is approached in the following sequence. Firstly, we choose a controller based on a line-of-sight (LOS) guidance law (Papoulias, 1991), which has a clear physical meaning. It controls the orientation of the vessel to aim at a point lying ∆ > 0 meters ahead of the vessel projection onto the path, see Figure 1. Parameter ∆ is usually called a lookahead distance. It is known that for constant ∆ larger than a certain threshold, which depends on the vessel parameters, such a controller guarantees global asymptotic and local exponential convergence to the path, see, e.g., (Pettersen and Lefeber, 2001; Fredriksen and Pettersen, 2006; Pavlov et al., 2007). Small ∆ corresponds to fast convergence to the path, but with a large overshoot. At the same time, large ∆ reduces overshoot and results in smooth, but slow convergence. This behavior is natural since locally ∆ corresponds to the inverse proportional gain (Breivik and Fossen, 2008). Introducing a time-varying ∆(t) could combine the benefits of both small and large ∆ to improve the overall performance of the closed-loop system. In this paper we will optimize ∆(t) to achieve faster convergence and smaller overshoot than what can be achieved with a constant lookahead distance as is conventionally used in LOS algorithms (Healey, 2006). The optimization of ∆(t) will be based on a model predictive control (MPC) algorithm. The idea of MPC, see, e.g., (Maciejowski, 2002), is to predict the response of a system to inputs and use these predictions to find an input which results in an optimal behavior of the system (corresponding to the minimum of some cost function) satisfying certain constraints.

In this paper the cost function will be chosen with its minimum corresponding to (fast) exponential convergence of the vessel to the path without overshoot. The constraints in an MPC algorithm specify acceptable inputs. In our case we will consider an input as acceptable if it leads to globally asymptotically stable dynamics of the closed-loop system. This requirement will be expressed as ˙ An MPC controller taking into constraints on ∆ and ∆. account these constraints provides globally asymptotically stable closed-loop dynamics with additional optimization of the transient performance. Derivation of the constraints ˙ that lead to stable closed-loop behavior is an on ∆ and ∆ important contribution of this paper since such a result enables not only the use of MPC, but also of other methods for optimization of ∆ within the constraints. There exist several publications using MPC algorithms for marine control purposes. An optimal control law for cross-track control of an underactuated vessel is presented in (Børhaug et al., 2006b). In (Marafioti et al., 2008) an MPC-based controller is used for keeping an underwater vehicle a constant distance from the ocean bottom. Another MPC scheme designed for an autonomous underwater vehicle is presented in (Naeem, 2002), where a simple line-of-sight guidance scheme is utilized to generate a reference heading, which is tracked by a model predictive controller. It is common to many MPC applications that proving stability of the closed-loop system is a very difficult task. The approach adopted in this paper avoids this problem since the designed MPC controller automatically makes the closed-loop system globally asymptotically stable. Simulations of the proposed MPC-based control scheme show that the closed-loop dynamics have better performance in terms of fast convergence to the path and minimal overshoot than for the LOS-based controllers with constant ∆. Since the guaranteed stability of the closedloop system is not only globally asymptotical, but also locally exponential, the closed-loop system possesses a certain degree of robustness with respect to external disturbances and model uncertainties. Finally, as follows from the simulations, the computational time for this MPC controller is sufficiently low to allow for its online implementation. The paper is organized as follows. In Section 2 the vessel model and control objective are specified. In Section 3 an LOS-based controller is presented and constraints on ˙ ∆(t) and ∆(t) that lead to global asymptotic stability of the closed-loop system are derived. An MPC-based optimization of ∆(t) is presented in Section 4. Simulation results are provided in Section 5, while conclusions are given in Section 6. 2. VESSEL MODEL AND CONTROL OBJECTIVE The ship model considered in this paper is given by (Fossen, 2002) x˙ = u cos ψ − v sin ψ (1a) y˙ = u sin ψ + v cos ψ (1b) ψ˙ = r, (1c) Mν˙ + C(ν)ν + Dν = Bu (2) where x and y represent the ship position and ψ the orientation relative to an Earth-fixed reference frame,

341

Fig. 1. Illustration of the LOS angle ψd while ν = [u v r]T denotes the surge, sway, and yaw velocities in the body-fixed frame. The mass matrix is denoted by M , C(ν) is the Coriolis and centripetal matrix and D is the damping matrix. The vector u = [Tu Tr ]T is the control input corresponding to surge thrust and rudder deflection; the matrix B is a 3 × 2 actuator configuration matrix of the form B = [1 0; 0 Yδ ; 0 Nδ ], for some constant parameters Yδ and Nδ . Note that we consider underactuated vessels since only 2 independent controls are available to control 3 degrees of freedom. The origin of the earth-fixed coordinate system is placed with its x-axis aligned with the straight line path to be followed. Thus the desired motion of the vessel along the path corresponds to y = 0 (distance to the path) and ψ = 0 (vessel orientation parallel to the path). Therefore the control objective is to guarantee y(t) → 0, ψ(t) → 0 with the additional requirement u(t) → ud as t → +∞, where ud > 0 is a desirable constant speed along the path. Convergence to the path should preferably be fast with small or no overshoot. 3. LOS-BASED CONTROLLER AND STABILITY ANALYSIS To solve the path following problem, we adopt the line-ofsight-based guidance, see, e.g., (Papoulias, 1991; Fredriksen and Pettersen, 2006; Pavlov et al., 2007). To introduce the controller we firstly transform our model. After multiplying both sides of (2) from the left by M−1 , we obtain the following model of the vessel dynamics u˙ = Fu (u, v, r) + τu , (3a) v˙ = Y (u)v + X(u)r, (3b) r˙ = Fr (u, v, r) + τr , (3c) where τu and τr are new control inputs satisfying M −1 Bu = [τu , 0, τr ]T . Note that we assume the control input u not affecting the sway motion. As shown by Fredriksen and Pettersen (2006), this is not a restrictive assumption since for a large class of surface vessels this can be achieved by a proper choice of the body-fixed coordinate system. For details on the choice of the body-fixed coordinate system and for the expressions of Fu (u, v, r), X(u), Y (u) and Fr (u, v, r), see (Fredriksen and Pettersen, 2006). The controller consists of two components. The first component is responsible for surge speed control: τu := −Fu (u, v, r) − ku (u − ud ), (4) where ku > 0 is a control gain. This controller is based on feedback linearization and guarantees exponential con-

vergence of u to the desired surge velocity ud . The second component is responsible for the yaw control: τr := − Fr (u, v, r) + ψ¨d (5) − kψ (ψ − ψd ) − kr (r − ψ˙ d ), where kψ > 0 and kr > 0 are control gains and   y ψd := − tan−1 , (6) ∆(t) is a line-of-sight angle with the lookahead distance ∆(t) > 0. The physical interpretation of this angle is illustrated in Figure 1. The LOS angle ψd corresponds to directing the vessel towards a point that lies a distance ∆ ahead of the vessel projection on the desired path. As follows from (3c) and the fact that ψ˙ = r, controller (5) is a feedback linearizing controller which guarantees that the yaw angle of the vessel exponentially tracks the LOS angle ψd (t). This controller depends on a particular choice of the function ∆(t) > 0. In the conventional designs ∆ is chosen constant, while in our study it is time varying. The desired motion of the vessel along the path with speed ud corresponds to the equilibrium (y, v, u, ψ, r) = (0, 0, ud , 0, 0) of system (1b), (1c), (3) in closed loop with controllers (4) and (5) with ψd given by (6). The variable ∆(t) in (6) is still undefined and, in fact, stability of the closed-loop system depends on the choice of ∆(t). Before presenting conditions on ∆(t) that lead to global uniform asymptotic stability of the closed-loop system, we make the following assumption. Assumption 1. For the desired velocity ud > 0 it holds that Y (ud ) < 0 and X(ud ) < 0. For convenience we denote Yd := −Y (ud ) > 0 and Xd := −X(ud ) > 0. Assumption Y (ud ) < 0 is guaranteed by hydrodynamic damping properties, while Assumption X(ud ) < 0 holds for most ships. The next lemma presents a technical result that will be used in the formulation of the main theorem of this section. Lemma 1. Consider the following quadratic equation in λ: qy∆ (λ) := a0 + a1 λ − (a2 + a3 λ)2 = 0, (7) with   ∂κ Xd ∆2 , a1 := −2ud p, a0 := 4ud κ pYd − p2 ∂∆ κXd κXd ud ∆ , a3 := − , a2 := ∆ − p2 p p where p := ∆2 + y 2 and ∆2 (2∆Yd − 3Xd ) . (8) Xd2 ud Suppose Assumption 1 holds. Then, for any ∆ > 2Xd /Yd and any y ∈ R, equation (7) has two real roots: λ1 (y, ∆) < 0 and λ2 (y, ∆) > 0. Moreover, qy∆ (λ) > 0, for λ1 (y, ∆) ≤ λ ≤ λ2 (y, ∆). (9) κ(∆) :=

The proof of this lemma is provided in the Appendix. Let us now present the main result of this section. Theorem 1. Consider the closed-loop system (1b), (1c), (3)–(6). Suppose Assumption 1 holds. Choose ∆1 , ∆2 and ¯ satisfying ∆ Xd ¯ > 0. 2 < ∆1 < ∆2 , ∆ (10) Yd

342

Then for any differentiable function ∆(t) satisfying ∆1 ≤ ∆(t) ≤ ∆2 , (11) ˙ ˙ ¯ αλ1 (y, ∆(t)) ≤ ∆(t) ≤ αλ2 (y, ∆(t)), |∆(t)| ≤ ∆, (12) where α ∈ (0, 1) is some constant and λ1 (y, ∆), λ2 (y, ∆) are the negative and positive roots of equation (7), respectively, the equilibrium (y, v, u, ψ, r) = (0, 0, ud , 0, 0) is uniformly globally asymptotically stable (UGAS) and uniformly locally exponentially stable (ULES). Proof: We will transform the closed-loop system into a cascaded form and then apply stability theory for cascades, see, e.g., (Panteley and Loria, 1998). Let us perform the coordinate transformation u ˜ = u − ud , ψ˜ := ψ − ψd , r˜ := r − ψ˙ d . The equilibrium (y, v, u, ψ, r) = (0, 0, ud , 0, 0) of the closed-loop system (1b), (1c), (3)– ˜ r˜) = 0 of the (6) corresponds to the origin (y, v, u ˜, ψ, transformed system. ˜ r˜]T . As follows from the system equaDenote ξ := [˜ u, ψ, tions (3a), (1c), (3c) and from the controller (4), (5), the dynamics of ξ satisfy ! −ku 0 0 0 0 1 ξ. (13) ξ˙ = 0 −kψ −kr Since the controller gains ku , kψ and kr are positive, (13) is globally exponentially stable (GES). Next we analyze the dynamics of y and v. Using the ˜ the expression for expressions u = ud + u ˜, ψ = ψd + ψ, y˙ given in (1b) can be written as y˙ = ud sin ψd + v cos ψd + H1 (ψd , v, ξ)ξ, (14) where H1 (ψd , v, ξ)ξ contains the terms vanishing at ξ = 0. Substituting (6) for ψd in (14), we obtain −ud y ∆v y˙ = p +p + H1 (y, v, ∆, ξ)ξ. ∆2 + y 2 ∆2 + y 2 After similar transformations of the equation for the vdynamics (see (3b)), we obtain the following expression     y˙ y ˙ ˙ (15) v˙ = A(y, ∆, ∆) v + H(y, v, ∆, ∆, ξ)ξ, with

 ∆ −ud   p p ˙ = , A(y, ∆, ∆) ˙   −Xd ud ∆ Xd ∆ Xd ∆2  − 2 , −Yd + p3 p p3 (16) p ˙ ξ)ξ contains where p = ∆2 + y 2 . The term H(y, v, ∆, ∆, all the terms vanishing at ξ = 0. System (15), (13) is a cascade of the linear GES system (13) with the nominal system     y˙ y ˙ = A(y, ∆, ∆) (17) v˙ v 

˙ ξ)ξ. To through the interconnection term H(y, v, ∆, ∆, study stability of this cascade, we firstly need to analyze the stability of system (17). Lemma 2. Under conditions (10)–(12) system (17) is UGAS and ULES with a quadratic Lyapunov function. The proof of this lemma is provided in the Appendix.

In the same way as it has been shown by Fredriksen and Pettersen (2006), it can be demonstrated, using bound-

˙ (see (11) and (12)), that the interedness of ∆ and ∆ ˙ ξ) has linear growth in connection matrix H(y, v, ∆, ∆, ˙ ξ)k ≤ θ1 (|ξ|)(|y| + |v|) + y and v, i.e., kH(y, v, ∆, ∆, θ2 (|ξ|), where θ1 (s) and θ2 (s) are some continuous nonnegative functions. Applying Theorem 2 from (Panteley and Loria, 1998) and Lemma 8 from (Panteley et al., 1998), we conclude that system (15), (13) is UGAS and ULES at the origin. Therefore, the equilibrium (y, v, u, ψ, r) = (0, 0, ud , 0, 0) of the original system (1b), (1c), (3)–(6) is also UGAS and ULES. 2 4. MPC-BASED OPTIMIZATION OF ∆ The line-of-sight-based controller presented in the previous section has various performance characteristics depending on the choice of the lookahead distance ∆. Small constant ∆ results in fast convergence to the path, but large overshoot and long settling time. Large constant ∆ results in little or no overshoot, but slow convergence. The introduction of a time-varying ∆(t) may allow one to combine the benefits of small- and large-∆ designs in one controller. In general, introducing time-varying functions instead of constant parameters may cause instability in the closedloop system. Yet, Theorem 1 provides us with conditions ˙ under which stability is preserved even for a on ∆ and ∆ time-varying ∆. The remaining freedom of choosing ∆(t) within these constraints can then be exploited to optimize the performance of the closed-loop system. In this section we propose to use the methods of model predictive control to optimize ∆(t) within the stability constraints (11), (12). The goal of the optimization is to achieve, simultaneously, faster convergence and less overshoot than what is possible for any constant ∆. As mentioned earlier, the idea behind MPC is to predict the response of a system to inputs and use these predictions to find an input which results in optimal behavior of the system in terms of some cost function and satisfaction of certain constraints. Let us explain this concept for our particular system. Firstly we write the closed-loop system (15), (13) in a condensed form χ˙ = F(χ, ∆, µ) (18a) ˙ = µ, ∆ (18b) where χ := (y, v, ξ T )T and µ is a new control input that we will use for performance optimization of the closedloop dynamics. The function F(χ, ∆, µ) corresponds to ˙ the closed-loop dynamics (15), (13) with ∆(t) = µ(t). As follows from Theorem 1, system (18a) is UGAS and ULES if ∆ and µ satisfy the following constraints ∆1 ≤ ∆(t) ≤ ∆2 , (19) ¯ (20) αλ1 (y, ∆(t)) ≤ µ(t) ≤ αλ2 (y, ∆(t)), |µ(t)| ≤ ∆, Xd ¯ for some ∆2 > ∆1 > 2 , ∆ > 0, α ∈ (0, 1) and λ1 (y, ∆), Yd

λ2 (y, ∆) being the roots of equation (7). Conditions (19), (20) will be treated as constraints in the optimization of µ. In continuous-time model predictive control, at each time instant t the input µ(t) is determined in the following way. Firstly, we consider system (18) on the prediction interval [t, t + Tp ] with the initial condition (χ(t), ∆(t)) at time instant t and input µ ˆ(s), where s ∈ [t, t + Tp ] denotes the time variable within the prediction interval. Parameter Tp is called a prediction horizon. On this interval we solve the following optimal control problem:

343

Z J :=

t+Tp

2 2 (y(s)+K ˙ ˆ2 (s)ds → min y y(s)) +K∆ ∆ (s)+Kµ µ µ ˆ

t

(21) with Ky , K∆ , Kµ > 0, under the condition that ∆(s) and µ ˆ(s) satisfy constraints (19), (20) for s ∈ [t, t + Tp ]. As will be explained below, the cost function is chosen to guarantee satisfactory behavior of the system at its minimum. The constraints guarantee that the closed-loop system (18a) will be UGAS and ULES. Once the optimization problem is solved, with µ ˆ∗ (s) being its solution, we choose ∗ the input µ(t) := µ ˆ (t). In this way the constraints (19), (20) on ∆(t) and µ(t) will be satisfied for all t, thus leading to closed-loop stability of the subsystem (18a), while the optimization will provide better transient performance. Notice that if ∆(t) ∈ [∆1 , ∆2 ], the set of inputs µ ˆ(s) leading to the satisfaction of constraints (19), (20) on the interval [t, t + Tp ] is non-empty since they are always satisfied for the trivial input µ ˆ(s) ≡ 0. Thus there always exists a solution to the optimization problem (21) under constraints (19), (20). The cost function J is chosen to have its minimum corresponding to a desirable behavior of the system. The minimum of the term (y(s) ˙ + Ky y(s))2 , corresponding to the dynamics y˙ = −Ky y, guarantees exponential decay of y (the distance to the path) to zero without overshoot. Parameter Ky determines the rate of convergence. The term K∆ ∆2 (s) leads to the minimization of ∆. It is known that in steady state, when the ship has already converged to the path, smaller ∆ leads to better robustness against disturbance forces acting on the ship. The term Kµ µ ˆ2 (s) ˙ leads to the minimization of ∆, which affects the yaw rate r (through r = ψ˙ d + r˜ and (6)). In practice the yaw rate is limited due to actuator constraints. Solving the optimization problem (21) in continuous time is a computationally demanding task. A common way to overcome this difficulty is to discretize the system and the corresponding cost function. In this case we obtain a finite-dimensional nonlinear programming problem. Let us choose the sampling period Ts and the discrete-time prediction horizon Hp related to the prediction horizon Tp as Tp = Ts Hp . With a piecewise constant input µ ˆ(s), µ ˆ(s) = µ ˆ[k] for s ∈ [kTs , (k + 1)Ts ], k = 0, . . . Hp − 1, the model becomes ¯ χ[k + 1] = F(χ[k], ∆[k], µ ˆ[k]) (22a) ∆[k + 1] = ∆[k] + Ts µ ˆ[k], (22b) where F¯ corresponds to the chosen discretization method, χ[k] = χ(kTs ) and ∆[k] = ∆(kTs ) in the case of exact discretization. Then the corresponding discrete-time optimization problem can be written as k+Hp −1

X j=k

(y[k] ˙ + Ky y[k])2 + K∆ ∆2 [k] + Kµ µ ˆ2 [k] →

min

µ ˆ [k:k+Hp ]

,

(23) where y[k] ˙ = y(kT ˙ s ) and y[k] = y(kTs ). The constraints (19), (20) should be verified at time instants kTs , i.e., they become constraints on µ[k] and ∆[k]. Thus we have a nonlinear programming problem, for which numerical methods apply. Even though there is a solution to this problem, it can be very difficult to find since the problem is non-convex. It can also be hard to find an optimal solution within the given sampling

4

3 2.5 2 1.5 1 0.5 0 −0.5 0

5. SIMULATION RESULTS

∆(t) from MPC Constant ∆=6 Constant ∆=3

3.5

y(t) [m]

interval. This is a serious issue for general MPC controllers applied to systems with relatively fast dynamics, because inability to produce a solution to the optimization problem within a given time frame may lead to instability. In our case this is not a problem: If a solver cannot find a solution to the optimization problem, we can always use the best approximation that has obtained within the allowed computational time. This solution will still satisfy the stability constraints and for this reason it will not compromise closed-loop stability. In the worst case, a non-optimal solution may result in slow convergence to the path or overshoot similar to the ones observed for conventionally used LOS algorithms with constant ∆.

20

40

60

80

100

80

100

t [s]

Simulation results for an initial condition corresponding to the distance to the path y = 4m are shown in Figures 2 and 3. Figure 2 shows the distance of the vessel to the path for a time-varying ∆ obtained with the MPC algorithm. For comparison, we also provide simulation results for constant ∆ with small (∆ = 3) and large (∆ = 6) values. It is clear from the figure that the LOS controller with the MPCbased ∆(t) manages to combine the benefits of both largeand small constant ∆ designs with fast convergence to the path and minimal overshoot. The dynamics of ∆(t) becomes clear from Figure 3: when the vessel is far from the path, ∆(t) rapidly reduces to its minimal value ∆1 to achieve fast convergence to the path. Then, to prevent overshoot, ∆(t) starts increasing, but not faster than it is allowed by the stability constraints. With increased ∆ the fast vessel motion towards the path is damped out using the higher damping characteristics of the sway motion. Finally, ∆(t) decreases to a smaller value, which guarantees little sensitivity of the vessel motion along the path with respect to environmental disturbances. It is clear from the simulations that the implementation of the MPC algorithm does not provide any problem with the computational time. Without any particular optimization of the code, it took approximately 35s to simulate 100s of the ship motion on a 2.2GHz Intel Core 2 duo Mac laptop with 2GB of RAM. This makes the algorithm suitable for real-time implementation.

344

Fig. 2. Distance to the path ∆(t) from MPC

7 ∆(t) [m]

The proposed MPC-based controller has been tested through numerical simulations for a model of Cybership II—a scale model vessel of an offshore supply ship. The corresponding system matrices M , C(ν) and D are taken from (Fredriksen and Pettersen, 2006) with parameters Yδ = −0.2 and Nδ = 1. The desired velocity of the vessel along the path is chosen as ud = 0.2m/s. For these system parameters Assumption 1 holds with X(ud ) = −0.144 and Y (ud ) = −0.093 and 2Xd /Yd = 3.097. Let us choose ¯ = 10 the parameters in (10) as ∆1 = 3.2, ∆2 = 10, ∆ and α = 1 − 10−4 . Controller parameters in (4), (5) are chosen equal to ku = 5, kψ = 10, kr = 6.3. For the model predictive controller we sample system (18) with the sampling period Ts = 1: Given an initial condition χ[k], ∆[k] and input µ ˆ[k], ∆[k + 1] is computed from (22b) and χ[k +1] is obtained by numerical integration of system (18) with constant µ ˆ(t) := µ ˆ[k] over the sampling interval. The integration is performed using the Euler method with a step size of 0.005s. The prediction horizon parameter is chosen to be Hp = 13, which corresponds to prediction horizon Tp = 13s in continuous time. Parameters in the cost function are chosen as Ky = 0.06, K∆ = 5 · 10−7 and Kµ = 10−5 .

6 5 4 3 0

20

40

60 t [s]

Fig. 3. MPC-based lookahead distance 6. CONCLUSIONS In this paper we have presented a modification of the line-of-sight guidance law for path following with a timevarying lookahead distance. This time-varying parameter is chosen according to an MPC optimization scheme. Simulations performed on a model-scale ship show better performance with the suggested control scheme than with a constant (large or small) lookahead distances. The MPCbased controller combines the benefits of LOS control schemes with both large and small constant lookahead distances while avoiding their inherent drawbacks. Moreover, despite using a nonlinear MPC method, which usually renders stability analysis extremely difficult or even impossible, we provide a rigorous stability proof for the closed-loop system. Future research in this field includes extensions to curved paths and development of tuning rules for the parameters of the MPC algorithm. APPENDIX Proof of Lemma 1 Notice that qy∆ (λ) → −∞ as λ → ±∞. Thus, if we show that qy∆ (0) > 0, then equation (7) has two real roots of opposite signs. It follows from (7) that qy∆ (0) = a0 − a22    2 Xd ∆2 κXd ud ∆ = 4ud κ pYd − − ∆ − p2 p2    2 Xd ∆2 κXd ud ∆ ≥ 4ud κ pYd − − ∆+ p2 p2 2  κXd ud . ≥ 4ud κ (∆Yd − Xd ) − ∆ + ∆ (24)

p In the last inequality we have used p = ∆2 + y 2 ≥ ∆ and 1/p ≤ 1/∆. After substituting κ(∆) from (8) into (24) and rearranging the terms, we obtain qy∆ (0) ≥

4∆2 (∆Yd − 2Xd )(∆Yd − Xd ) >0 Xd2

for ∆ > 2Xd /Yd . Hence, equation (7) indeed has two real roots λ1 (y, ∆) < 0 and λ2 (y, ∆) > 0. Moreover, (9) holds.2 Proof of Lemma 2 Let us prove UGAS and ULES of the nominal system (17). Consider the Lyapunov function candidate κ(∆(t)) 2 1 v . V = y2 + 2 2 Notice that for ∆ > 2Xd /Yd , κ(∆) is an increasing function of ∆ (see (8)). Thus, for ∆(t) satisfying (11) we obtain κ(∆1 ) < κ(∆(t)) < κ(∆2 ), where κ(∆1 ) > κ(2Xd /Yd ) > 0. Therefore V is a quadratic positive definite and decrescent function. Let us show that V˙ ˙ is negative definite uniformly with respect to ∆ and ∆ satisfying (11), (12). 1 ∂κ ˙ 2 ∆v V˙ =y y˙ + κ(∆)v v˙ + 2 ∂∆ !! ˙ ud 2 ∆ Xd u d ∆ Xd ∆ =− yv + 2 y + −κ p p p3 p     1 ∂κ ˙ Xd ∆2 − ∆ v2 − κ Yd − (25) p3 2 ∂∆ !! ˙ Xd u d ∆ Xd ∆ = − ud pz 2 + ∆ − κ zv + 2 p p     Xd ∆2 1 ∂κ ˙ − κ Yd − − ∆ v2 , p3 2 ∂∆ where we have firstly used the expressions for y˙ and v˙ from (17) and (16) and then introduced the variable z := y/p. Thus V˙ can be expressed as the quadratic form in z and v:  T   z z ˙ V˙ = v (26) Π(y, ∆, ∆) v ,

where Π = ΠT is the matrix of the quadratic form (25). Recall that by the Sylvester’s criterion Π is negative definite if and only if Π11 < 0 and det Π > 0. Since Π11 = −ud p ≤ −ud ∆ ≤ −ud ∆1 < 0, we only need to ˙ satisfying show that det Π > 0 uniformly in ∆ and ∆ ˙ = (11), (12). It can be easily verified that det Π(y, ∆, ∆) ˙ qy∆ (∆), where qy∆ (λ) is the polynomial defined in (7). ˙ satisfying (11), As follows from (9), for any ∆ and ∆ ˙ > 0 for all y ∈ R. Moreover, (12) it holds that qy∆ (∆) ˙ lies strictly inside the set (λ1 (y, ∆), λ2 (y, ∆)) (due since ∆ to parameter α ∈ (0, 1) in (12)) and ∆ is bounded, we ˙ > 0 uniformly in ∆ and ∆. ˙ Thus conclude that qy∆ (∆) we have shown that for any ∆(t) satisfying (11), (12), V is positive definite and decrescent while V˙ is uniformly negative definite. These properties imply that system (17) is UGAS (Khalil, p2002). Moreover, it can be shown from (26) and z = y/ ∆2 + y 2 that for small y, V˙ ≤ −β(y 2 + v 2 ) for some constant β > 0. Hence, system (17) is also ULES (Khalil, 2002). 2

345

REFERENCES Børhaug, E., A. Pavlov and K.Y. Pettersen (2006a). Cross-track formation control of underactuated autonomous underwater vehicles. In: Group Coordination and Cooperative Control (K.Y. Pettersen, J.T. Gravdahl and H. Nijmeijer, Eds.). pp. 35–54. Springer Verlag. Børhaug, E. and K.Y. Pettersen (2005). Cross-track control for underactuated autonomous vehicles. In: Proc. 44th IEEE Conference on Decision and Control. Seville, Spain. pp. 602 – 608. Børhaug, E., K. Y. Pettersen and A. Pavlov (2006b). An optimal guidance scheme for cross-track control of underactuated underwater vehicles. In: Proc. 14th Mediterranean Conference on Control and Automation. Ancona, Italy. Breivik, M. and T.I. Fossen (2004). Path following of straight lines and circles for marine surface vessels. In: Proc. 6th IFAC CAMS. Ancona, Italy. pp. 65–70. Breivik, M. and T.I. Fossen (2008). Guidance laws for planar motion control. In: Proc. 47th IEEE Conference on Decision and Control. Cancun, Mexico. pp. 570–577. Encarna¸ca ˜o, P. and A.M. Pascoal (2000). 3D path following for autonomous underwater vehicle. In: Proc. 39th IEEE Conference on Decision and Control. Sydney, Australia. pp. 2977–2982. Fossen, T.I. (2002). Marine Control Systems. Marine Cybernetics. Trondheim, Norway. Fossen, T.I., M. Breivik and R. Skjetne (2003). Line-of-sight path following of underactuated marine craft. In: Proc. 6th IFAC MCMC conference. Girona, Spain. pp. 244–249. Fredriksen, E. and K.Y. Pettersen (2006). Global κ-exponential waypoint maneuvering of ships: Theory and experiments. Automatica 42(4), 677–687. Healey, A.J. (2006). Guidance laws, obstacle avoidance and artificial potential functions. In: Advances in Unmanned Marine Vehicles (G.N. Roberts and R. Sutton, Eds.). pp. 43–66. The Institution of Electrical Engineers. Khalil, H.K. (2002). Nonlinear Systems. 3rd ed.. Pearson Education International inc.. Upper Saddle River, New Jersey, USA. Maciejowski, J.M. (2002). Predictive Control with Constraints. Prentice Hall. Harlow, UK. Marafioti, G., R. Bitmead and M. Hovd (2008). Model predictive control with state dependent input weight: an application to underwater vehicles. In: Proc. 17th IFAC World Congress. Seoul, South Korea. Naeem, W. (2002). Model predictive control of an autonomous underwater vehicle. In: Proc. UKACC Conference on Control. Nordahl, H. (2008). Optimal path following for underactuated marine vessels. Master’s thesis. Norwegian University of Science and Technology. Norway. Panteley, E. and A. Loria (1998). On global uniform asymptotic stability of nonlinear time-varying systems in cascade. Syst. Control Lett. 33, 131–138. Panteley, E., E. Lefeber, A. Loria and H. Nijmeijer (1998). Exponential tracking control of mobile car using a cascaded approach. In: Proceedings of the IFAC Workshop on Motion Control. Grenoble, France. pp. 221–226. Papoulias, F.A. (1991). Bifurcation analysis of line of sight vehicle guidance using sliding modes. International Journal of Bifurcation and Chaos 1(4), 849–865. Pavlov, A., E. Børhaug, E. Panteley and K. Y. Pettersen (2007). Straight line path following for formations of underactuated surface vessels. In: IFAC Symposium on Nonlinear Control Systems. Pretoria, South Africa. Pettersen, K.Y. and E. Lefeber (2001). Way-point tracking control of ships. In: Proc. 40th IEEE Conference on Decision and Control. Orlando, Florida. pp. 940–945.