Flight Control System for a Hydrofoil Boat Controller development by performance analysis in the Unity simulation environment Master’s thesis in Systems, Control and Mechatronics Andreas Hörberg Felix Lundgren DEPARTMENT OF MECHANICS AND MARITIME SCIENCES CHALMERS UNIVERSITY OF TECHNOLOGY Gothenburg, Sweden 2023 www.chalmers.se www.chalmers.se Master’s thesis 2023 Flight Control System for a Hydrofoil Boat Controller development by performance analysis in the Unity simulation environment ANDREAS HÖRBERG FELIX LUNDGREN Department of Mechanics and Maritime Sciences Division of Vehicle Engineering and Autonomous Systems Applied Artificial Intelligence Group Chalmers University of Technology Gothenburg, Sweden 2023 Flight Control System for a Hydrofoil Boat Controller development by performance analysis in the Unity simulation environ- ment Andreas Hörberg and Felix Lundgren © Andreas Hörberg and Felix Lundgren, 2023. Supervisor: Andreas Kang and Dan Olsson, CPAC Systems AB Examiner: Peter Forsberg, Department of Mechanics and Maritime Sciences Master’s Thesis 2023 Department of Mechanics and Maritime Sciences Division of Vehicle Engineering and Autonomous Systems Applied Artificial Intelligence Group Chalmers University of Technology SE-412 96 Gothenburg Telephone +46 31 772 1000 Cover: A constructed boat model utilizing the hydrofoil technique in Unity show- casing the model to fly above the water surface. Typeset in LATEX, template by Kyriaki Antoniadou-Plytaria Printed by Chalmers Reproservice Gothenburg, Sweden 2023 iv Flight Control System for a Hydrofoil Boat Controller development by performance analysis in the Unity simulation environ- ment ANDREAS HÖRBERG and FELIX LUNDGREN Department of Mechanics and Maritime Sciences Chalmers University of Technology Abstract The hydrofoil technique has awakened a renewed interest among boat builders, and because of this there are opportunities for innovation. Hydrofoiling relies on adjust- ments of the angle of attack of the attached hydrofoil wings, thereby necessitating effective control to support stability and robustness. However, due to its recent resurgence, there is limited availability of existing controllers, motivating the foun- dation of this thesis. This project is structured around research questions, and an objective, which is to develop a controller that can effectively implement the hydrofoil technique. In this endeavor, a controller is successfully developed and tested within a simulation environment, primarily driven by the key findings which are obtained throughout the project’s progression. These key findings play a crucial role in achieving the functional controller and providing answers to the research questions. Keywords: Angle of Attack, Flight Controller, Drag Force, Front Foil Compensation, Hydrofoil, Lift Force, Unity, Simulation. v Flight Control System for a Hydrofoil Boat Controller development by performance analyses in the Unity simulation environ- ment ANDREAS HÖRBERG and FELIX LUNDGREN Department of Mechanics and Maritime Sciences Chalmers University of Technology Sammanfattning Bärplanstekniken har väckt ett nytt intresse bland båttillverkarna och på grund av det nya intresset finns det möjligheter för innovation. Bärplanstekniken bygger på att utnyttja anfallssvinkeln för de fästa bärplansvingarna, vilket kräver effektiv kon- trollreglering. Däremot, på grund av dess nyliga återkomst finns det för närvarande en brist på tillgängliga regulatorer på marknaden, vilket utgör grunden för detta projekt. Projektet är uppbyggt kring forskingsfrågor samt målet med arbetet, som är att utveckla en regulator som effektivt kan implementera bärpplanstekniken. I denna strävan utvecklas och testas en regulator framgångsrikt i en simuleringsmiljö, främst driven av de nyckelresultat som framkommit under projektet gång. Dessa nyckel- resultat har spelat en avgörande roll för att uppnå en funktionell regulator och ge svar på forskningsfrågorna. Nyckelord: Anfallsvinkel, Flygregulator, Dragkraft, Främre Bärplanskompensering, Bärplan, Lyftkraft, Unity, Simulering. vii Acknowledgements First and foremost, we express our sincere gratitude to CPAC Systems AB for grant- ing us one of their master’s thesis opportunities and for generously providing us with a workspace and necessary hardware. We are truly appreciative of this invaluable support. We would also like to extend our heartfelt thanks to Martin Asplund and David Näslund for generously sharing their previous works in Unity. Their contri- butions have significantly helped with our work, and we are immensely thankful for their assistance. Special thanks go to David Näslund for his invaluable time and assistance in discussing and aiding us with getting started with the Unity simulation environment. His guidance has been instrumental in the success of our thesis, and we are deeply grateful for his expertise. Additionally, we would like to acknowledge the invaluable guidance and consultancy provided by Peter Forsberg, Andreas Kang, and Dan Olsson throughout the entirety of the thesis. Their insights and advice have been instrumental in shaping our work, and we extend our sincere appreciation to them. Andreas Hörberg and Felix Lundgren, Gothenburg, June 2023 Thesis advisors: Andreas Kang and Dan Olsson, CPAC Systems AB Thesis examiner: Peter Forsberg, Department of Mechanics and Maritime Sci- ences ix List of Acronyms Below is the list of acronyms that have been used throughout this thesis listed in alphabetical order: AoA Angle of Attack CFD Computational Fluid Dynamics DoF Degrees of Freedom FFC Front Foil Compensation IMU Inertial Measurement Unit PID Proportional–Integral–Derivative Controller SISO Single Input Single Output xi Nomenclature Below is a list of the nomenclature of parameters and variables used throughout this thesis. Parameters A Area of hydrofoil P Proportional gain I Integral gain D Derivative gain CL Lift coefficient CD Drag coefficient m Mass of the model g Gravitational force constant ρ Density of fluid k Gradient of straight line equation c y-intercept of straight line equation Variables AoA Angle of attack α Set angle of hydrofoil θ Pitch angle φ Roll angle y Heave (height above water surface) v Velocity FL Lift force FD Drag force xiii xiv Contents List of Acronyms xi Nomenclature xiii List of Figures xvii List of Tables xix 1 Introduction 1 1.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.1.1 CPAC Systems . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.1.2 Hydrofoil boats on the market . . . . . . . . . . . . . . . . . . 3 1.2 Problem statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.2.1 Purpose and research questions . . . . . . . . . . . . . . . . . 3 1.3 Deliminations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2 Theory 7 2.1 Physics and forces in hydrofoil boat simulation . . . . . . . . . . . . . 7 2.1.1 Angle of attack and wing set angles . . . . . . . . . . . . . . . 7 2.1.2 Stall region . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.2 Flight control system . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.2.1 PID control . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.2.2 Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.2.3 Front foil compensation . . . . . . . . . . . . . . . . . . . . . 9 2.3 Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 3 Methods 13 3.1 Hydrofoil Boat model . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 3.2 Control strategy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 3.3 Reality vs simulation responsiveness . . . . . . . . . . . . . . . . . . . 13 3.4 Approximating coefficients for hydrofoil performance . . . . . . . . . 14 3.5 Overcoming complexity in the development of a hydrofoil boat flight controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 3.5.1 Trial 1: developing PID controllers . . . . . . . . . . . . . . . 16 3.5.2 Trial 2: separating pitch and heave influence and filter selection 16 3.5.3 Trial 3: repositioning the front hydrofoil wing . . . . . . . . . 17 3.5.4 Trial 4: analysis of hydrofoil control using cheat force . . . . . 17 xv Contents 3.5.5 Trial 5: implementation of FFC . . . . . . . . . . . . . . . . . 18 3.5.6 Trial 6: implementation of roll control . . . . . . . . . . . . . 18 3.5.7 Trial 7: implementation of agile setpoint for roll control . . . . 18 3.5.8 Trial 8: robustness testing of control system . . . . . . . . . . 19 4 Results 21 4.1 Roll . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 4.2 Pitch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 4.3 Heave . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 4.4 Finalized controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 4.5 Performance and robustness demonstrations of the finalized controller 22 4.5.1 Demonstration 1 . . . . . . . . . . . . . . . . . . . . . . . . . 23 4.5.2 Demonstration 2 . . . . . . . . . . . . . . . . . . . . . . . . . 23 4.5.3 Demonstration 3 . . . . . . . . . . . . . . . . . . . . . . . . . 24 5 Discussion 27 5.1 Key findings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 5.2 Relating the key findings to the complexity of a hydrofoil, and the research questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 5.3 Reflection of demonstration results . . . . . . . . . . . . . . . . . . . 30 5.4 Roll setpoint and PID parameters . . . . . . . . . . . . . . . . . . . . 31 5.5 Addressing the research questions . . . . . . . . . . . . . . . . . . . . 32 6 Conclusion 33 6.1 Future works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 Bibliography 37 A Appendix I A.1 Lift and drag coefficients . . . . . . . . . . . . . . . . . . . . . . . . . I xvi List of Figures 1.1 Front view of the design concept. . . . . . . . . . . . . . . . . . . . . 5 1.2 Side view sketch of the design concept. . . . . . . . . . . . . . . . . . 5 2.1 Schematic of FFC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 3.1 Lift coefficient diagram of front hydrofoil . . . . . . . . . . . . . . . . 15 4.1 Block diagram of the developed hydrofoil flight controller. . . . . . . 22 4.2 Illustration of the weight locations. . . . . . . . . . . . . . . . . . . . 23 4.3 Plotted states with no added/removed weight and calm sea conditions. 23 4.4 Robustness test of finalized controller, with a 600kg disturbance weight added and removed instantly at different points on the boat. . . . . . 24 4.5 No disturbance weight added or removed. Windy sea conditions. . . . 25 A.1 Lift coefficient diagram of rear hydrofoil . . . . . . . . . . . . . . . . I A.2 Drag coefficient diagram of front hydrofoil . . . . . . . . . . . . . . . II A.3 Drag coefficient diagram of rear hydrofoil . . . . . . . . . . . . . . . . III xvii List of Figures xviii List of Tables 1.1 Parameter estimates from the data provided by CPAC. . . . . . . . . 4 xix List of Tables xx 1 Introduction This chapter provides an insight of the hydrofoil technique and its history, and a brief description of the recent adoptions to its market. The problem statement is made, followed by the purpose of this thesis, its research questions and its delimita- tions. With the recent focus on electric propulsion systems, hydrofoils have gained renewed interest due to their ability to achieve high speeds with lowered energy consump- tion. In the past, hydrofoils were designed to be stable and fixed, meaning they did not require external control. However, by making the hydrofoil system variable and potentially unstable, it is possible to improve its performance. To fully utilize this type of hydrofoil system, it would be necessary to implement a flight controller. The flight controller should be flexible and be able to work on several different types of boats, speeds, and environmental conditions. This project investigates a new method for controlling a hydrofoil system, to achieve stable control and a comfortable experience for drivers and passengers. The focus of this research is in the field of hydrodynamics, which is governed by the Navier-Stokes equations. Modeling and controlling this type of system can be challenging. The strategy is to take advantage of advanced sensors such as inertial measurement units (IMUs) to estimate orientation states, and some form of sensor to estimate height above water such as an ultrasonic sensor or a radar. 1.1 Background The main distinction between a hydrofoil boat system and a traditional boat system is that when a hydrofoil boat picks up speed, its hull is raised above the water surface, giving it the appearance of flying. This is made possible due to the hydrofoils, which are wings that generate lift in water. [2]. The hydrofoil concept was introduced in the early 20th century through various prototypes [3]. One of the first full-scale hydrofoil boats was designed and tested by an Italian engineer, Enrico Forlanini, in 1906 [4]. His design utilized a ladder system of hydrofoils and a 45 kW engine that powered two counter-rotating air propellers, allowing his craft to reach a top speed of 36 knots. In 1952, the first hydrofoil ferry was introduced in Germany, capable of carrying up to 32 passengers at a speed of 35 knots. The Soviet Union had the largest civilian hydrofoil fleet, one of which was the highly successful Meteor [3][5]. The military also utilized hydrofoils, particular the Soviet navy, which applied the technology to their attack ships for increased 1 1. Introduction speed. The US Navy also began experimenting with hydrofoils in the mid-1950s due to this ability to reach high speeds [3]. In recent years, hydrofoils have impacted both surfing and sailing. In the surfing world, hydrofoil surfing has become a prominent activity, driving evolution and bringing new excitement to the sport [6]. In 2013, the first hydrofoil boat was introduced in the America’s Cup. Although, hydrofoils offer unmatched speed and comfort, they also present significant design challenges in terms of control and safety [7]. In H.Strömqvist’s thesis [8], the author analyzes the control of a FoilCart, which resembles a surfing board more than a boat but still utilizes the hydrofoil technique. The FoilCart is entirely actuated and controlled from the hydrofoil and Strömqvist view this system as an inverted pendulum with an aircraft motion. When deciding which controller to use for the control system, the author compares a PID controller and a LQ controller. The author concludes that the LQ controller is more suitable due to its superior system sensitivity and scaling dynamics. Although a PID controller may have been a viable choice for the system, Strömqvist argues that the LQ controller is preferred due to its superior performance. The author also compares the choice between a LQR controller and a LQI controller, where the author concludes that the LQR controller was preferred due to the magnitude of its sensitivity function (below one) for this particular set up, which is argued to possibly have a positive impact on controller rejection of disturbances and uncertainties. The main objective of R.Bencatel et al. article [9] was to develop and test an automatic controller for stabilizing a sailing foiling catamaran. The authors built their controller on a a Full State Feedback (FSF) basis, which they describe as a single controller that tracks the ride height by adjusting the angle of attack of the daggerboard and the rudder, which have hydrofoils attached respectively. In the thesis by E.B.Piene [10], the author examined the issue of controllability of a hydrofoil boat in cruising mode. The performance of a frequency-weighted H2 optimal controller was evaluated to determine its ability to control the attitude of a fully submerged hydrofoil boat while it was traveling in a straight line and executing a coordinated turn. The evaluation was conducted through a simulation. The controller was optimized to control the heave, pitch and roll of the hydrofoil boat, while other controllers was able to manage parameters such as yaw rate and speed under different wave conditions. Even if the wave setup influenced the controller’s performance, the desired results were achieved. 1.1.1 CPAC Systems This thesis is being carried out at CPAC Systems and is expected to be completed during the spring of 2023. CPAC Systems is a subsidiary of Volvo Penta, which is part of Volvo Group. The company employs over 200 people and are specialized in providing technical innovation solutions to the marine and construction segments. Additionally, CPAC Systems operates an R&D segment, dedicated to research and development, and its headquarter is located in Mölndal, near Gothenburg in Sweden. 2 1. Introduction 1.1.2 Hydrofoil boats on the market Candela is a boat manufacturing company that is specialized in the production of hydrofoil boats, designed for various consumer applications. One significant consid- eration in the realm of electric hydrofoil boats is their restricted range. However, Candela’s models have addressed this issue, allowing them to travel distances ranging from 40 to 60 nautical miles before requiring a recharge. Notably, the distinctive feature of Candela’s hydrofoil boats lies in their production of a new propulsion technology known as C-POD. According to information available on Candela’s official website [11], the C- POD system is regarded as an exceptionally efficient and enduring boat motor. It provides sufficient thrust to propel the vessel to speeds up to 30 knots, all while operating in complete silence and cost-effectiveness. 1.2 Problem statement The hydrofoil technique has generated a new interest among boat makers, as they offer a new market opportunity for boat builders. It is important for boat builders to ensure that hydrofoil boats provide comfort in different conditions and maintain stability even when weight, such as people on board, is shifted around during driving. This puts a lot of effort on the controller, which must maintain the boat’s stability and robustness, while also allowing it to drive like a traditional boat at low speeds and transition into foiling mode at higher speeds. Additionally, the controller must keep track of the height above the water surface to maintain its level and comfort, even in the presence of waves or other disturbances. Boat builders have an interest in developing a controller that can handle these challenges. The problem with hydrofoil boats is that they have not yet been widely adopted. This also creates problems with the availability of existing controllers for hydrofoil control systems. As a result, there is an opportunity for innovation in developing a controller that effectively manages a hydrofoil control system. 1.2.1 Purpose and research questions The aim of this thesis is to assess the feasibility of the design concept proposed by CPAC. The validation will be carried out in several stages. Firstly, the physics behavior of the design concept will be studied in a simulation environment. This simulations environment will provide a realistic representation of the design concept and its surroundings, allowing us to test its abilities to float, drive and transition between traditional boat mode and foiling mode. Secondly, we will address the con- trol problem by investigating existing controllers, to evaluate their performance in this system. Lastly, the developed controller will be integrated into the simulation environment to evaluate its performance and identify any necessary adjustments. This leads to the research question: • What factors determine the feasibility of the provided design concept and how can they effectively be adjusted for better performance? 3 1. Introduction • How can robustness be verified for a proposed controller? • What are the most effective methods to develop a controller for the specified hydrofoil system? 1.3 Deliminations This thesis has the freedom to develop a controller for a hydrofoil system due to the lack of existing controllers. The goal of the controller is to ensure the controllability of the hydrofoil boat. The Unity software program will be used for simulation, as it has the ability to create realistic physics environments. The model of the hydrofoil boat will be designed based on data provided by CPAC, and will be constructed in Unity, which uses C# for scripting. Type Value Boat size 30 feet Take off, cruising and top Speed 15kn, 24kn and 30kn Propulsion Double 50kW PODs Foil system Submerged foils with the wings > 50cm below the surface Rear wings 600mm wide x2, chord tapering 100-200, with chamber Mid wings UV-shape, 2400mm wide and chord 250mm Attack angle 9 degrees max Deck 250mm above waterline Weight 3000kg including 8 passengers Longitudinal center of gravity 3200mm from transom Foil position 4300mm from transom 8 passengers 600kg Table 1.1: Parameter estimates from the data provided by CPAC. Although, the parameters provided by CPAC are estimates, this thesis will take them into consideration in order to make the simulation as realistic as possible. The estimated type of propulsion and speed limits will also be considered in the simulation, as they play a role in determining the model’s behavior. Below are two figures showing a front view and a side view of the proposed design concept. 4 1. Introduction Figure 1.1: Front view of the design concept. Figure 1.2: Side view sketch of the design concept. As can be seen in Figure 1.1 and Figure 1.2 the proposed design concept consist of three hydrofoils, with one large hydrofoil at the front and two smaller hydrofoils at the rear. The angle of the wings can be controlled by having the struts rotate around the normal of the side view plane, around the points where the struts are attached to the design concept. The rear wing struts can also be rotated around the 5 1. Introduction normal of the the top view plane, in order to make the boat turn, just like rudders on most boat. Thereby the front wing has one degree of freedom, while the rear wings have two degrees of freedom (DoF). 6 2 Theory This chapter present relevant theories and documentation about the topics that sup- port the foundation of this thesis. 2.1 Physics and forces in hydrofoil boat simula- tion In order to develop a realistic simulation of a hydrofoil boat, it is important to consider the physics involved in its operation. The lift force (2.1) and drag force (2.2) play a significant role, the lift force is especially important as it enables the hydrofoil to achieve lift force, allowing the boat to fly above the water surface. When the boat gains enough lift force, the hull starts to rise above the water surface, and with the attached submerged wings, the system transitions into airplane dynamics, rather than traditional boat dynamics. These forces can be modeled using equations that describe the behavior of fluid dynamics, such as the Navier-Stokes equations [12]. The lift force is derived from Bernoulli’s principle [13], as well as other factors such as the surface area of the wing, the density of the fluid and the velocity of the fluid across the wing. This force is generated by pressure differences in the fluid surrounding the wing, which creates an upward force that lifts the hydrofoil. In contrast, the drag force creates a resistance force in the moving direction of the wing’s motion. Below are the equations for the lift and drag forces [14]. FL = CL(AoA)v2Aρ 2 (2.1) FD = CD(AoA)v2Aρ 2 (2.2) The CL and CD are the lift and drag coefficients, which depend on the angle of attack (AoA), A is the area of the wing, and ρ is the density of the fluid. Understanding the lift and drag forces involved in the operation of a hydrofoil boat is important for developing an accurate simulation and optimizing its performance. 2.1.1 Angle of attack and wing set angles The generation of lift and drag forces depend on the angle of attack (AoA), which is determined by two angles: the boat’s pitch angle and the hydrofoil’s set angle. The 7 2. Theory definition of each hydrofoil’s AoA is the angle between its chordline and direction of oncoming fluid flow. The boat’s orientation in relation to the world determines the pitch angle, and the set angle is determined by the actuator that rotates the strut attached to the hydrofoil, allowing for independent control of the AoA of each hydrofoil. AoA = θ + α (2.3) where θ is the pitch, and α is the set angle. 2.1.2 Stall region With a constant increase in AoA, the lift coefficient will eventually pass its peak, entering what is known as the stall region. Stalling occurs when the fluid flow across both sides of a wing separates, reducing lift force. The lift coefficient rapidly decreases as the drag coefficient begins to increase. This sudden reduction in lift can cause a critical loss in stability. It is worth noting that stalling in a hydrofoil boat is not as critical as in an airplane, because the boat travels close to a water’s surface. 2.2 Flight control system The flight controller has three states to regulate: roll, pitch and heave. The con- troller regulates these states by adjusting the set angles of the three hydrofoils. Roll regulation can be implemented independently, while pitch and heave have a relation that causes their regulations to affect each other. This is due to a change in pitch also causing a change in AoAs of the hydrofoils, further, resulting in a shift in total lift force and heave height. In order to solve this problem, the controller incorporates an algorithm called front foil compensation (FFC). This is an algorithm invented during development of the flight controller, that determines an angle for the front hydrofoil to prevent heave changes during pitch control. It is described more in detail in Section 2.2.3. 2.2.1 PID control The core of the flight controller consists of three PID controllers, the abbreviation standing for proportional, integral and derivative. A PID controller is one of the most widely used controllers, and it consists of an algorithm that calculates an error based on the difference between a desired setpoint and a feedback value of the state to be controlled. The proportional part is a multiplication of the error, output = P × e, where P is a tuning parameter and e is the error. The proportional output determines how strongly the controller reacts on the error, it can be interpreted as an amplifier. The integral part integrates the error over time, output = I × ∫ t 0 e(τ) dτ , meaning that the controller sends out stronger signals over time, the longer the error lasts, where I is a tuning parameter. This is effective for eliminating a constant error. 8 2. Theory The derivative part derivatives the error, output = D × de(t) dt , where D is a tun- ing parameter, making the controller react to changes of the error. This effectively eliminates rapid changes in the error, such as oscillations. The algorithm of a PID controller sums the three output parts into a final output. Setting one of the parameters to zero removes that part of the controller. For example, setting the values (1, 1, 0) to the P, I, and D parameters respectively results in having a PI controller. If the integral parameter is zero as well, it results in a P controller. This makes the PID controller versatile and flexible, as the tuning parameters allow for varying control of distinct characteristics of the error. 2.2.2 Architecture The architecture of the flight controller is built around three PID controllers, where roll, pitch, and heave are regulated by their own regulators respectively. Roll and pitch are regulated by the rear hydrofoils, motivated by their further distance from the center of mass, providing a longer moment arm. The front hydrofoil regulates heave, motivated by its larger area, which generates more lift force compared to the rear hydrofoils. Furthermore, its proximity to the center of mass makes it particularly suitable for translational motion. 2.2.3 Front foil compensation Front foil compensation (FFC) is an algorithm that separates the link between pitch and heave control. It does this by computing a delta angle that the front hydrofoil utilizes to compensate for this link. While the boat is foilborne, the rear and front hydrofoils have to generate a lift force that is equal to the boat’s gravitational force, to keep it at a constant heave. Since pitch and heave are controlled separately by their own regulators, they will not affect each other while FFC is active. The algorithm uses the pitch and velocity of the boat, and the total lift force generated by the rear hydrofoils, to calculate a desired angle for the front hydrofoil. To acquire the delta angle from the desired angle, the current set angle of the front hydrofoil is used. The desired angle of the front hydrofoil is derived from the lift force equation 2.1, the lift force coefficient, and from a force balance based on the total lift of the boat: mg = FL,front + FL,rear,tot (2.4) → FL,front = mg − FL,rear,tot (2.5) where FL is the lift force, m is the mass of the boat, and g is the gravitational constant. Then there is the lift equation: FL,front = v2AρwCL(AoA) 2 (2.6) → CL(AoA) = 2FL,front v2ρwA (2.7) 9 2. Theory where v is the velocity of the fluid across the wing, A is the area of the wing, ρw is the density of the water, and CL is the lift coefficient of the front hydrofoil. Combining 2.5 and 2.7: CL(AoA) = 2(mg − FL,rear,tot) v2ρwA (2.8) The lift coefficient is approximated using the equation of a straight line, y = kx + c, where y is the lift coefficient and x is the AoA. The lift coefficient follows this straight line well in the span zero to 15 degrees AoA, which can be seen in Figure 3.1. This is a span in which the AoA will almost always be in while the boat is foilborne. Further, from the AoA equation 2.3, the lift coefficient of the front hydrofoil can be approximated by: CL(AoA) ≈ k(AoA) + m = kθ + kα + c (2.9) where again for clarification, k is the gradient and c is the y − intercept of the straight line equation approximating the lift coefficient. Combining 2.8 and 2.9 to solve for the desired angle: α = 2(mg − FL,rear,tot) v2ρwAk − θ − c k (2.10) where c and k come from the straight line equation of the lift coefficient plot, and all values are constant except for the velocity v, the total rear lift FL,rear,tot, and the pitch θ. By inputting some of the values for the constant parameters, where ρw = 1027 kg m3 , A = 0.6 m2, k = 0.09, and m = 0.1, and rounding to single-precision float accuracy (7 decimal points), the desired angle is obtained as: α = 0.0360633(mg − FL,rear,tot) v2 − θ − 1.1111111 (2.11) which is an easy equation to solve for a computer. After obtaining the desired angle, the delta angle can be calculated by subtracting by the current angle of the front hydrofoil: ∆α = α − αcurrent (2.12) The FFC algorithm runs and sends its output to the front hydrofoil actuators, which can be thought of as setting the front hydrofoil to a neutral angle (neutral as in not affecting heave), right before the heave control outputs its signal. The heave regulator will only increase or decrease the set angle of the front hydrofoil, after FFC, depending on the boat’s heave error. Thereby, FFC essentially gives the heave regulator a good angle to start acting from each update. 10 2. Theory Model Figure 2.1: Schematic of FFC In Figure 2.1 an overview of the FFC algorithm is shown. 2.3 Simulation A physics engine is a component of a game engine, and it handles the physics of game objects. It is the physics engine that enables simulation of realistic physics behavior of objects in real-time. This includes, for example, objects abiding to Newton’s laws of motion, handling collisions between objects, and behavior of bodies connected by joints. The physics engine in Unity takes the mass and shape of an object into account to calculate things like center of mass, translative and angular accelerations based on applied forces, effects from gravity, momentum, moment of inertia, and so on. These can also be adjusted manually if required, for example, changing the position of the center of mass, but the engine does this automatically unless specified otherwise. There are several physics engines to choose from when working on projects in game engines, each with their own pros and cons. However they can also be very expensive in terms of monetary cost. The default built in physics engine in Unity comes for free, along with the software, and is already powerful and more than enough for the purpose of this project. The built in physics engine in Unity is an integration of the Nvidia PhysX engine [15]. A physics engine simplifies the work that has to be done to get a physics based simulation running. It means that the equations of motion do not need to be specified. All that has to be done is to add a CAD-model, add components to the CAD-model (i.e foils and joints), specify its mass, and finally add the forces that the CAD-model will experience. The physics engine will take care of the rest, such as how the boat behaves based on the forces it experiences during run-time. Adding forces in a realistic way is a difficult part of a physics based simula- tion. For example, water and air drag, lift and drag forces, buoyancy, the boat hull smashing into water at high speeds, propeller thrust, etc, are all forces that in real- ity are a result of fluid mechanics. Performing these computational fluid dynamics (CFD) calculations is extremely demanding, and currently impossible to perform in real-time. Therefore simplifications are required. One simplification as compared to running accurate CFD calculations, is the use of simplified drag equations to simulate the boat’s behavior. These equations incorporate drag coefficients, velocity, and water/air density. However, determining these coefficients is not a straightforward process. They are typically fine-tuned through trial and error, rather than being derived from theoretical or empirical 11 2. Theory calculations. In Unity, these coefficients can be adjusted during run-time, to ensure the boat’s behavior appears realistic. For instance, a large air drag coefficient can cause the boat’s hull to catch air, effectively transforming the boat into a kite. In other cases, the boat may even perform a backflip, if the thrusters are not deactivated. This occurs because the high drag generates lift on the boat’s hull. On the other hand, if the air drag coeffi- cient is set too low, the boat can reach higher speeds than theoretically achievable, compromising the accuracy of the simulation. This motivates the use of a game engine, as it allows for real-time tuning of parameters that are used in simplified physics equations. 12 3 Methods This chapter provides the methods conducted throughout this thesis. It contains a description of how the hydrofoil boat model was developed, a motivation for the choice of regulators, an explanation of how the simulation environment aligns with real-world conditions, a description of how the hydrofoil coefficients were chosen, and ends with a walkthrough of the development process undertaken. 3.1 Hydrofoil Boat model The hydrofoil boat model integrated into this project is a modified version derived from a prior project, wherein the project creators constructed a traditional boat model in Unity. The model has been subject to modifications that will be mentioned below, to suit the needs of this study. First, the scale and weight of the model has been adjusted, from 15 meters in length and a weight of 15 tons, to a length of 9.15 meters and weight of 3 tons. The three hydrofoils, previously mentioned, along with corresponding struts, have also been added to the model. Further, lift and drag forces generated by the hydrofoils have been implemented into the model. 3.2 Control strategy The three DoF, roll, pitch and heave, are critical for the execution of this project. The method employed, involved adding a PID controller for each of the states roll, pitch and heave respectively. The rationale of using a PID controller was based on its simplicity of implementation, given that it is classified as a Single Input Single Output (SISO) controller. Tuning optimal parameters for a PID controller can however be problematic, and the parameters are not scalable. 3.3 Reality vs simulation responsiveness Given that this project is based on Unity, the obtained orientation and position data are highly accurate, which may not be the case in a real-life scenario. The data provided by Unity is interpreted as sensor data without disturbances, with single- precision float accuracy. Double-precision is possible in Unity, but single-precision was chosen to save on compute power. However, it is important to note that the response time in Unity is unrealistically fast when compared to hardware in reality, as true states are available instantly, and controller outputs are executed without 13 3. Methods delay. By default, the physics engine in Unity has an update rate of 50 Hz, meaning that the model receives updates every 0.02 seconds. Effectively, the flight controller is running at the same rate as the simulated physics. To achieve realistic actuator movements, the hydrofoil set angles were limited to have a maximum change of 0.6 degrees per update, meaning that the actuators can move at a maximum rate of 30 degrees per second, at an update rate of 50 Hz. 3.4 Approximating coefficients for hydrofoil per- formance Accurate and realistic behavior of the model requires the corresponding coefficients to be well defined. As mentioned in section (2.1), lift and drag coefficients are func- tions of the AoA. Constructing these coefficients to produce realistic and accurate lift and drag behavior is not straightforward. One method involves passing the fluid flow across the hydrofoils through a CFD simulation to obtain measurements with different AoAs, which are then analyzed to determine the coefficients. Another method involves taking real measurements in a wind/water tunnel to determine them. However, due to a lack of a given hydrofoil profile, and access to physical hy- drofoils for this project, these methods of evaluation cannot be utilized. Therefore, this project constructed reasonable lift and drag coefficients, by examining various existing coefficients. For instance, the typical lift coefficient is zero at an AoA of minus five degrees, and increases (approximately) linearly until 15 degrees, at which point it decreases. This characteristic, together with calculated required values for achieving sufficient lift at speeds of 15, 24, and 30 knots, resulted in the final coeffi- cients. Two lift coefficients and two drag coefficients were constructed, for the rear and front hydrofoils respectively. Below is a figure showing the lift coefficient plot for the front hydrofoil. The rest of the hydrofoil coefficient plots can be found in Appendix A.1. 14 3. Methods Figure 3.1: Lift coefficient diagram of front hydrofoil In Figure 3.1 the AoA [degrees] is on the x-axis and the value of the coefficient is on the y-axis. The coefficient has its peak at 15 degrees after which it decreases, rises a little bit again and then slowly decreases until 90 degrees. The lift coefficient has a constant value of zero at minus five degrees and below, meaning that the hydrofoils generate no lift below an AoA of minus five degrees. 3.5 Overcoming complexity in the development of a hydrofoil boat flight controller As previously mentioned, the purpose of this project is to develop a flight controller for a hydrofoil boat. This presents innovative challenges due to the lack of existing solutions, or established paths. As a result, this project has had complete freedom in innovating a solution that meets the project’s requirements. No existing physical boat with the specified hydrofoil setup was available for detailed analysis. Therefore, a simulation environment was created, which was used for controller implementation and investigation into its performance and behavior. Creating the boat model and its environment in Unity was complex, as it was critical for forces like lift and drag of the hydrofoils, to be implemented correctly. 15 3. Methods The development of the controller involved the execution of trials, enabling the transformation of the main problem into smaller, manageable subproblems. The trials were initiated by implementing PID controllers to control the states of interest of the system. Several trials were subsequently conducted to further develop and improve the controller, and to gather information to better understand the system. The main method was to iteratively improve the trials. 3.5.1 Trial 1: developing PID controllers The trials were initiated by implementing PID controllers to regulate pitch and heave. This was done because these two states are highly significant for this system, as they act in the forward direction of the boat. After implementing these two PIDs, their parameters were tuned in an attempt to achieve control of the states. This provided insight into the system and highlighted areas for improvement. In this initial trial, both PIDs were set up to adjust all hydrofoil set angles respectively. The PID controlling heave, was set to increase all set angles when the boat was below its setpoint, and correspondingly decrease all of the set angles when above its setpoint. The PID controlling pitch, was set to change the set angles of the rear and front hydrofoils in opposite directions respectively. Since both PIDs sent their outputs directly to the hydrofoils, their respective set angles received two different interfering commands. Attempts to improve the performance was conducted by iteratively adjusting the PID parameters, and through observations of the system’s performance after each adjustment. An integral saturation feature was also implemented in the PID controllers, to limit the accumulation of the integral error term, and prevent it from becoming too big. The output signal was also bounded to a maximum and a minimum. This was done because it was observed that the flight controller would get stuck in certain positions. During this trial, it was observed that regulating pitch and heave by using both front and rear hydrofoils respectively could be problematic, as the control was highly unstable and had an oscillatory behavior. The set angles of all hydrofoils were clamped between a maximum and a min- imum angle. This was to prevent the hydrofoils from making unrealistic rotations, like rotating through the hull of the boat model. The maximum and minimum values of the set angles were set to different values throughout the development, in order to determine and understand how this impacted performance. Having too small of a maximum angle potentially stopped the boat from being able to achieve enough lift, and too large of a maximum angle could make the control unstable, by for example allowing it to potentially reach the stall region. 3.5.2 Trial 2: separating pitch and heave influence and filter selection In this trial, modifications were made such that pitch was controlled using only the rear hydrofoils, and heave using only the front hydrofoil. This change allowed the front hydrofoil to carry and generate most of the lift force, while the rear hydrofoils 16 3. Methods balanced the model to maintain its pitch setpoint. By separating pitch and heave controls, interference commands were avoided. Separating the pitch and heave also made it easier to evaluate the system’s performance and identify issues more pre- cisely. Furthermore, efforts were made to tune the PID parameters with the aim of enhancing performance. The integral saturation feature of the PID controllers was removed, the reason being that the saturation feature caused the control signals to sometimes get stuck at a certain value, if a persisting error lasted for to long, likely due to a poor implementation of the saturation limiter. To mitigate the influence of individual waves, a low-pass filter was imple- mented. The objective is to approximately track the heave setpoint rather than maintaining an exact heave setpoint for each wave, as the latter would result in an uncomfortable ride. In Unity, the waves play a role in altering surface elevations, hence they are deemed as part of the water surface. 3.5.3 Trial 3: repositioning the front hydrofoil wing In order to further investigate the control of the hydrofoil boat, the front hydrofoil was repositioned to below the center of mass, as opposed to its previous position slightly in front of the center of mass. This adjustment was intended to provide full heave support at the center of mass, and eliminate the moment caused by the front hydrofoil. This leads to a reduction in its effect on pitch. The regulation setup from the previous trial (3.5.2) was retained during this experiment, with the pitch and heave controls separated. The aim was to determine whether changing the position of the front hydrofoil had a significant impact on the performance of the flight controller, and whether the model’s design needed to be revised in order to be feasible. Moving the front hydrofoil improved control by reducing instability and oscillations, but it was still unable to sustain a foilborne state. Additionally, the PID parameters were tuned in order to attempt to control the system, but the outcome was unsatisfactory. 3.5.4 Trial 4: analysis of hydrofoil control using cheat force In the fourth trial, the aim was to obtain a new perspective on how to efficiently regulate the system with the hydrofoil technique. A cheat force was implemented that acted on the model’s center of mass, replacing the control of the front hydrofoil’s set angle. Thereby, the front hydrofoil was removed, and the heave PID controller was reconstructed to directly apply a lift force on the model. The rear hydrofoils were set to only control pitch, as in previous trial. This is not a realistic setup, but it enabled stable control of the model Cheat Force = mg + mg × outputP ID (3.1) The cheat force was calculated according to equation (3.1). The outputP ID variable of equation (3.1) is the controller signal between the setpoint and measure- ment point, with the latter being the distance between the bottom of the model and the water surface. If the measurement point is below the setpoint, outputP ID 17 3. Methods becomes positive, and if the measurement point is above the setpoint, the outputP ID becomes negative. This cheat force was designed to be equal to the model’s gravitational force, and outputP ID was scaled by the gravitational force to simplify its magnitude for tuning (i.e parameters set to one becomes intuitive). This trial reduced the system’s com- plexity, since the cheat force ensured that the model was foilborne. Consequently, this trial indicated that controlling the system was potentially feasible, as stable control was achieved. 3.5.5 Trial 5: implementation of FFC During this trial, the cheat force was removed, and the front hydrofoil was imple- mented back into the system. Additionally, the FFC algorithm 2.2.3 was introduced. This new approach allowed for the separation of pitch and heave control in a new way. FFC takes the total lift force by the rear hydrofoils into account, to generate a lift force by the front hydrofoil that keeps the boat at a constant heave. This approach limits the lift force generation by the front hydrofoil in a way that improves stability of the control. This trial was the first major success towards achieving realistic control of the hydrofoil boat. 3.5.6 Trial 6: implementation of roll control In this trial, the controller was expanded by adding roll control. Roll is the third and last degree of freedom in the flight controller, that needs to be controlled to obtain robustness and stability of the system. Similarly to the control of pitch and heave, a PID controller was implemented to regulate the model’s roll. The control of roll utilized the rear hydrofoils, in which they received the same control signals but with opposing signs. With this approach, the rear hydrofoils generated roughly the same total rear lift force, irrespective of the roll control. The setpoint for the roll control was set to zero degrees. This improved the overall stability of the boat model, especially during turns, as it prevented it from leaning or falling over. 3.5.7 Trial 7: implementation of agile setpoint for roll con- trol This trial aimed to investigate the possibility of achieving banked turns. Banked turns refer to turns in which a vehicle slightly rolls towards the inside of the turn, which improves comfort. To achieve this, a slight roll angle could be set in the controller’s setpoint. Currently the setpoint is set to zero, resulting in flat turns. To address this, the setpoint of roll was set to the turning angle of the rud- ders. Another strategy could include using the velocity and turning radius, to more accurately account for centripetal forces. This was attempted, but was complex to accomplish and would require more development, therefore it was decided to not proceed with this strategy. 18 3. Methods Choosing the turning angle of the jets to be the setpoint produced reasonable banked turns. The jets have a maximum turn angle of 30 degrees, which may seem substantial. However, it is important to note that drivers do not typically make maximum turns at high speeds, similar to the maximum turning angle of a car under such conditions. In that sense, the setpoint of the roll PID controller becomes an agile setpoint. With the implemented agile setpoint, control of the boat during turns was further improved. 3.5.8 Trial 8: robustness testing of control system In this trial, stability and robustness of the flight controller was examined. The method involved testing how the system responded to disturbance weights. Weights were placed at different locations around the model, and it was observed that the flight controller was able to remain foilborne in a stable manner even with a shifted center of mass. The control system was further pushed to its limits, by applying and removing large weight disturbances at different location around the model in an instantaneous manner. Additionally, aggressive driving scenarios were simulated with weight distur- bances, to further examine stability. The controller was also tested in windy condi- tions, i.e wind disturbances between 1-20 m/s, and large ocean waves. 19 3. Methods 20 4 Results This chapter presents the finalized controller, and displays results of its perfor- mance. 4.1 Roll The use of the rear hydrofoils and a PID controller to control roll turned out to be feasible, as evident by the roll control trials that were conducted. Roll is controlled by adjusting the rear hydrofoil set angles by opposite directions. The first trial of roll control aimed at controlling roll using a static setpoint. However, when turning the boat it made flat turns, almost like a gokart, and it looked like an uncomfortable ride experience for passengers. However, banked turns were achieved by using an agile setpoint based on the steering angle of the jets, which looked like a much more comfortable experience. This resulted in the successful achievement of both banked turns and roll control. 4.2 Pitch Based on the conducted trials, a significant connection between the states pitch and heave was observed. As a result, pitch and heave control were separated in one trial, and found that controlling pitch using only the rear hydrofoils improved the stability of the system. A PID controller was implemented to regulate pitch, by adjusting the rear hydrofoil set angles. Unlike the implemented roll control, which adjusts the rear hydrofoil set angles by opposite angles, the pitch control adjusts them by the same angles. 4.3 Heave The most significant improvement in heave control for this project occurred when the FFC algorithm was implemented. Prior to the trial in which it was applied, heave was controlled only via a PID controller, and the system was unstable and difficult to control. The resulting heave control uses the FFC in an inner loop, and a PID controller in an outer loop. FFC sets an angle for the front hydrofoil that keeps heave constant, while the heave PID changes this angle to make the boat either increase or decrease its heave. 21 4. Results The main purpose of the FFC was to eliminate the influence between the pitch and heave control, which was achieved based on the trials in the simulation environment. With the addition of FFC heave control, a feasible flight controller was achieved. 4.4 Finalized controller After the trials conducted in section (3.5), a controller was developed that allowed the model to be foilborne and to perform banked turns. The flight controller utilizes three PID controllers to control the three DoF, in such way that are described in (4.1), (4.2) and (4.3). By compiling all of the conducted trials in section (3.5), the finalized controller could be developed and its structure is described in the block diagram in Figure 4.1. Roll Set Point - + Model Roll Regulator Error (+) Heave Set Point + Heave Regulator Error + FFC + Pitch Set Point + Pitch Regulator Error (+) (+) Rudder Turn angle - - (-) Figure 4.1: Block diagram of the developed hydrofoil flight controller. The FFC block that can be seen in Figure 4.1 is described more in detail in Figure 2.1. 4.5 Performance and robustness demonstrations of the finalized controller With the finalized controller setup as described earlier in this section and visualized in the block diagram in Figure 4.1, this section will demonstrate and reveal the performance and robustness of the finalized controller. The demonstrations are conducted using a weight meant to simulate disturbances, at different locations of 22 4. Results the model. The locations are shown in the figure below. A demonstration with windy sea conditions was also performed. Figure 4.2: Illustration of the weight locations. The weights can be seen as the white ball located at the front, middle/side, and rear of the boat respectively in Figure 4.2. 4.5.1 Demonstration 1 This demonstration was conducted with no extra weight, indicating one person onboard, and calm sea conditions. The demonstration was performed by starting the boat from a stand-still, and by operating the boat manually and randomly at around cruising speed (24 knots), but still in a way that a real driver might operate the boat. This is also applicable for the other demonstrations conducted in this section. Figure 4.3: Plotted states with no added/removed weight and calm sea conditions. The plots in Figure 4.3 show the response of roll, pitch, and heave from the first demonstration. The demonstration was performed for a duration of 80 seconds. It can be observed that the controller performed well with respect to the setpoints. 4.5.2 Demonstration 2 This demonstration was conducted with a 600kg (simulating eight passengers) extra weight and calm sea conditions, where the states can be seen in Figure 4.4. The extra weight is located at different locations, shown in Figure 4.2. 23 4. Results (a) Front 600kg weight added at 52 and 90 seconds, and removed at 58 and 98 seconds. Calm sea conditions. (b) Side 600kg weight added at 59 and 93 seconds, and removed at 69 and 100 seconds. Calm sea conditions. (c) Rear 600kg weight added at 45 and 87 seconds, and removed at 54 and 93 seconds. Calm sea conditions. Figure 4.4: Robustness test of finalized controller, with a 600kg disturbance weight added and removed instantly at different points on the boat. The finalized controller performance from demonstration two is presented in Figure 4.4. During the demonstration, a weight was added and removed in a non-realistic manner, as it appears instantly out of nowhere. This allows for demonstrating the finalized controller’s performance by pushing it to the limit and displays its robustness since it introduces sudden large disturbances. Based on the conducted demonstrations and the analysis of the results, it can be said that the finalized controller is stable and robust and that it is a well performing system. 4.5.3 Demonstration 3 This demonstration was conducted with no extra weight and windy sea conditions. Windy sea conditions consist of a disturbance wind at 20 m/s that affects the boat 24 4. Results by pushing it from different directions, while also generating larger waves on the simulated ocean surface. The results of the controlled states while manually driving the boat can be seen in Figure 4.5. Figure 4.5: No disturbance weight added or removed. Windy sea conditions. During this demonstration, the result displays a sub-optional performance. The pitch and heave plots in Figure 4.5 indicate that the control was unable to effectively regulate the states of the model during windy conditions. The magnitudes of the oscillations are large, displaying poor control of the boat. Therefore hydrofoiling during windy seas is not recommended. 25 4. Results 26 5 Discussion This chapter provides a discussions of the thesis, were especially the key findings are highlighted and their relation to the thesis progress. This thesis has been carried out and conducted in order to achieve the objec- tives and to answer the research questions, stated in section 1.2.1 of the introduction. As a reminder, the research questions are provided down below: • What factors determine the feasibility of the provided design concept and how can they effectively be adjusted for better performance? • How can robustness be verified for a proposed controller? • What are the most effective methods to develop a controller for the specified hydrofoil system? 5.1 Key findings The most significant finding in this thesis is the effectiveness of the FFC algorithm. The functionality that FFC provides plays a crucial role in the performance of the finalized controller, by supplying additional information from the model to the controller. The generation of lift force is essential, therefore it is crucial for the total lift force by the hydrofoils to match the gravitational force acting on the boat. Since the hydrofoil areas of the front and rear hydrofoils contribute with different amounts of lift force for a given AoA, it is important to ensure that the hydrofoils collectively provide a total lift force for the boat to stay at a constant heave. FFC ensures that the appropriate amount of lift force is generated by the front hydrofoil and simultaneously accounting for the influence on heave caused by the rear hydrofoils, thereby maintaining the model at the desired heave setpoint. The output from the FFC algorithm is reflected by a delta angle, which is based on the lift force generated by the rear hydrofoils, the velocity of the fluid across the wings, the pitch of the boat, and the current angle of the front hydrofoil. The delta angle indicates the compensation angle needed for the front hydrofoil set angle, in order to prevent over-generation or under-generation of lift force, which highlights the significance of FFC and what makes it invaluable. During the flight controller development, the pitch and heave control was sep- arated. This separation, significantly decreased the complexity of the controller throughout the entire development process. Therefore, the separation of these con- trols emerged as a key finding as well. In the early trial stages, attempts were made 27 5. Discussion to control the pitch state using both front and rear hydrofoils, and to simultane- ously control the heave state using both the front and rear hydrofoils. However, this resulted in poor controller performance as the control signals interfered with each other. While it was possible to control one signal, such as achieving the pitch setpoint or the heave setpoint separately, attempting to manage both at the same time was not encouraging as it often lead to large oscillations of the heave and pitch states, ergo the boat jumped and dived in the water. Considerable effort was dedicated to resolving this control issue by adjusting the corresponding PID parameters to optimize their values, where it became appar- ent that solving this particular control issue was complex. An optimization of PID parameters would only apply to this specific setup in Unity, as such a tuning is not scalable, and therefore the parameters would have to be re-tuned for a differently sized boat or if the controller is to be applied to a real hydrofoil boat. As a result, a separation of the control was made: the rear hydrofoils control pitch, and the front hydrofoil controls heave. This separation contributed to reducing complexity, how- ever it did not yield immediate progress. Another significant aspect of the separation was that it lead to new strategies during development of the flight controller. 5.2 Relating the key findings to the complexity of a hydrofoil, and the research questions The impact of a controller in a hydrofoil boat is significantly greater in comparison to a controller in a traditional boat. The controller must be developed to manage the boat being foilborne at a narrow heave interval in the water, which is a mix of both traditional boat motion and flight motion. As the hydrofoil boat transitions into foilborne mode, it relies on the controller to adjust the hydrofoil set angles to generate appropriate lift force, and enabling the boat to gain height. The controller does not only facilitate the transition into foilborne mode, but maintains the boat’s stability during cruising. Simultaneously, is needs to ensure stability when passen- gers move around on the boat, and needs to provide a smooth and comfortable experience during cruising and turning. Additionally, the controller needs to handle accelerations and decelerations. Regarding the key findings, the finalized controller demonstrates robustness during various conditions in the simulation environment. It is important to note that designing a controller in a real boat involves additional aspects, but within the conducted simulation environment the finalized controller proves successful. The regulation of pitch, roll, and heave states has emerged as crucial factors in ensuring feasibility of the design concept, especially the connection between pitch and heave and how they influence each other. Several factors determine the feasibility of the proposed design concept. From a parameter perspective, the control of the hydrofoil AoAs play a crucial role in general, and in the lift force equations, along with velocity. These two parameters significantly affect the generated lift force. Other parameters also have an impact, like the location of the center of mass, but their influence is not as significant as the AoA and velocity. This was demonstrated during the trials, in which a large weight 28 5. Discussion was added at different locations on the boat, effectively shifting the center of mass, and this did not have a significant impact on the controller. A high AoA and high velocity together can generate lift that allows the boat to go foilborne highlighting the significance of these parameters. However, the desired approach to foilborne motion is typically achieved with the smallest possible AoA at a given velocity, to reduce resource consumption by minimizing drag resistance. Thereby, the AoA not only plays a crucial role in lift force generation, but also in reducing drag during driving. Therefore, the AoA becomes a parameter of utmost importance in the feasibility of the proposed design concept. This implies that the significant states are controlled by adjusting the crucial parameter, the AoA, which has proven essential when working with the hydrofoil technique. This reiterates the role of the findings in influencing the adjustment of the AoA for the optimal efficiency and performance, providing an answer to the first research question. In other words, the given hydrofoil design can be determined feasible so long as the AoAs can be adjusted sufficiently to generate appropriate lift and reduced drag. The key findings have been essential during development of the controller, significantly contributing to its overall success. The verification of a controller’s robustness can be accomplished through various methods. Since the finalized con- troller regulates three states, it was of great interest to analyze the behavior of these three states when the boat is subjected to both reasonable and unreasonable dis- turbances. Assessing the controller’s performance during unreasonable disturbances is particularly important, as it provides insights into where its limits lie. This ar- gument aligns with the second research question, how robustness can be verified for a proposed controller. Verification has involved testing, exposing the boat to calm and windy weather conditions, adding and removing weight in different loca- tions of the boat and analyzing the state control performance. Not much effort has been put into optimal tuning of the finalized controller, as it was evident during the demonstrations that the controller had good performance over a broad range of PID parameters. This further argues for the fact that the controller and its setup is robust and stable. Considering this project’s development of a successful controller, utilizing the key findings, the methods employed can be regarded as effective and optimal in re- lation to the third research question. Although the controller currently only works within the simulation environment, it is indeed functional. Ideally, a more com- prehensive approach would involve a deeper examination of existing controllers for hydrofoil systems and build upon them. However, since the boat industry utilizing the hydrofoil technique is in its early stages of reinnovation, existing controllers for such systems are rare, and either not publicly available or build upon old technolo- gies making boat builders in this industry to often develop their own controllers. An accurate simulation environment is crucial for early development of such a system, as building and testing on a real boat can be both expensive and also unsafe for persons involved. Therefore, finding a suitable simulation environment is most effective. This is where the advantage of using a game engine like Unity becomes apparent, as it provides an accurate physics environment along with visu- alization during testing; as opposed to other simulation environments that might 29 5. Discussion require building up all physics involved from scratch, and also might only output plots for visualization. Developing a controller for a new hydrofoil system can be complex, as the physics involved can be computationally demanding. A simula- tion environment that allows for simplification of these physics, and verification of whether said simplifications are reasonable, is advantageous. Unity allows for this as one can make a change in the physics involved with some object, and observe how the object behaves afterwards in real-time. Therefore, conducting development in Unity can be said to be one of the most effective methods to develop a controller for the specified hydrofoil system. Key findings provides solution to research questions and the hydrofoil com- plexity 5.3 Reflection of demonstration results In this section, the results from the demonstrations described in section 4.5 are dis- cussed. Demonstration 1 - The performance of the pitch and heave control are of highest interest since they both affect the stability in the forward direction of movement. It is evident that these states exhibited similar performance, in the sense that they are similarly responsive in the time domain. Both the pitch and heave states are subject to small oscillations during the demonstration, but this is to be expected as an ocean environment is dynamic and chaotic. Before having a functional controller, the same oscillations were observed, but their magnitudes were much greater. The oscillations are further also a result of the connection between pitch and heave; as pitch is being adjusted by the rear hydrofoils, the AoA of the front hydrofoil changes, resulting in a change in lift. This change in lift gets the boat slightly off its heave setpoint, which however is quickly adjusted by the heave control. Tuning could po- tentially minimize these oscillations, however their frequencies and magnitudes are at this point acceptable. Pitch for example has an oscillatory frequency of about one Hz, and a magnitude of less than one degree during cruising, after the transi- tion into foiling mode has settled. Additionally, the heave state is directly affected by the changing wave height, and these waves are also being hydrofoiled over at high speeds. The large spikes at the beginning of the demonstration are due to the transition into foiling mode. As for the roll plot in Figure 4.3, it is evident that the performance of roll control is high. The actual roll value follows the setpoint well, which is changing due to the turns being banked. It can be observed that the roll signal experiences a slight overshoot during a turn, but this can be fixed with further tuning of the PID parameters. This result is also indicative of the performance in the sense that it can retain its setpoint well during banked turns. At around 42-55 seconds there is intense manual turning, which also leads to higher magnitudes of the pitch and heave oscillations at those times. Regarding robustness, no state diverges away from its respective setpoint even during the intense turning. Demonstration 2 - After analyzing the results of demonstration two, it can be 30 5. Discussion observed from the plots that the states are fairly stable even with a large weight disturbance added and removed from the boat. It can be said that the controller is robust and performs well even when dealing with large disturbances. It is worth noting that a heavier weight contributes to larger overshooting in the roll and gener- ally larger oscillations during occurrences, which is expected. However, upon closer inspection of the plot results, it becomes evident that the controller’s adaptability performs well, rendering the impact of the weight more or less negligible. In general, it can be said that a heavier disturbance weight does not have a significant impact on the controller’s stability, thereby displaying its robustness. Demonstration 3 - The controller does not perform well in windy conditions. This is most evident in the roll plot, as this state was well controlled in the other demonstrations. In this demonstration, driving without turning caused the roll state to oscillate, thereby hindering the controller’s ability to achieve a well performing and robust behavior in straight forward motion. It is reasonable to expect that the controller would find it more challenging to regulate the three DoF in such condi- tions, as the waves have larger magnitudes that generate more disturbance forces on the model. There is also a disturbance of wind present that further pushes on the hull of the boat, which randomly increases and decreases between the values zero and 20 m/s, and also changes direction. However, the major impact is from the waves, which make it difficult for the model to regulate heave, which further impacts all other states. The less than optimal performance does provide an oppor- tunity to improve the controller’s performance during windy conditions. However, hydrofoiling during windy conditions is not recommended in the first place. During such conditions the boat should instead be set to traditional boating mode, in which the hydrofoils fold into resting positions. 5.4 Roll setpoint and PID parameters One aspect to include in the roll control is the consideration of the centripetal force that occur during turns. To achieve optimal control in terms of comfort, this force must be taken into account when regulating roll. Currently, the regulation of roll does not account for the centripetal forces, which could compromise the goal of achieving control that enables maximum comfort. While the current regulation of roll control is functional in the simulation environment and provides the ability to perform banked turns, it lacks the aspect of incorporating velocity into the equation. For a given turning radius, a higher velocity turn requires a steeper angled banked turn compared to a slower velocity turn, for maximum comfort. Incorporating ve- locity into the calculation of the roll setpoint requires further development. Simply having the steering angle as the roll setpoint was a simple solution and provided apparent sufficient comfort performance at this stage in development. Additionally, it is hard to tell how comfortable a ride experience is from a computer simulation, even with good visualization. Thereby, optimizing comfort to such a degree would be a good area to focus on when working on a real boat. During the development of the finalized controller, it was observed that the PID parameters did not have a significant impact on the controller. The parameters 31 5. Discussion were adjusted to investigate whether tuning them would improve the controller’s performance. However, the results showed that changing the values of the PID parameters within a certain range did not result in any major effects, improvements or deviations. Consequently, the parameters were set to values that allowed the system to perform well, without any extensive effort put into optimizing them. As previously mentioned, this is a sign of having a stable system and controller setup. Further tuning on a real system could potentially improve the performance of the controller. 5.5 Addressing the research questions As stated in the problem statement in Section 1.2, this project was offered an op- portunity to innovate and develop an effective controller for managing a hydrofoil control system. This statement has guided the direction of the project by defining research questions that contribute to its progress. The fundamental research ques- tions are outlined in Section 1.2.1. While the key findings may not instantly answer these questions, they have played a significant role in supporting and influencing the development of the finalized controller, thereby paving the road towards answering these questions. Considering Section 1.2.1, the proposed design concept has been tested in a simulation environment using a model with changeable parameters, like for example coefficients in physical equations, and a realistic sea environment, de- rived from a previous project. The model was tested by driving around without a controller, and it was observed that this approach would be feasible in aiding with the development of a controller. During development, it became evident that the states roll, pitch, and heave are the most important states that need to be controlled. Therefore, controlling these states became the focus of the project, and further the fine adjustments of each hydrofoil’s AoA became the key to producing a controller with feasible performance. The finalized controller demonstrates that the design concept is feasible, as a developed controller was able to control the system in a stable and robust manner. However, the method employed demonstrates that there still is room for further development of a flight controller, both in terms of performance enhancement, and also in applying it in a real boat. Throughout this thesis, only one approach, namely visual inspection in the simulation environment, was conducted to evaluate the per- formance for optimal comfort. Comfort is most effectively evaluated through the full experience of being a driver/passenger in a real boat, while most effort throughout this project was put into innovating a functional controller. Furthermore, creat- ing robustness tests in the simulation environment posed a challenge as achieving realistic unstable conditions is not straight forward. Nevertheless, the completed robustness tests were considered sufficiently reliable in assessing the finalized con- troller’s robustness. The key findings have made the controller achievable, aligning with the project’s expectations of developing a controller that successfully utilizes the hydrofoil tech- nique to achieve foilborne motion and robustness. In addition to accomplishing this objective, the key findings have also contributed in providing answers to the research questions. 32 6 Conclusion This chapter provide the conclusion of this thesis, followed by future works. Before addressing the conclusion, a summary of the problem statement is recalled: The problem with hydrofoil boats is that they have not yet been widely adopted. This also creates problems with the availability of existing controllers for a hydrofoil con- trol system. As a result, there is an opportunity for innovation in developing a controller that effectively manages a hydrofoil control system. Because of lacking availability of existing controllers, as stated in the problem state- ment, this project was provided an opportunity to innovatively develop a controller. This entailed the main objective of this project, which was to develop a controller for a hydrofoil system. Therefore, a structure was built based on research ques- tions, which the work has been centered around, and it can be concluded that the development of the controller has yielded answers to these questions. It can further be concluded that this project has successfully achieved a con- troller for a hydrofoil system in a simulation environment. This is supported by the presented key findings in Section 5.1 and the demonstration results in Section 4.5. Given the key findings, demonstration results, and the discussion in Section 5.3, it can be demonstrated that a controller was able to regulate the system with robust performance during calm sea conditions, while there still is room for improvement in tuning its performance for improved comfort, and for being able to perform more optimized banked turns in terms of comfort. 1. RQ: What factors determine the feasibility of the provided design concept and how can they effectively be adjusted for better performance? It has been evident that a hydrofoil system is complex and is dependent on a lot of factors, but an effective control of roll, pitch and heave has been shown to be crucial for a hydrofoil boat system. This leads to the subject of the AoA, which also is a crucial and important factor, since it is due to its adjustment that the system can be optimized for better performance of the provided de- sign concept. 2. RQ: How can robustness be verified for a proposed controller? 33 6. Conclusion One approach to verify, can be as described in Section 3.5.8, by exposing the controller to exaggerated disturbances to verify the flight controller’s adapt- ability to sudden changes in the system and to evaluate its performance at such instances. Another verification method can be to evaluate how sensitive the controller is to a change in its parameters. This project has discovered that the final controller is able to control the system in a stable manner over a broad range of tuning parameters, the PID-parameters, as opposed to how the controller behaved during early development. Thereby the evaluation of a controllers range of stable parameters can be another method to verify its robustness. 3. RQ: What are the most effective methods to develop a controller for the specific hydrofoil system? In conclusion, this project has successfully developed a controller for regu- lating a hydrofoil boat. The methods employed have proven to be effective and optimal. Although the controller currently operates solely within the sim- ulation environment, it functions as intended. Given the state of the hydrofoil boat industry, there is a lack of existing controllers for such systems, neces- sitating boat builders to create their own. To facilitate early development, a suitable simulation environment is vital, as real-world testing is expensive and unsafe. Unity, a game engine, offers an accurate physics environment and vi- sualizations, unlike other simulation environments that might require building physics from scratch and potentially provide worse visualizations, like for ex- ample plain plots. Additionally, the complex nature of developing a controller for a new hydrofoil system, particularly considering fluid dynamics, demands a simulation environment that allows for simplified physics and verification. Unity satisfies these requirements, allowing for real-time observation of object behavior after making changes to the physics involved. Consequently, utilizing Unity, or any other game engine, for development purposes is deemed one of the most effective methods for creating a controller for the specified hydrofoil system. 6.1 Future works The first aspect to take into consideration when addressing potential future works is the roll control, as its setpoint currently is regulated simply by the steering angle of the jets. While this approach proves satisfactory in the simulation environment, it is crucial to more thoroughly consider the centripetal forces in order to enhance comfort and ride experience. An improvement would consider both the turn radius of a turn, and the velocity at which it is performed. A second aspect to assess is the regulation of the transition into foilborne mode. The transition proves functional in the simulation environment, as evident in 34 6. Conclusion the results. However, this functionality relies on an increase in velocity, as the boat has to reach about 15 knots before being able to generate enough lift. Currently the controller does not have any transition mode, it simply tries to constantly achieve the heave setpoint, even when it is impossible at low speeds. An approach to address this would be to investigate the transition mode more in detail and study how the controller can be adapted to have an activation state, and also gain the ability to intelligently enter foiling mode in a smooth manner. Since the finalized controller is in its newly developed phase, there is room for further improvement through examination of other commonly used controllers. Comparing and analyzing these controllers can lead to system enhancements. In a thesis by F.Barkrot’s and M.Berggren’s [16], the authors implemented a neural network controller for an inverted pendulum system. Considering that roll control can be viewed as an inverted pendulum system, it would be interesting to explore the implementation and potential benefits of this approach for a hydrofoil system. Additionally, incorporating machine learning into the controller for improvement would also be an interesting approach. Given that the finalized controller relies on PID controllers, applying machine learning to optimize aspects, such as the PID parameters, or the control of roll, to facilitate a comfortable ride experience could be of interest. Another interesting aspect to consider is the integration of an artificial intel- ligent agent to pilot the boat. This addition could significantly improve the ride experience, as it could take some of the work off the driver. However, this would be a challenging task as it would require attaining training data, and a way for the agent to gain rewards from its actions throughout its training. An initial step to- wards this approach could be to examine the work of O.Benderius et al. [17] in their paper, which delves into the Reeds dataset. The Reeds dataset offers a massive-scale of data obtained from a variety of several sensors. Currently, the data is acquired from using a boat, enabling the capture of highly dynamic kinematics. The aim with of the Reeds data set, as stated by the authors, is "To provide demanding bench- mark opportunities for algorithms", which could become a useful tool to evaluate algorithm performance to develop a potential auto pilot system. 35 6. Conclusion 36 Bibliography [1] Gustaver, M. (2020) A Chalmers University of Technology Master’s thesis tem- plate for LATEX. Unpublished. [2] T.Rosado, "Hydrofoils," http://web.mit.edu. [Online]. Available: http://web. mit.edu/2.972/www/reports/hydrofoil/hydrofoil.html. [Accessed: 01- Feb-2023]. [3] "Hydrofoil," Wikipedia, 26-Jan-2023. [Online]. Available: https://en. wikipedia.org/wiki/Hydrofoil. [Accessed: 01-Feb-2023]. [4] “Enrico Forlanini,” Wikipedia, 11-May-2022. [Online]. Available: https://en. wikipedia.org/wiki/Enrico_Forlanini. [Accessed: 01-Feb-2023]. [5] "Category: Type Meteor hydrofoils," Wikimedia Commons, 07-June-2021. [On- line]. Available: https://commons.wikimedia.org/wiki/Category:Type_ Meteor_hydrofoils. [Accessed: 02-Feb-2023]. [6] G.Krebs, "What is foil surfing? all about the evolution of surf," Wind- Foil Zone, 05-Mar-2021. [Online]. Available: https://windfoilzone.com/ what-is-foil-surfing/. [Accessed: 01-Feb-2023]. [7] "America’s Cup yacht hydrofoils," www.eng.ed.ac.uk, [Online]. Avail- able: https://www.eng.ed.ac.uk/studying/postgraduate/research/phd/ america%E2%80%99s-cup-yacht-hydrofoils. [Accessed: 01-Feb-2023]. [8] H.Strömqvist, "Robust motion control strategies for hydrofoil-equipped naval vessels considering scaling effects," DIVA, 30-Oct-2019. [Online]. Available: https://www.diva-portal.org/smash/record.jsf?dswid= 7873&pid=diva2%3A1366642&c=1&searchType=SIMPLE&language=sv&query= Robust+motion+control+strategies+for+hydrofoil-equipped+naval+ vessels+considering+scaling+effects&af=%5B%5D&aq=%5B%5B%5D%5D& aq2=%5B%5B%5D%5D&aqe=%5B%5D&noOfRows=50&sortOrder=author_sort_ asc&sortOrder2=title_sort_asc&onlyFullText=false&sf=all. [Accessed: 01-Feb-2023]. [9] R.Bencatel, S.Keerthivarman, I.Kolmanovsky, and A.Girard, "Full state feedback foiling control for America’s cup catamarans," www.researchgate.net, 2020. [Online]. Available: https://www.researchgate.net/publication/ 338376580_Full_State_Feedback_Foiling_Control_for_America’s_Cup_ Catamarans. [Accessed: 01-Feb-2023]. [10] E.B.Piene, "Disturbance rejection of a High Speed Hydrofoil Craft using a Frequency Weighted H2-Optimal Controller," ntnuopen.ntnu.no, 2018. [On- line]. Available: https://ntnuopen.ntnu.no/ntnu-xmlui/handle/11250/ 2499672. [Accessed: 01-Feb-2023]. 37 http://web.mit.edu/2.972/www/reports/hydrofoil/hydrofoil.html http://web.mit.edu/2.972/www/reports/hydrofoil/hydrofoil.html https://en.wikipedia.org/wiki/Hydrofoil https://en.wikipedia.org/wiki/Hydrofoil https://en.wikipedia.org/wiki/Enrico_Forlanini https://en.wikipedia.org/wiki/Enrico_Forlanini https://commons.wikimedia.org/wiki/Category:Type_Meteor_hydrofoils https://commons.wikimedia.org/wiki/Category:Type_Meteor_hydrofoils https://windfoilzone.com/what-is-foil-surfing/ https://windfoilzone.com/what-is-foil-surfing/ https://www.eng.ed.ac.uk/studying/postgraduate/research/phd/america%E2%80%99s-cup-yacht-hydrofoils https://www.eng.ed.ac.uk/studying/postgraduate/research/phd/america%E2%80%99s-cup-yacht-hydrofoils https://www.diva-portal.org/smash/record.jsf?dswid=7873&pid=diva2%3A1366642&c=1&searchType=SIMPLE&language=sv&query=Robust+motion+control+strategies+for+hydrofoil-equipped+naval+vessels+considering+scaling+effects&af=%5B%5D&aq=%5B%5B%5D%5D&aq2=%5B%5B%5D%5D&aqe=%5B%5D&noOfRows=50&sortOrder=author_sort_asc&sortOrder2=title_sort_asc&onlyFullText=false&sf=all https://www.diva-portal.org/smash/record.jsf?dswid=7873&pid=diva2%3A1366642&c=1&searchType=SIMPLE&language=sv&query=Robust+motion+control+strategies+for+hydrofoil-equipped+naval+vessels+considering+scaling+effects&af=%5B%5D&aq=%5B%5B%5D%5D&aq2=%5B%5B%5D%5D&aqe=%5B%5D&noOfRows=50&sortOrder=author_sort_asc&sortOrder2=title_sort_asc&onlyFullText=false&sf=all https://www.diva-portal.org/smash/record.jsf?dswid=7873&pid=diva2%3A1366642&c=1&searchType=SIMPLE&language=sv&query=Robust+motion+control+strategies+for+hydrofoil-equipped+naval+vessels+considering+scaling+effects&af=%5B%5D&aq=%5B%5B%5D%5D&aq2=%5B%5B%5D%5D&aqe=%5B%5D&noOfRows=50&sortOrder=author_sort_asc&sortOrder2=title_sort_asc&onlyFullText=false&sf=all https://www.diva-portal.org/smash/record.jsf?dswid=7873&pid=diva2%3A1366642&c=1&searchType=SIMPLE&language=sv&query=Robust+motion+control+strategies+for+hydrofoil-equipped+naval+vessels+considering+scaling+effects&af=%5B%5D&aq=%5B%5B%5D%5D&aq2=%5B%5B%5D%5D&aqe=%5B%5D&noOfRows=50&sortOrder=author_sort_asc&sortOrder2=title_sort_asc&onlyFullText=false&sf=all https://www.diva-portal.org/smash/record.jsf?dswid=7873&pid=diva2%3A1366642&c=1&searchType=SIMPLE&language=sv&query=Robust+motion+control+strategies+for+hydrofoil-equipped+naval+vessels+considering+scaling+effects&af=%5B%5D&aq=%5B%5B%5D%5D&aq2=%5B%5B%5D%5D&aqe=%5B%5D&noOfRows=50&sortOrder=author_sort_asc&sortOrder2=title_sort_asc&onlyFullText=false&sf=all https://www.diva-portal.org/smash/record.jsf?dswid=7873&pid=diva2%3A1366642&c=1&searchType=SIMPLE&language=sv&query=Robust+motion+control+strategies+for+hydrofoil-equipped+naval+vessels+considering+scaling+effects&af=%5B%5D&aq=%5B%5B%5D%5D&aq2=%5B%5B%5D%5D&aqe=%5B%5D&noOfRows=50&sortOrder=author_sort_asc&sortOrder2=title_sort_asc&onlyFullText=false&sf=all https://www.researchgate.net/publication/338376580_Full_State_Feedback_Foiling_Control_for_America's_Cup_Catamarans https://www.researchgate.net/publication/338376580_Full_State_Feedback_Foiling_Control_for_America's_Cup_Catamarans https://www.researchgate.net/publication/338376580_Full_State_Feedback_Foiling_Control_for_America's_Cup_Catamarans https://ntnuopen.ntnu.no/ntnu-xmlui/handle/11250/2499672 https://ntnuopen.ntnu.no/ntnu-xmlui/handle/11250/2499672 Bibliography [11] Candela, 17-Jan-2023. [Online]. Available: https://candela.com/. [Accessed: 03-Feb-2023]. [12] "Navier-stokes equations, 13-May-2021. [Online]. Available: https://www.grc. nasa.gov/www/k-12/airplane/nseqs.html. [Accessed: 30-May-2023]. [13] Bernoulli’s principle SKYbrary Aviation Safety. [Online]. Available: https:// www.skybrary.aero/articles/bernoullis-principle. [Accessed: 30-May- 2023]. [14] Lift to drag ratio - glenn research center NASA, 21-July-2022. [Online]. Avail- able: https://www1.grc.nasa.gov/beginners-guide-to-aeronautics/ lift-to-drag-ratio/. [Accessed: 26-May-2023]. [15] Nvidia, [Online]. Available: https://developer.nvidia.com/physx-sdk. [Ac- cessed: 27-Apr-2023]. [16] F.Barkrot and M.Berggren, "Using machine learning for control systems in transforming environments," DIVA, 24-Jun-2020. [Online]. Avail- able: http://www.diva-portal.org/smash/record.jsf?dswid=-7829& pid=diva2%3A1446105&c=1&searchType=SIMPLE&language=sv&query= Using+machine+learning+for+control+systems+in+transforming+ environments&af=%5B%5D&aq=%5B%5B%5D%5D&aq2=%5B%5B%5D%5D&aqe= %5B%5D&noOfRows=50&sortOrder=author_sort_asc&sortOrder2=title_ sort_asc&onlyFullText=false&sf=all. [Accessed: 01-Feb-2023]. [17] O.Benderius, C.Berger and K.Blanch, "Are we ready for beyond- application high-volume data? The Reeds robot perception bench- mark dataset*," www.research.chalmers.se, 16-Sep-2021. [Online]. Avail- able: https://research.chalmers.se/publication/526057/file/526057_ Fulltext.pdf. [Accessed: 23-May-2023]. 38 https://candela.com/ https://www.grc.nasa.gov/www/k-12/airplane/nseqs.html https://www.grc.nasa.gov/www/k-12/airplane/nseqs.html https://www.skybrary.aero/articles/bernoullis-principle https://www.skybrary.aero/articles/bernoullis-principle https://www1.grc.nasa.gov/beginners-guide-to-aeronautics/lift-to-drag-ratio/ https://www1.grc.nasa.gov/beginners-guide-to-aeronautics/lift-to-drag-ratio/ https://developer.nvidia.com/physx-sdk http://www.diva-portal.org/smash/record.jsf?dswid=-7829&pid=diva2%3A1446105&c=1&searchType=SIMPLE&language=sv&query=Using+machine+learning+for+control+systems+in+transforming+environments&af=%5B%5D&aq=%5B%5B%5D%5D&aq2=%5B%5B%5D%5D&aqe=%5B%5D&noOfRows=50&sortOrder=author_sort_asc&sortOrder2=title_sort_asc&onlyFullText=false&sf=all http://www.diva-portal.org/smash/record.jsf?dswid=-7829&pid=diva2%3A1446105&c=1&searchType=SIMPLE&language=sv&query=Using+machine+learning+for+control+systems+in+transforming+environments&af=%5B%5D&aq=%5B%5B%5D%5D&aq2=%5B%5B%5D%5D&aqe=%5B%5D&noOfRows=50&sortOrder=author_sort_asc&sortOrder2=title_sort_asc&onlyFullText=false&sf=all http://www.diva-portal.org/smash/record.jsf?dswid=-7829&pid=diva2%3A1446105&c=1&searchType=SIMPLE&language=sv&query=Using+machine+learning+for+control+systems+in+transforming+environments&af=%5B%5D&aq=%5B%5B%5D%5D&aq2=%5B%5B%5D%5D&aqe=%5B%5D&noOfRows=50&sortOrder=author_sort_asc&sortOrder2=title_sort_asc&onlyFullText=false&sf=all http://www.diva-portal.org/smash/record.jsf?dswid=-7829&pid=diva2%3A1446105&c=1&searchType=SIMPLE&language=sv&query=Using+machine+learning+for+control+systems+in+transforming+environments&af=%5B%5D&aq=%5B%5B%5D%5D&aq2=%5B%5B%5D%5D&aqe=%5B%5D&noOfRows=50&sortOrder=author_sort_asc&sortOrder2=title_sort_asc&onlyFullText=false&sf=all http://www.diva-portal.org/smash/record.jsf?dswid=-7829&pid=diva2%3A1446105&c=1&searchType=SIMPLE&language=sv&query=Using+machine+learning+for+control+systems+in+transforming+environments&af=%5B%5D&aq=%5B%5B%5D%5D&aq2=%5B%5B%5D%5D&aqe=%5B%5D&noOfRows=50&sortOrder=author_sort_asc&sortOrder2=title_sort_asc&onlyFullText=false&sf=all http://www.diva-portal.org/smash/record.jsf?dswid=-7829&pid=diva2%3A1446105&c=1&searchType=SIMPLE&language=sv&query=Using+machine+learning+for+control+systems+in+transforming+environments&af=%5B%5D&aq=%5B%5B%5D%5D&aq2=%5B%5B%5D%5D&aqe=%5B%5D&noOfRows=50&sortOrder=author_sort_asc&sortOrder2=title_sort_asc&onlyFullText=false&sf=all https://research.chalmers.se/publication/526057/file/526057_Fulltext.pdf https://research.chalmers.se/publication/526057/file/526057_Fulltext.pdf A Appendix A.1 Lift and drag coefficients Contains the lift and drag coefficients for the wings. The lift coefficient for the front wing can be found in Chapter 3.4. Figure A.1: Lift coefficient diagram of rear hydrofoil I A. Appendix Figure A.2: Drag coefficient diagram of front hydrofoil II A. Appendix Figure A.3: Drag coefficient diagram of rear hydrofoil III DEPARTMENT OF SOME SUBJECT OR TECHNOLOGY CHALMERS UNIVERSITY OF TECHNOLOGY Gothenburg, Sweden www.chalmers.se www.chalmers.se List of Acronyms Nomenclature List of Figures List of Tables Introduction Background CPAC Systems Hydrofoil boats on the market Problem statement Purpose and research questions Deliminations Theory Physics and forces in hydrofoil boat simulation Angle of attack and wing set angles Stall region Flight control system PID control Architecture Front foil compensation Simulation Methods Hydrofoil Boat model Control strategy Reality vs simulation responsiveness Approximating coefficients for hydrofoil performance Overcoming complexity in the development of a hydrofoil boat flight controller Trial 1: developing PID controllers Trial 2: separating pitch and heave influence and filter selection Trial 3: repositioning the front hydrofoil wing Trial 4: analysis of hydrofoil control using cheat force Trial 5: implementation of FFC Trial 6: implementation of roll control Trial 7: implementation of agile setpoint for roll control Trial 8: robustness testing of control system Results Roll Pitch Heave Finalized controller Performance and robustness demonstrations of the finalized controller Demonstration 1 Demonstration 2 Demonstration 3 Discussion Key findings Relating the key findings to the complexity of a hydrofoil, and the research questions Reflection of demonstration results Roll setpoint and PID parameters Addressing the research questions Conclusion Future works Bibliography Appendix Lift and drag coefficients