=Paper=
{{Paper
|id=Vol-2331/paper4
|storemode=property
|title=Backstepping Control of an Autonomous Catamaran Sailboat
|pdfUrl=https://ceur-ws.org/Vol-2331/paper4.pdf
|volume=Vol-2331
|authors=Helmi Abrougui,Samir Nejim
}}
==Backstepping Control of an Autonomous Catamaran Sailboat==
Backstepping Control of an Autonomous Catamaran Sailboat Helmi Abrougui Samir Nejim U.R Automatic Control & Marine U.R Automatic Control & Marine Robotics Robotics Naval Academy, Tunisia Naval Academy, Tunisia helmiabrougui@yahoo.fr samir.nejim@centraliens.net Abstract Automatic control of sailing boats has continuously evolved since it allows the increase of sailing safety and the improvement of cruise speed. Hence, the main problem with sailing resides in the large heel angle and important roll motion that can be caused by strong wind. In order to overtake these risks and to ameliorate the sailboat manoeuvrability and speed, a solution is to design sailboats with two or three hulls; referred, respectively, as catamaran and trimaran. This paper presents an autopilot design for an autonomous catamaran sailing vessel. A four degree of freedom dynamic model of the vehicle is firstly described using Newton’s second law and kinematic equations. Due to high nonlinearity of the mathematical dynamic model of the catamaran sailboat, a nonlinear heading controller based on backstepping method is developed to stabilize the boat heading while tracking waypoints. Finally, simulation results are carried out to show the effectiveness of the proposed approach and the behaviour of the overall system. 1 Introduction Sailing is an efficient navigation technic that uses wind kinetic energy but little to no electric energy to navigate. Therefore, sailboats are well suited for long operations such as monitoring of maritime area, oceanographic research and Microtransat challenge (Brière, 2006). In this context, many autonomous sailboat projects have been launched throughout the world over the last decade such as the AVALON, the AROO and the FASt sailboats project (Erckens et al, 2010) (Neal, 2006) (Alves et al, 2008). The sailboat propulsion depends on the wind speed and direction. The sail is used to create forward propulsion for the sailing vessel. Depending on the polar diagram of the sailboat, there is an optimal sail angle that gives the highest forward linear speed but it can cause an important heel angle that decreases the boat stability and safety. Hence, we need an effective control of the sail and the rudder angle to reduce the roll motion. Authors (Wille et al, 2016) developed a Linear Quadratic Regulator (LQR) for controlling the momentum created by the sail. This controller reduces the roll motion so, it increases robustness and safety. Another solution for reducing roll motion is to design catamaran sailboats. Due to its two hull the catamaran sailboat is more stable than the monohull sailboat. Figure 1: 3D printing catamaran sailboat Copyright © by the paper's authors. Copying permitted for private and academic purposes. In: S. M. Schillai, N. Townsend (eds.): Proceedings of the International Robotic Sailing Conference 2018, Southampton, United Kingdom, 31-08-2018. 41 ROBOTIC SAILING 2018 Classical techniques of Lagrangian and Newtonian mechanics are the most used methods for determining the mathematical model of a catamaran sailing boat. An example of a dynamic model with six Degree of Freedom 6-DoF is presented in (Furrer, 2010) using Fossen approach (Fossen, 2002). Several control techniques have been applied in sailing vessel. The most used regulators are the Proportional Integral Derivative PID controllers (Cruz et al, 2014) and (Ramirez, 2012). This control law is designed using Nomoto’s first order model. In addition, a Mamdani type fuzzy inference systems was used by authors (Stelzer et al, 2007) to control both actuators for sail and rudder. Another fuzzy-based controller has been developed in (Gomes et al, 2015) and (Abril et al, 1997) where the rudder angle was calculated via the heading and the desired angular velocity. Xiao and Jouffroy (Xiao et al, 2014) designed a nonlinear heading controller for a 4- DoF monohull sailboat model using backstepping technics. The basic idea behind this method is to break down the design problem of the full system into a sequence of sub-problems on lower order systems, and recursively use some states as “virtual input” to obtain the intermediate control laws with the Control Lyapunov Function (CLF). The main advantage of backstepping control is the guarantee of system stability. In this paper, due to the high nonlinearities of the developed dynamic model of the catamaran sailboat, an autopilot was designed based on backstepping approach in order to steer the vehicle towards a specific target. For a given wind direction, the sail position is defined as a direct function of the boat heading. In the following section, a dynamic model of a sailing catamaran with four degree of freedom is described. In section III, the nonlinear heading controller was designed and tested with the developed dynamic model. Finally, some simulation results were carried out to illustrate and to evaluate the studied approach. 2 System Dynamics The dynamic model of the catamaran sailboat presented in this paper is inspired from previous researches conducted in (Jaulin et al, 2013) and (Wille et al, 2016). One of the main contributions of this paper consists of the improvement of the dynamic model by taking into consideration the roll and the sway motion. Therefore, the resulting dynamic model has 4-DoF instead of three. This dynamic model of the sailing catamaran is derived under the following assumptions: • The sail and the rudder are modeled as rigid foils. • Added mass coefficients (Fossen, 2002) are modeled as constants. • The sailboat is assumed to evolve in calm waters. The modeled catamaran sailing boat is presented in Figure 2 and Appendix B, where the North-East-Down NED coordinate system (𝑋𝑋, 𝑌𝑌, 𝑍𝑍) is treated as inertial reference frame (𝑛𝑛 − 𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓) and the (𝑥𝑥𝑏𝑏 , 𝑦𝑦𝑏𝑏 , 𝑧𝑧𝑏𝑏 ) is the body fixed frame (𝑏𝑏 − 𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓) connected to the boat. The latter is the reference frame attached to the sailboat. It rotates with angular velocity 𝑊𝑊 = (𝑝𝑝 𝑞𝑞 𝑟𝑟)𝑇𝑇 relative to the (𝑛𝑛 − 𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓). Its origin is assumed to coincide with the sailboat’s center of gravity G. The sailboat linear velocity in (𝑏𝑏 − 𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓) is 𝑉𝑉 = (𝑢𝑢 𝑣𝑣 𝑤𝑤)𝑇𝑇 . The sailboat is assumed to be rigid and 4-DoF are considered, after excluding both heaving and pitching motions 𝑞𝑞 = 𝑤𝑤 = 0. (See Figure 1) 𝝂𝝂 = (𝑢𝑢 𝑣𝑣 𝑟𝑟 𝑝𝑝)𝑇𝑇 is the velocity vector in the (𝑏𝑏 − 𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓) and 𝜂𝜂 = (𝑥𝑥 𝑦𝑦 𝜓𝜓 𝜙𝜙) 𝑇𝑇 is a vector describing, the position of the sailboat, its yaw and roll in the (𝑛𝑛 − 𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓). Figure 2: Top and rear view of the modelled catamaran sailboat 42 Vessel Development & Modelling Vector 𝜂𝜂 is then derived through a coordinate transformation (Fossen, 2002), giving the following kinematic equations of the sailboat: 𝑥𝑥̇ = 𝑢𝑢 cos 𝜓𝜓 −𝑣𝑣 sin 𝜓𝜓 cos 𝜙𝜙 + 𝑉𝑉𝐶𝐶 cos 𝜑𝜑 (1) 𝑦𝑦̇ = 𝑢𝑢 sin 𝜓𝜓 +𝑣𝑣 cos 𝜓𝜓 cos 𝜙𝜙 + 𝑉𝑉𝐶𝐶 sin 𝜑𝜑 (2) 𝜓𝜓̇ = 𝑟𝑟 cos 𝜙𝜙 (3) 𝜙𝜙̇ = 𝑝𝑝 (4) Where 𝜑𝜑 and 𝑉𝑉𝑐𝑐 are respectively the maritime current direction and speed. The sail of the boat is inflated by the apparent wind force and consequently the sailboat advances. According to (Xiao et al, 2014), the apparent wind 𝐴𝐴𝐴𝐴 is the vector sum of the true wind 𝑇𝑇𝑇𝑇 in (𝑏𝑏 − 𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓) 𝑇𝑇𝑇𝑇 𝑏𝑏−𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓 and the sailboat velocity 𝝂𝝂. (Appendix A). The true wind vector expressed in the (𝑛𝑛 − 𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓) 𝑇𝑇𝑇𝑇 𝑛𝑛−𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓 is given by: 𝑇𝑇𝑇𝑇𝑇𝑇 cos 𝑇𝑇𝑇𝑇𝑇𝑇 𝑇𝑇𝑇𝑇 𝑛𝑛−𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓 = � 𝑇𝑇𝑇𝑇𝑇𝑇 sin 𝑇𝑇𝑇𝑇𝑇𝑇 � (5) 0 So, 𝑇𝑇𝑇𝑇 𝑏𝑏−𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓 = 𝑅𝑅2 𝑅𝑅1 𝑇𝑇𝑇𝑇 𝑛𝑛−𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓 (6) With cos 𝜓𝜓 sin 𝜓𝜓 0 𝑅𝑅1 = �− sin 𝜓𝜓 cos 𝜓𝜓 0� 0 0 1 1 0 0 𝑅𝑅2 = �0 cos 𝜙𝜙 sin 𝜙𝜙 � 0 − sin 𝜙𝜙 cos 𝜙𝜙 Therefore, we get 𝐴𝐴𝐴𝐴 𝑏𝑏−𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓 = 𝑇𝑇𝑇𝑇 𝑏𝑏−𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓 − 𝑉𝑉 − 𝑊𝑊 × (𝑥𝑥𝑠𝑠 𝑦𝑦𝑠𝑠 𝑧𝑧𝑠𝑠 )𝑇𝑇 𝑇𝑇𝑇𝑇𝑇𝑇 cos(𝑇𝑇𝑇𝑇𝑇𝑇 − 𝜓𝜓) − 𝑢𝑢 − 𝑟𝑟 𝑦𝑦𝑠𝑠 =�𝑇𝑇𝑇𝑇𝑇𝑇 sin(𝑇𝑇𝑇𝑇𝑇𝑇 − 𝜓𝜓) cos 𝜙𝜙 − 𝑣𝑣 − 𝑟𝑟 𝑥𝑥𝑠𝑠 +𝑝𝑝𝑧𝑧𝑠𝑠 � (7) 0 𝐴𝐴𝐴𝐴 𝑥𝑥𝑏𝑏 =�𝐴𝐴𝐴𝐴 𝑦𝑦𝑏𝑏 � 0 Then 𝐴𝐴𝐴𝐴𝐴𝐴 = 𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎2(𝐴𝐴𝐴𝐴 𝑦𝑦𝑏𝑏 , 𝐴𝐴𝐴𝐴 𝑥𝑥𝑏𝑏 ) (8) 𝐴𝐴𝐴𝐴𝐴𝐴 = �𝐴𝐴𝐴𝐴 𝑏𝑏−𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓 � = �(𝐴𝐴𝐴𝐴 𝑥𝑥𝑏𝑏 )2 + (𝐴𝐴𝐴𝐴 𝑦𝑦𝑏𝑏 )2 (9) The angle of attack on the sail by the direction of the apparent wind 𝐴𝐴𝐴𝐴 is equal to (𝛿𝛿𝑠𝑠 − 𝐴𝐴𝐴𝐴𝐴𝐴) (Melin, 2015). Therefore, the aerodynamic force 𝑓𝑓𝑠𝑠 applied on the Center of Effort CoE of the sail is equal to: 𝑓𝑓𝑠𝑠 = 𝑝𝑝4 𝐴𝐴𝐴𝐴𝐴𝐴 sin(𝛿𝛿𝑠𝑠 − 𝐴𝐴𝐴𝐴𝐴𝐴) (10) The vectorial representation of this aerodynamic force in the fixed body frame (𝑏𝑏 − 𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓) is: 𝑥𝑥 𝑓𝑓𝑠𝑠 𝑏𝑏 𝑓𝑓 sin 𝛿𝛿𝑠𝑠 𝐹𝐹𝑠𝑠 = � 𝑦𝑦𝑏𝑏 � = � 𝑠𝑠 � (11) 𝑓𝑓𝑠𝑠 𝑓𝑓𝑠𝑠 cos 𝛿𝛿𝑠𝑠 On the other hand, the angle of attack on the rudders by the apparent water velocity is equal to 𝛿𝛿𝑟𝑟 (Melin, 2015). By assuming that the apparent water and the sailboat speeds are equal, the water generates a hydrodynamic force on each rudder which is equal to: 𝑓𝑓 = 𝑝𝑝5 𝑢𝑢2 sin 𝛿𝛿𝑟𝑟1 � 𝑟𝑟1 (12) 𝑓𝑓𝑟𝑟2 = 𝑝𝑝5 𝑢𝑢2 sin 𝛿𝛿𝑟𝑟2 With 𝛿𝛿𝑟𝑟1 = 𝛿𝛿𝑟𝑟2 = 𝛿𝛿𝑟𝑟 (13) Thus, in what follows the hydrodynamic force applied on the sailboat is supposed created by one rudder situated in (𝑥𝑥𝑏𝑏 − 𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎) and equal to: 43 ROBOTIC SAILING 2018 𝑓𝑓𝑟𝑟 = 𝑓𝑓𝑟𝑟1 + 𝑓𝑓𝑟𝑟2 = 2𝑝𝑝5 𝑢𝑢2 sin 𝛿𝛿𝑟𝑟 (14) The vectorial representation of this hydrodynamic force in the fixed body frame (𝑏𝑏 − 𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓) is then 𝑥𝑥 𝑓𝑓𝑟𝑟 𝑏𝑏 −𝑓𝑓 sin 𝛿𝛿𝑟𝑟 𝐹𝐹𝑟𝑟 = � 𝑦𝑦𝑏𝑏 � = � 𝑟𝑟 � (15) 𝑓𝑓𝑟𝑟 −𝑓𝑓𝑟𝑟 cos 𝛿𝛿𝑟𝑟 For simplicity reasons, the sailboat is affected by some tangential friction forces −𝑝𝑝1 𝑢𝑢2 and −𝑝𝑝2 𝑣𝑣 respectively applied on (𝑥𝑥𝑏𝑏 − 𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎) and (𝑦𝑦𝑏𝑏 − 𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎) also it is affected by an angular friction force −𝑝𝑝3 𝑟𝑟 applied around (𝑧𝑧𝑏𝑏 − 𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎). In addition, the applied forces on the sailboat are 𝐹𝐹𝑠𝑠 and 𝐹𝐹𝑟𝑟 . Therefore, according to Newton’s second law of motion applied in the (𝑏𝑏 − 𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓) , we have: 𝑥𝑥 𝑥𝑥 (16) (𝑝𝑝9 − 𝑋𝑋𝑢𝑢̇ )𝑢𝑢̇ = 𝑓𝑓𝑠𝑠 𝑏𝑏 + 𝑓𝑓𝑟𝑟 𝑏𝑏 −𝑝𝑝1 𝑢𝑢2 = 𝑓𝑓𝑠𝑠 sin 𝛿𝛿𝑠𝑠 − 𝑓𝑓𝑟𝑟 sin 𝛿𝛿𝑟𝑟 − 𝑝𝑝1 𝑢𝑢2 𝑦𝑦 𝑦𝑦 (17) (𝑝𝑝9 − 𝑌𝑌𝑣𝑣̇ )𝑣𝑣̇ = 𝑓𝑓𝑠𝑠 𝑏𝑏 + 𝑓𝑓𝑟𝑟 𝑏𝑏 −𝑝𝑝2 𝑣𝑣 = 𝑓𝑓𝑠𝑠 cos 𝛿𝛿𝑠𝑠 − 𝑓𝑓𝑟𝑟 cos 𝛿𝛿𝑟𝑟 − 𝑝𝑝2 𝑣𝑣 (18) (𝑝𝑝10 − 𝑁𝑁𝑟𝑟̇ )𝑟𝑟 ̇ = 𝑑𝑑𝑠𝑠 𝑓𝑓𝑠𝑠 − 𝑑𝑑𝑟𝑟 𝑓𝑓𝑟𝑟 − 𝑝𝑝3 𝑟𝑟 With 𝑑𝑑𝑠𝑠 = 𝑝𝑝6 − 𝑝𝑝7 cos 𝛿𝛿𝑠𝑠 𝑑𝑑𝑟𝑟 = 𝑝𝑝8 cos 𝛿𝛿𝑟𝑟 By adding the Coriolis effect caused by both rigid body and added mass (Wille et al, 2016) we get: (𝑝𝑝9 − 𝑋𝑋𝑢𝑢̇ )𝑢𝑢̇ = 𝑓𝑓𝑠𝑠 sin 𝛿𝛿𝑠𝑠 − 𝑓𝑓𝑟𝑟 sin 𝛿𝛿𝑟𝑟 + 𝑣𝑣𝑣𝑣(𝑝𝑝9 − 𝑌𝑌𝑣𝑣̇ ) − 𝑝𝑝1 𝑢𝑢2 (19) (𝑝𝑝9 − 𝑌𝑌𝑣𝑣̇ )𝑣𝑣̇ = 𝑓𝑓𝑠𝑠 cos 𝛿𝛿𝑠𝑠 − 𝑓𝑓𝑟𝑟 cos 𝛿𝛿𝑟𝑟 + 𝑢𝑢𝑢𝑢(𝑋𝑋𝑢𝑢̇ − 𝑝𝑝9 ) − 𝑝𝑝2 𝑣𝑣 (20) (𝑝𝑝10 − 𝑁𝑁𝑟𝑟̇ )𝑟𝑟̇ = (𝑝𝑝6 − 𝑝𝑝7 cos 𝛿𝛿𝑠𝑠 )𝑓𝑓𝑠𝑠 − 𝑝𝑝8 cos 𝛿𝛿𝑟𝑟 𝑓𝑓𝑟𝑟 + 𝑢𝑢𝑢𝑢(𝑌𝑌𝑣𝑣̇ − 𝑋𝑋𝑢𝑢̇ ) − 𝑝𝑝3 𝑟𝑟 (21) According to Le Bars (Le Bars et al, 2013) the roll motion is supposed to be pendulum: 𝑧𝑧𝑠𝑠 𝑓𝑓𝑠𝑠 cos 𝛿𝛿𝑠𝑠 cos 𝜙𝜙 − 𝑝𝑝13 𝑝𝑝9 𝑔𝑔 sin 𝜙𝜙 − 𝑝𝑝12 𝑝𝑝 (22) 𝑝𝑝̇ = 𝑝𝑝11 − 𝐾𝐾𝑝𝑝̇ Therefore, the 4-DoF state equations, which describe the dynamics of the sailboat, are: 𝑥𝑥̇ = 𝑢𝑢 cos 𝜓𝜓 −𝑣𝑣 sin 𝜓𝜓 cos 𝜙𝜙 + 𝑉𝑉𝐶𝐶 cos 𝜑𝜑 ⎧ 𝑦𝑦̇ = 𝑢𝑢 sin 𝜓𝜓 + 𝑣𝑣 cos 𝜓𝜓 cos 𝜙𝜙 +𝑉𝑉𝐶𝐶 sin 𝜑𝜑 ⎪ ⎪ 𝜓𝜓̇ = 𝑟𝑟 cos 𝜙𝜙 ⎪ 𝜙𝜙̇ = 𝑝𝑝 ⎪ (𝑓𝑓𝑠𝑠 sin 𝛿𝛿𝑠𝑠 − 𝑓𝑓𝑟𝑟 sin 𝛿𝛿𝑟𝑟 + 𝑣𝑣𝑣𝑣(𝑝𝑝9 − 𝑌𝑌𝑣𝑣̇ ) − 𝑝𝑝1 𝑢𝑢2 ) ⎪ 𝑢𝑢̇ = (𝑝𝑝9 − 𝑋𝑋𝑢𝑢̇ ) (𝑓𝑓 cos 𝛿𝛿 − 𝑓𝑓 cos 𝛿𝛿𝑟𝑟 +𝑢𝑢𝑢𝑢(𝑋𝑋𝑢𝑢̇ − 𝑝𝑝9 ) − 𝑝𝑝2 𝑣𝑣) (23) ⎨ 𝑣𝑣̇ = 𝑠𝑠 𝑠𝑠 𝑟𝑟 ⎪ (𝑝𝑝9 − 𝑌𝑌𝑣𝑣̇ ) ⎪ ((𝑝𝑝6 − 𝑝𝑝7 cos 𝛿𝛿𝑠𝑠 )𝑓𝑓𝑠𝑠 − 𝑝𝑝8 𝑓𝑓𝑟𝑟 cos 𝛿𝛿𝑟𝑟 + 𝑢𝑢𝑢𝑢(𝑌𝑌𝑣𝑣̇ − 𝑋𝑋𝑢𝑢̇ ) − 𝑝𝑝3 𝑟𝑟) ⎪𝑟𝑟̇ = (𝑝𝑝10 − 𝑁𝑁𝑟𝑟̇ ) ⎪ ⎪ 𝑧𝑧 𝑓𝑓 𝑠𝑠 𝑠𝑠 cos 𝛿𝛿𝑠𝑠 cos 𝜙𝜙 − 𝑝𝑝13 𝑝𝑝9 𝑔𝑔 sin 𝜙𝜙 − 𝑝𝑝12 𝑝𝑝 𝑝𝑝̇ = ⎩ 𝑝𝑝11 − 𝐾𝐾𝑝𝑝̇ This system state space (23) is highly nonlinear and it has the following compact notation; 𝑋𝑋̇ = 𝑓𝑓(𝑋𝑋, 𝑈𝑈, 𝐵𝐵) With: 𝑋𝑋 = (𝑥𝑥 𝑦𝑦 𝜓𝜓 𝜙𝜙 𝑢𝑢 𝑣𝑣 𝑟𝑟 𝑝𝑝) 𝑇𝑇 the state vector. 𝛿𝛿 𝑈𝑈 = � 𝑠𝑠 � the input vector. 𝛿𝛿𝑟𝑟 𝐵𝐵, disturbance due to maritime current. The two actuators, sail and rudder, have physical limitations. In this dynamic model, these limitations are expressed by setting the maximum sail opening angle to 𝛿𝛿𝑠𝑠𝑚𝑚𝑚𝑚𝑚𝑚 = 90° and the maximum angular velocity to 30 °/s. In (Santos et al, 2016) and (Xiao et al, 2014), the control of the sail opening angle was assured by setting 44 Vessel Development & Modelling the length of the rope which is attached to the boom. However, in this paper, it is assumed that the sail is rotated by a servomotor built in the mast. Therefore, the sail and servo angle were assumed to be equal. The rudder will follow similar limitations, 𝛿𝛿𝑟𝑟𝑚𝑚𝑚𝑚𝑚𝑚 = 45° for maximum rudder angle and 30 °/s for its maximum angular velocity. 3 Autopilot Design To make an autonomous catamaran sailboat follow a given path or reach a target position(𝑥𝑥𝑑𝑑 , 𝑦𝑦𝑑𝑑 ), a controller with two levels is designed as presented in Figure 3. The first one is a high-level controller. It generates the desired heading 𝜓𝜓 𝑟𝑟𝑟𝑟𝑟𝑟 and the sail opening angle 𝛿𝛿𝑠𝑠 for a sailing trip. The second controller is the autopilot. It usually sails the boat to the desired heading. In this paper, we will focus on the autopilot design. Regarding the navigation strategy (high-level controller), we will use the waypoint tracking proposed in (Jaulin, 2014) with minor improvements. Figure 3: Proposed control scheme 3.1 Heading Control To use the backstepping techniques we consider again the subsystem described by the two differential equations (3) and (21). The heading error is: 𝑒𝑒1 = 𝜓𝜓 𝑟𝑟𝑟𝑟𝑟𝑟 − 𝜓𝜓 , its dynamics is written as 𝑒𝑒̇1 = −𝑟𝑟 cos 𝜙𝜙 since 𝜓𝜓 𝑟𝑟𝑟𝑟𝑟𝑟̇ =0 Let the Control Lyapunov Function be defined as 1 𝑉𝑉1 = 𝑒𝑒12 (24) 2 We first choose 𝑟𝑟 as the virtual control input to converge the system toward 𝑒𝑒1 = 0 with a stabilizing function 𝑔𝑔1 (𝑒𝑒1 , 𝜙𝜙) such that 𝑉𝑉1̇ < 0 for all 𝑒𝑒1 ≠ 0. We have 𝑉𝑉1̇ = 𝑒𝑒1 𝑒𝑒̇1 = −𝑟𝑟𝑒𝑒1 cos 𝜙𝜙 (25) 𝑘𝑘1 𝑒𝑒1 By taking 𝑟𝑟 = 𝑔𝑔1 (𝑒𝑒1 , 𝜙𝜙) = we obtain 𝑉𝑉1̇ = −𝑘𝑘1 𝑒𝑒1 < 0 2 cos 𝜙𝜙 Where 𝑘𝑘1 is a positive design constant. 𝑘𝑘1 𝑒𝑒1 However, since 𝑟𝑟 is not the system input, we can achieve 𝑟𝑟 = 𝑔𝑔1 (𝑒𝑒1 , 𝜙𝜙) = only with an error that is cos 𝜙𝜙 represented by the new variable error 𝑒𝑒2 = 𝑔𝑔1 (𝑒𝑒1 , 𝜙𝜙) − 𝑟𝑟 (26) The new dynamic errors are: 45 ROBOTIC SAILING 2018 𝑘𝑘1 𝑒𝑒1 ⎧ 𝑒𝑒̇1 = −𝑟𝑟 cos 𝜙𝜙 = cos 𝜙𝜙 �𝑒𝑒2 − � = 𝑒𝑒2 cos 𝜙𝜙 − 𝑘𝑘1 𝑒𝑒1 cos 𝜙𝜙 (27) ⎨𝑒𝑒̇ = 𝑘𝑘1 (𝑒𝑒 𝑝𝑝 sin 𝜙𝜙 − 𝑟𝑟 cos 2 𝜙𝜙) − ℎ(𝜓𝜓, 𝑟𝑟, 𝑢𝑢, 𝑣𝑣, 𝛿𝛿 , 𝑓𝑓 ) ⎩ 2 cos 2 𝜙𝜙 1 𝑟𝑟 𝑠𝑠 with ℎ(𝜓𝜓, 𝑟𝑟, 𝑢𝑢, 𝑣𝑣, 𝛿𝛿𝑟𝑟 , 𝑓𝑓𝑠𝑠 ) = 𝑟𝑟̇ (28) So, the new control Lyapunov function 𝑉𝑉2 can be written as 1 1 𝑉𝑉2 = 𝑒𝑒12 + 𝑒𝑒22 (29) 2 2 Then 𝑉𝑉̇ 2 = 𝑒𝑒1 𝑒𝑒̇1 + 𝑒𝑒2 𝑒𝑒̇2 (30) given that 𝑒𝑒1 𝑒𝑒̇1 = 𝑒𝑒1 (𝑒𝑒2 cos 𝜙𝜙 − 𝑘𝑘1 𝑒𝑒1 ) (31) 𝑘𝑘1 𝑒𝑒2 𝑒𝑒̇2 = 𝑒𝑒2 ( 2 (−𝑟𝑟 cos 2 𝜙𝜙 + 𝑒𝑒1 𝑝𝑝 sin 𝜙𝜙) − ℎ(𝜓𝜓, 𝑟𝑟, 𝑢𝑢, 𝑣𝑣, 𝛿𝛿𝑟𝑟 , 𝑓𝑓𝑠𝑠 )) (32) cos 𝜙𝜙 𝑉𝑉2̇ can be rewritten as: 𝑒𝑒2 𝑒𝑒1 𝑘𝑘1 𝑝𝑝 𝑉𝑉2̇ = 𝑒𝑒1 𝑒𝑒2 cos 𝜙𝜙 − 𝑘𝑘1 𝑒𝑒12 − 𝑒𝑒2 ℎ(𝜓𝜓, 𝑟𝑟, 𝑢𝑢, 𝑣𝑣, 𝛿𝛿𝑟𝑟 , 𝑓𝑓𝑠𝑠 ) − 𝑒𝑒2 𝑘𝑘1 𝑟𝑟 + sin 𝜙𝜙 (33) cos 2 𝜙𝜙 By choosing 𝑘𝑘1 𝑘𝑘2 𝑘𝑘1 𝑝𝑝 𝑠𝑠𝑠𝑠𝑠𝑠 𝜙𝜙 ℎ(𝜓𝜓, 𝑟𝑟, 𝑢𝑢, 𝑣𝑣, 𝛿𝛿𝑟𝑟 , 𝑓𝑓𝑠𝑠 ) = 𝑒𝑒1 (𝑐𝑐𝑐𝑐𝑐𝑐 𝜙𝜙 + + ) − 𝑟𝑟(𝑘𝑘1 + 𝑘𝑘2 ) (34) 𝑐𝑐𝑐𝑐𝑐𝑐 𝜙𝜙 cos 2 𝜙𝜙 We get 𝑉𝑉2̇ = −𝑘𝑘1 𝑒𝑒12 − 𝑘𝑘2 𝑒𝑒22 < 0 ∀ 𝑒𝑒1 ≠ 0 , 𝑒𝑒2 ≠ 0 (35) ∗+ With 𝑘𝑘2 ∈ ℜ Using equations (14), (28) and (34) we obtain: 𝑘𝑘 𝑘𝑘 𝑠𝑠𝑠𝑠𝑠𝑠 𝜙𝜙 (𝑝𝑝6 −𝑝𝑝7 𝑐𝑐𝑐𝑐𝑐𝑐(𝛿𝛿𝑠𝑠 ))𝑓𝑓𝑠𝑠 +𝑢𝑢𝑢𝑢(𝑌𝑌𝑣𝑣̇ −𝑋𝑋𝑢𝑢̇ )−𝑟𝑟�𝑝𝑝3 −(𝑝𝑝10 −𝑁𝑁𝑟𝑟̇ )(𝑘𝑘1 +𝑘𝑘2 )�−𝑒𝑒1 (𝑝𝑝10 −𝑁𝑁𝑟𝑟̇ )�𝑐𝑐𝑐𝑐𝑐𝑐 𝜙𝜙+ 1 2 +𝑘𝑘1 𝑝𝑝 � −1 𝑐𝑐𝑐𝑐𝑐𝑐 𝜙𝜙 cos2 𝜙𝜙 𝛿𝛿𝑟𝑟 = 0.5 𝑠𝑠𝑠𝑠𝑠𝑠 ( 0.5𝑝𝑝5 𝑝𝑝8 𝑢𝑢2 ) (36) With 𝛿𝛿𝑟𝑟 < |𝛿𝛿𝑟𝑟𝑚𝑚𝑚𝑚𝑚𝑚 | � 𝑢𝑢 ≠ 0 ∀ 𝑋𝑋 ∈ ℜ8 3.2 Navigation Strategy Based on the polar diagram 1 given in Figure 5 and using the target position (𝑥𝑥𝑑𝑑 , 𝑦𝑦𝑑𝑑 ), the system state space 0F and the wind direction, the high-level controller which is inspired from (Jaulin, 2014) generates the desired heading 𝜓𝜓 𝑟𝑟𝑟𝑟𝑟𝑟 and the sail opening angle 𝛿𝛿𝑠𝑠 . As we know, a sailing boat cannot sail directly against the wind direction because in this case the sail will be luffing in the breeze and cannot generate any propulsive power. The polar diagram (see Figure 5) shows the sector of directions that cannot be navigable by sailboats. It is called a no-go-zone. The size of the no-go zone, referred to as the no-go-heading, will differ based on characteristics of the particular sailboat. To avoid this no-go-zone, the boat has to sail in Zig-Zag course and execute tack 2 manoeuver so, the high-level 1F controller must generate desired heading 𝜓𝜓 𝑟𝑟𝑟𝑟𝑟𝑟 ∉ ]TWA + π − ξ , TWA − π + ξ[. 1 is the set of all pairs (𝜓𝜓, u) that can be reached by the sailboat when it navigates. 2 The sailboat tacks, that is sails on alternating sides of the wind and therefore advances towards the wind. This is the most complex case, testing the interaction between all parts of the model, especially rudder and sail forces. 46 Vessel Development & Modelling So, in the case where the sailboat has to navigate with maximum speed on an upwind navigation (𝑇𝑇𝑇𝑇𝑇𝑇 = 𝜋𝜋+ 𝜓𝜓) the following set of headings are used. 𝑟𝑟𝑟𝑟𝑟𝑟 𝑟𝑟𝑟𝑟𝑟𝑟 𝜓𝜓1 = 𝑇𝑇𝑇𝑇𝑇𝑇 + 𝜋𝜋 − ξ − 𝛽𝛽 and 𝜓𝜓2 = 𝑇𝑇𝑇𝑇𝑇𝑇 − 𝜋𝜋 + ξ + 𝛽𝛽 (37) For downwind sailing, the desired heading given by the high-level controller is defined by the following 𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎2 function 3: 2F 𝑟𝑟𝑟𝑟𝑟𝑟 𝜓𝜓3 = 𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎2(𝑦𝑦 − 𝑦𝑦𝑑𝑑 , 𝑥𝑥 − 𝑥𝑥𝑑𝑑 ) (38) which allows the sailboat to navigate directly toward its destination. Using the algorithm given in (Santos, 2016) and presented on Figure 4, the overall system was simulated to evaluate the control law developed in this work. 𝜋𝜋 In what follows, the wind is simulated coming from the North (𝑇𝑇𝑇𝑇𝑇𝑇 = − ) and its speed is equal to 10 m/s. 2 Therefore the sail opening angle is given by the following equation, it depends on the sailboat heading 𝜓𝜓: 𝜓𝜓 1 𝜋𝜋 𝜓𝜓 (39) 𝛿𝛿𝑠𝑠 = 𝜋𝜋 � + � + − 2𝜋𝜋 4 4 2 Using equations (27) and (34) the error dynamics is 𝑒𝑒̇1 = 𝑒𝑒2 cos 𝜙𝜙 − 𝑘𝑘1 𝑒𝑒1 (40) � 𝑘𝑘1 𝑘𝑘2 𝑒𝑒̇2 = −𝑒𝑒1 �cos 𝜙𝜙 + � + 𝑟𝑟𝑘𝑘2 cos 𝜙𝜙 Hence, the controller (36) is tuned with 𝑘𝑘1 = 𝑘𝑘2 = 1 using the pole placement method applied to equation system (40). Figure 4: Algorithm used to control the sailboat Figure 5: Sailboat polar diagram 𝜋𝜋 𝜋𝜋 (Guidance, Navigation and Control) 𝜉𝜉 = , 𝛽𝛽 = 4 12 3 𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎2(𝑦𝑦, 𝑥𝑥) ∈ [−𝜋𝜋, 𝜋𝜋] is the four-quadrant inverse tangent. 47 ROBOTIC SAILING 2018 4 Simulation and Results Four set of simulations have been studied in order to show the path followed by the sailboat against the wind direction. In these simulations, the target is situated in position (𝑥𝑥𝑑𝑑 = 0 ; 𝑦𝑦𝑑𝑑 = 0) . The simulations started with initial values 𝑋𝑋(𝑡𝑡 = 0) = (𝑥𝑥𝑖𝑖 𝑦𝑦𝑖𝑖 𝜓𝜓𝑖𝑖 0 8 0 0 0 )𝑇𝑇 with 𝑖𝑖 ∈ {1,2,3,4} and stopped when the target position was reached with a distance equal to ten meters. The proposed control law allows the sailboat to reach the target position. Figure 6 clearly shows that the boat sails on Zig-Zag course when the target is situated against the true wind direction 𝑖𝑖 ∈ {3,4}. However, it goes directly to the target position in downwind case 𝑖𝑖 ∈ {1,2}. We can conclude that there is a good synchronization between the sail opening angle Figure 8 and the rudder control Figure 7 in order to execute the upwind tack maneuver. Figure 9 shows that the heading 𝜓𝜓(𝑡𝑡) eventually converges to the desired heading 𝜓𝜓𝑟𝑟𝑟𝑟𝑟𝑟 (𝑡𝑡) with an error 𝜓𝜓 𝑟𝑟𝑟𝑟𝑟𝑟 (𝑡𝑡) − 𝜓𝜓(𝑡𝑡) = 0 . rudder angle 300 40 True 200 𝑖𝑖 = 1 wind direction 30 100 Target 𝑖𝑖 = 2 Position 20 0 north (m) deltar (deg) 10 -100 -200 𝑖𝑖 = 4 0 -300 𝑖𝑖 = 3 -10 -400 -20 -200 -100 0 100 200 300 400 500 0 50 100 150 200 250 300 east (m) time (s) Figure 6: Paths followed by the catamaran Figure 7: Time evolution of the rudder sailboat angle control (𝑖𝑖 = 3) (𝒙𝒙𝒅𝒅 = 𝟎𝟎 , 𝒚𝒚𝒅𝒅 = 𝟎𝟎) sail opening angle 30 150 20 10 100 heading desired heading deltas (deg) 0 -10 50 -20 -30 0 0 50 100 150 200 250 300 0 50 100 150 200 250 300 time (s) time (s) Figure 8: Time evolution of the sail Figure 9: Time evolution of the desired heading opening angle (𝑖𝑖 = 3) 𝜓𝜓 𝑟𝑟𝑟𝑟𝑟𝑟 and the sailboat heading 𝜓𝜓 (𝑖𝑖 = 3) 48 Vessel Development & Modelling 5 Conclusion In this paper, a 4-DoF mathematical model describing the dynamic motion of a catamaran sailboat was presented. This dynamic model is considered a satisfactory model to represent the vehicle dynamic motion in the horizontal plane. The backstepping control method is used to develop a nonlinear heading control for the sailing boat. This controller works as intended. It allows to keep the sailboat on a predefined heading while waypoint tracking. The control system stability was proved using Control Lyapunov Function. As a future work in this area, it is suggested to identify the considered 3D printed catamaran sailboat (Figure 1) model parameters using the temporal variation data of the yaw angle (Casado et al, 2005). Afterwards, the implementation of the developed control law in real time will be done. References Cruz, N. A., & Alves, J. C. (2014). Navigation performance of an autonomous sailing robot. In Oceans- St. John's, (pp. 1-7). IEEE. Erckens, H., Büsser, G. A., Pradalier, C., & Siegwart, R. Y. (2010). Navigation strategy and trajectory following controller for an autonomous sailing vessel. IEEE RAM, 17, 47-54. Jaulin, L., & Le Bars, F. (2013). A simple controller for line following of sailboats. In Robotic Sailing (pp. 117-129). Springer, Berlin, Heidelberg. Jaulin, L. (2004). Modelisation et commande d’un bateau à voile. In Proceedings of 3rd Conference Internationale Francophone d’Automatique, Douz, Tunisie. Furrer, F. (2010). Developing a simulation model of a catamaran using the concept of hydrofoils. ETH, Zurich. Romero-Ramirez, M. A. (2012). Contribution à la commande de voiliers robotisés (Doctoral dissertation, Paris 6). Stelzer, R., Proll, T., & John, R. I. (2007). Fuzzy logic control system for autonomous sailboats. In Fuzzy Systems Conference, 2007. FUZZ-IEEE. IEEE International (pp. 1-6). Xiao, L., & Jouffroy, J. (2014). Modeling and nonlinear heading control of sailing yachts. IEEE Journal of Oceanic engineering, 39(2), 256-268. Gomes, L., Santos, M., Pereira, T., & Costa, A. (2015). Model-based development of an autonomous sailing Yacht controller. In Autonomous Robot Systems and Competitions (ICARSC), IEEE International Conference on (pp. 103-108). IEEE Wille, K. L., Hassani, V., & Sprenger, F. (2016). Roll stabilization control of sailboats. IFAC-Papers OnLine, 49(23), 552-556. Santos, D., Silva Junior, A. G., Negreiros, A., Vilas Boas, J., Alvarez, J., Araujo, A., & Gonçalves, L. M. (2016). Design and implementation of a control system for a sailboat robot. Robotics, 5(1), 5. Casado, M. H., & Ferreiro, R. (2005). Identification of the nonlinear ship model parameters based on the turning test trial and the backstepping procedure. Ocean Engineering, 32(11-12), 1350-1369. Wille, K. L., Hassani, V., & Sprenger, F. (2016). Modeling and Course Control of Sailboats. IFAC- PapersOnLine, 49(23), 532-539. Le Bars, F., Jaulin, L., & Ménage, O. (2013). Suivi de ligne pour un voilier: application au robot voilier autonome VAIMOS pour l'océanographie. In Journées des Démonstrateurs (p. xx). Fossen, T. I. (2002). Marine Control System-Guidance, Navigation and Control of Ships, Rigs and Underwater Vehicles. Marine Cybemetics. 49 ROBOTIC SAILING 2018 Neal, M. (2006). A hardware proof of concept of a sailing robot for ocean observation. IEEE Journal of Oceanic Engineering, 31(2), 462-469. Alves, J. C., & Cruz, N. A. (2008). Fast-an autonomous sailing platform for oceanographic missions. In OCEANS (pp. 1-7). IEEE. Melin, J. (2015). Modeling, control and state-estimation for an autonomous sailboat. Brière, Y. (2006). The first microtransat challenge. Google Scholar. Abril, J., Salom, J., & Calvo, O. (1997). Fuzzy control of a sailboat. International Journal of Approximate Reasoning, 16(3-4), 359-375. Appendix A. Wind velocity representation Appendix B. Variable description Notation Description TW, AW -true and apparent wind vector. TWS, TWA -true wind speed and direction. AWS, AWA -apparent wind speed and direction 𝑉𝑉𝐶𝐶 , 𝜑𝜑 -maritime current speed and direction (𝑥𝑥, 𝑦𝑦) -north east position (𝑥𝑥𝑠𝑠 , 𝑦𝑦𝑠𝑠 , 𝑧𝑧𝑠𝑠 ) -coordinate of the CoE of the sailboat in (b-frame). 𝜓𝜓, 𝜙𝜙 -yaw and roll angle in the (n-frame). 𝛿𝛿𝑠𝑠 -sail opening angle in the (b-frame). 𝛿𝛿𝑟𝑟1 , 𝛿𝛿𝑟𝑟2 -rudder angle in the (b-frame). 𝑢𝑢, 𝑣𝑣 -surge and sway motion in the (b-frame). 𝑟𝑟, 𝑝𝑝 -angular velocity in yaw and roll (b-frame). 𝑓𝑓𝑠𝑠 -aerodynamic force of the wind applied on the sail 𝑓𝑓𝑟𝑟1 , 𝑓𝑓𝑟𝑟2 -hydrodynamic forces of the water applied on the left and right rudder in the (b-frame). 𝑔𝑔 -gravity. 𝑝𝑝1 , 𝑝𝑝2 -water friction in (𝑥𝑥𝑏𝑏 _axis) and (𝑦𝑦𝑏𝑏 _axis). 𝑝𝑝3 -water angular friction. 𝑝𝑝4 , 𝑝𝑝5 -lift coefficient of the sail/rudder. 𝑝𝑝6 -distance between the mast and CoE. 𝑝𝑝7 -distance between the boat’s center of gravity and the mast. 𝑝𝑝8 -distance between G and the rudder. 𝑝𝑝9 -total mass of the boat. 𝑝𝑝10 , 𝑝𝑝11 -moment of inertia Z-axis / X-axis. 𝑝𝑝12 -roll friction coefficient. 𝑝𝑝13 -length of the equivalent pendulum in roll motion (in m). ξ -width of the no-go-zone, this parameter depends on the sailboat characteristics. β -an angle which gives maximum speed when the sailboat is on an upwind navigation. 𝑋𝑋𝑢𝑢̇ ,𝑌𝑌𝑣𝑣̇ , 𝑁𝑁𝑟𝑟̇ , 𝐾𝐾𝑝𝑝̇ -added mass in (b-frame) 50