A ROBUST LINEAR DYNAMIC POSITIONING CONTROLLER FOR A MARINE SURFACE VEHICLE

The autonomous surface vehicle (ASV) owned by the University of Rhode Island currently uses a PID controller that is insufficient for its maneuvering goals. The goal was to develop a robust linear controller based on state space dynamic positioning models that is able to follow a given path with minimal error in the presence of environmental disturbances and model perturbations. A controller was designed for the linear Cybership II model in MATLAB and then tested in Simulink with these disturbances on a nonlinear Cybership II model. The linear controller uses a feedfoward inverse filter to follow a desired elliptical path with high accuracy and uses new methods for choosing feedback gains to provide greater H∞ robustness than MATLAB’s place function. It was found that these new methods tracked the desired ellipse with lower error than existing pole placement methods. These methods show promise for real world implementation of linear controllers on URI’s ASV and other surface vehicles.


Overview
As linear control techniques have advanced, little research has been done on linear control of marine systems. This is due to the inherent nonlinear nature of marine systems that arises from rotation in the global reference frame, changes in hydrodynamic properties at different speeds, and nonlinear wave disturbances [1]. Great advancements have been made in nonlinear marine control and these techniques are still being researched. While these control methods are impressive, their implementations are often limited to academic settings due to their complexity. Therefore, a reassessment of linear state space controllers [2] with updated design techniques could widen the accessibility of marine control to those with knowledge of linear state space control.
The first types of control systems that were developed were heading controllers after the gyrocompass was invented. These heading autopilots use a constant speed, a compass, and heading controller with feedback to steer. Position controllers were made possible after the invention of local and global positioning systems (GPS). This allowed for more advanced maneuvers such as waypoint tracking, trajectory tracking, and path following. Which type of controller that is used depends on the application, but the more interesting control problem involves precisely controlling position and orientation in a global reference frame. A common control system that is used frequently because of its simple implementation and lack of a need for a model is a proportional-integral-derivative (PID) controller. Gains for the controller can be adjusted until desired results are obtained. This non model-based approach is not very scientific and could take a while to tune gains. There exist methods [3] for choosing gains if various parame-ters are known, which can sometimes be difficult to determine. However, it is still useful when a quick controller is needed under relatively small disturbances and no previous model to build on. PID heading controllers can also be used with a simple heading model that uses a single rudder input [4] [5]. This approach needs only a few model parameters and there are well established methods for designing this controller [6].
Heading controllers fall short when doing precise waypoint navigation or path following. This is where position controllers become useful, allowing for much more complex maneuvers. This project will focus on these position controllers. Due to the hydrodynamics of marine vessels, many different state space models of varying complexity exist for use with position controllers [7]. Models that assume low operating speed or position holding are called dynamic positioning (DP) models [8], while higher speeds require more complex maneuvering models. This project's focus will be on DP models because the target vehicle will need to move at low speeds in order to do other processing. The linear DP model has been used successfully for marine control, but it has limited application because of a few assumptions. The DP model assumes low speed and low yaw rate in order for the state space model to be accurate. It is also important for the vehicle to be fully-actuated or over-actuated to generate forces in each direction. For example, in three degrees of freedom (x, y, heading), there needs to be at least three inputs that can apply forces in each direction. In state space control, the gain selection has a unique solution for single-input, singleoutput (SISO) systems using pole placement. The DP model in our case has three inputs for the forces in x and y directions, as well as about the z-axis. The model also has 3 outputs for the position, making the model multiple-input, multipleoutput (MIMO). In this case there are an infinite number of gain matrices, all of which yield the desired closed-loop pole locations. There are new techniques for selecting the gain matrix for maximum robustness and other techniques that improve tracking system accuracy. These new techniques have not been investigated in marine control literature [9].

Motivation
The ocean engineering department at the University of Rhode Island has an autonomous surface vehicle (ASV) that currently uses a primitive proportionalintegral-derivative (PID) controller. The use of this controller limits the maneuvering capabilities [10] of the vehicle and negatively impacts the vehicle's performance in the annual RoboBoat competition. It has been decide by the ASV team that an improved control system is needed to stay competitive in the annual RoboBoat competition.

Objective and Scope
The objective of this thesis is to develop a robust state space linear dynamic position controller that will improve the maneuverability of URI's ASV. Robustness is important because the linear controller will have to cope with the inaccuracies of the linear model and disturbances. New linear state space methods will be used that have not previously tested on marine vehicles. This includes the development of an inverse filter that will allow the tracking system to follow the desired input with increased accuracy and a method for choosing robust feedback gains based on pole placement [9]. These results will be compared to those commonly used in linear control design, such as MATLAB's place function.
Due to lack of modeling parameters for URI's ASV, testing will be done on a model of the Cybership II in Simulink [11]. The methods used in this thesis can be generalized to function with any fully-actuated marine surface vehicle. Simulation will be made realistic by including a nonlinear boat model, external disturbances, and measurement noise. The controller will be tested by following an elliptical path similar to [1]. Results will be analyzed based on how well the position and heading follow the desired track for each method under disturbances and model perturbations. [5] C.-Y. Tzang  In state space control, the time-domain system is modeled as a set of input, output, and state variables that are related by first-order differential equations. To use varying numbers of inputs, outputs, and states, it is useful to represent these as vectors. A linear time-invariant system can use matrices to express the differential and algebraic equations. This compact form (1) will be used throughout this thesis for continuous systems.ẋ

List of References
The vectors are u for input, y for output, and x for the state, where there are p inputs, q outputs, and n state variables. The A matrix is the n × n state matrix, B is the n × p input matrix, C is the q × n output matrix, and D is the q × p feedthrough matrix. Lastly,ẋ(t) is the time derivative of the state, x(t). All vectors and matrices in this thesis will be bold.
When implementing a state space controller, it is common to convert a model to discrete time based on a sampling time T . Then the controller can be updated at a fixed interval by a digital computer.
The continuous state matrix A and input matrix B are transformed into the discrete matrices Φ and Γ, while C and D remain the same for the discrete form.
The discrete state space equation (2) is obtained by calculating the zero-order hold for the continuous system, which can be done using (3).

State Space Control
Before beginning control design on a system, it is important to test the system to see if it is controllable. This will determine if control techniques can be used to stabilize the system. A common way to test this is to form the controllability matrix and check its rank.
If W c has full rank, the system is controllable. Note that in equation 4 the discrete system was tested, however, the controllability of the continuous system could also be checked. Similarly, observability can be be checked by forming the observability matrix in (5). If W o has full rank, then the system is observable.

Stability
A stable system is one that will not give unbounded output when given a bounded input. It is possible for this system to oscillate forever, but it will be remain bounded between some values. This is also known as bounded-input, bounded-output (BIBO) stability. A stronger form of stability is asymptotic stability. This is when a system's state, x(t), approaches an equilibrium point x e (usually 0) as t → ∞.
A simple way to determine the stability of a linear system is to look at the eigenvalues, or poles, of the A matrix. For continuous systems, the system is stable if the eigenvalues of A do not have positive real parts. The system is asymptotically stable if the eigenvalues of A have strictly negative real parts. For discrete systems, the eigenvalues of Φ (discrete form of A) must be inside or on the unit circle for stability. Asymptotic stability requires the eigenvalues to be inside the unit circle. Note that stability has nothing to do with robustness to modeling errors (see section 2.2.5) or how quickly the system reaches equilibrium.

Poles and Settling Time
The settling time of a system is how quickly the system reaches its equilibrium to within some percentage, usually 1% or 2%, and is determined by the location of the poles. Assuming a continuous system is stable, the more negative the real part of the poles are, the faster the response due to that pole will settle. For example, if a system has two poles, one at -12 and another at -3, the response of the pole at -3 will settle more slowly, making it the dominant pole and determining the system's overall settling time. Settling time for the pole at -3 can be estimated by using equation 6 for a tolerance of 1%.
Special types of poles that are known to have nice properties [1] are called Bessel poles. They are the roots of the Bessel polynomials and can be generated using the formula in equation 7.
The roots of each Bessel polynomial have different settling times. Normalizing these roots to one second settling time allows the roots be scaled to the desired settling time.
The normalized Bessel poles for polynomials n = 1 . . . 6 are given in Table 1

Control System Structures
For the simplest case, a system can have no controller applied to it. This is called the open-loop system because it has no feedback for control. This sys- Figure 1: An open-loop state space system. tem could be asymptotically stable, but we have no control over how quickly the system will settle. If the open-loop system is not stable, does not settle in the desired amount of time, or does not have desired robustness, then it is useful to introduce a feedback gain L to get desired pole locations, and therefore settling time. This is called a state-feedback regulator. A regulator will drive the system to an equilibrium point. This state-feedback regulator assumes that all states can be measured directly; i.e., C = I, and D = 0. To design the regulator, we choose Figure 2: A state-feedback regulator desired poles for the closed-loop system and calculate the gain matrix L to obtain a system that has those poles.
In many cases all of the states cannot be measured. To deal with this an observer needs to be designed that will use the input to the plant and its output to estimate the state. In addition to the state feedback gains, L, the observer gains, K, need to be calculated so that the observer settles quicker than the plant. This means that the plant states need to be estimated correctly before the system can be regulated to equilibrium. The architectures discussed so far have only been Figure 3: A state-feedback regulator with full order observer designed to regulate to a fixed equilibrium point. A more useful control system would be one that could be take a desired output for the plant and drive the output of the system to that reference input. This is called a tracking system. In a tracking system the output of the plant is subtracted from the desired output to obtain an error term. This error term is fed into what is called the additional dynamics block [1] to generate the needed input to the plant. The L gain for the entire system is now split into two parts, where the gain matrix L 1 is used to regulate the plant and has columns equal to the number of plant states, and L 2 is used for the additional dynamics and has columns equal to the number of plant outputs.
The additional dynamics A a and B a implement an integrator similar to the I term in PID controllers and can also reject disturbances if designed to do so. The next logical step would to combine the tracking system and observer to form an even more useful linear controller. A tracking system with an observer can follow any reference input with minimal measured states thanks to the work of the observer. Due to the separation principal in regards to control and estimation, the tracking system and observer can be designed separately. The closed-loop poles of the overall system are the tracking system poles L combined with the observer poles K. However, to obtain an observer-based tracking system with acceptable stability margins, the tracking system gains must be taken into account when calculating the observer gains.

Norms
A norm of a vector is the size or length of a vector in a vector space. The norm of a vector x is represented as x and has the following properties.
1. x = 0 iff x = 0 There are a few different types of norms. The L 2 norm is the most intuitive type of norm and is the distance from the origin to the vector x that arises from the Pythagorean theorem. The L p norm is a generalized norm that is equal to the L 2 norm for p = 2 and is defined for p ≥ 1. Lastly, there is the L ∞ norm, or maximum norm. For a vector u(t) = [u 1 (t)...u n (t)] the signal norms are as defined in equations 10-12.

Input-Output Stability and Robustness
A system H with input u(t) and output y(t) is said to be finite-gain L-stable if there exits a gain called δ < ∞ and a constant positive bias β such that equation 13 is satisfied. The T subscript stands for the truncation operator, which sets the continuous function u T (t) = 0 for t > T .
The gain δ is an upper bound and can be calculated for the case of L 2 signal norms. This result is called the system infinity norm of the system. If the system is described by the transfer function matrix G(jω), then the system infinity norm where σ 1 is the maximum singular value of a matrix. In other words, the G ∞ norm is the maximum singular value over all frequencies of the transfer function matrix G(jω). For SISO systems, this is the maximum value of the Bode magnitude plot.
For a state space model the transfer function matrix is shown in equation 15.
The H ∞ norm, when combined with the Small Gain Theorem (SGT) [2], allows us to define a measure of robustness for a control system. The SGT states that for two systems H 1 and H 2 connected as shown in figure 6, if δ 1 δ 2 < 1 then the system from u(t) = [u 1 (t) , u 2 (t) ] to y(t) = [y 1 (t) , y 2 (t) ] is finite gain stable. For this thesis, only the special case when u 2 = 0 is needed. The upper bound for δ 1 is maximized when δ 2 is minimum because the product of norms must be less than 1. Therefore, it can be concluded from the SGT that minimizing the H ∞ norm of H 2 will result in the largest allowable H ∞ norm of H 1 . If H 1 is an unknown perturbation of the plant model with norm of δ, then minimizing δ 2 results in the greatest stability robustness. This guarantees that the closed-loop system will be stable if

Marine Models
For marine vehicles, many models exist of varying complexity [3]. Marine systems are inherently nonlinear because of hydrodynamic forces being a function of velocity, the Coriolis effect at different velocities, rotation from body coordinates to global coordinates, and buoyancy forces. The most complex 6 degree of freedom (DOF) model for marine motion in body coordinates is expressed in equation 17.
All other models are justified simplifications of this motion model. It is rare that this model is used directly in control design because of its complexity. Instead, it is used for simulating the full dynamics of the system. The notation for marine vehicles and different model options will be discussed in the following sections.

Notation and Reference Frames
For a full 6 DOF system, the notation for positions, velocities, and forces that are defined by the Society of Naval Architects and Marine Engineers (SNAME) are presented in Table 2 rotation about x axis (roll) rotation about z axis (yaw) N r ψ The vehicle's position and orientation is represented by η, the vehicle's velocity in each direction is ν, and the forces acting on the vehicle are represented by τ .
These vectors allow the same equations to be used for different degrees of freedom.
Before jumping into all of the possible marine models, reference frames must be discussed. The two reference frames that are important for control on a small scale are the North-East-Down (NED) and body-fixed (BODY) reference frames.
The NED reference frame {n} = {x n , y n , z n } has origin o n and is defined as a tangent plane on the Earth's surface. The x n -axis points towards true North, the y n -axis points towards East, and the z n -axis points into the Earth. This causes the heading to be defined as positive clockwise about the origin and 0 degrees at true North. This reference frame is used for marine vehicles that stay at approximately the same latitude and longitude. In this thesis the NED reference frame will used

Rigid-Body Kinetics
The first part of equation 17 that will be discussed is the motions of rigid bodies derived from Newtonian physics [3]. These kinetics are represented by The M RB matrix is the rigid-body mass matrix and the C RB (ν) matrix is the In M RB , m is the mass of the vehicle, x g and y g are the distances to the center of gravity (CG) from body origin o b , and I z is the moment of inertia about the z b -axis. In practice the CG is on the y b -axis, making y g = 0. These variables are among the easiest to obtain because they can be measured directly. Methods for estimating I z can be found in [4].
Unlike the rigid-body mass matrix, the rigid-body Coriolis and centripetal matrix is not unique. In this paper the equation derived by Fossen in [3] will be used.
The C RB (ν) matrix in equation 22 is nonlinear and depends on the velocity of the vehicle.

Hydrodynamic Forces
The hydrodynamic effects result from the added mass and Coriolis-centripetal forces due to the rotation of the vehicle relative to the NED frame as well as viscous damping. Motion of a marine vehicle will induce some motion in the surrounding water, displacing it and then settling back after the vehicle has passed through. This gives the fluid kinetic energy, causing the added mass and Corioliscentripetal terms. Linear damping comes from potential damping and skin friction and nonlinear damping is caused by quadratic damping and higher order terms.
The hydrodynamic forces are combined in equation 23 where ν r is the relative is an irrotational ocean current. The full added mass matrix is expressed in equation 25.
The hydrodynamic derivatives in M A are consistent with SNAME notation. For example, the hydrodynamic added mass force X along the x-axis due to sway accelerationv is represented by Xv. The added mass matrix is positive semidefinite for a rigid body at rest or moving at positive forward speed. Methods for identifying these coefficients are presented in [5].
For the added Coriolis-centripetal matrix C A (ν), the full form is expressed in equation 26.
For most surface vehicles the surge and steering dynamics can be decoupled due to xz-plane symmetry. This reduces the added mass matrix to four unknowns shown in equation 27. Note that due to symmetry Nv = Yṙ.
This assumption also reduces the added Coriolis-centripetal matrix to equation 28.
The total damping on a marine vehicle can be split into linear damping and nonlinear quadratic damping. It is difficult to separate these effects in practice, but it is convenient for analysis and control.
The linear damping matrix D can be written in full using SNAME notation similar to M A . The difference is that the force is caused by velocity instead of acceleration.
Under the same assumption of xz-plane symmetry the damping matrix reduces to equation 31.
Nonlinear damping assuming xz-plane symmetry is shown in equation 32.
All of the hydrodynamic derivatives in this section are dependent on the path of the vehicle and vehicle velocities. If these values are determined during a specific maneuver under certain conditions, they may not be valid for other speeds or paths. Therefore it is important to design a robust controller that can handle the natural uncertainty and nonlinearity of these marine systems.

Dynamic Positioning Models
Dynamic Positioning (DP) models assume zero or low speed. The models presented in this section will be valid for low speed maneuvering up to 2 m/s [3].
The DP model can be derived from the advanced model shown in equation 17. The g 0 and g(η) terms that represent buoyancy and restoring forces can be dropped because they are not relevant for 3 DOF models. In addition, the rigid-body mass and added mass can be combined into one M matrix (33).
The rotation matrix can be simplified from the general rotation matrix J Θ (η) to the rotation matrix R(ψ) about the z-axis due to the reduction to 3 DOF.
This gives the nonlinear result in equation 35 which is suitable for simulation, but difficult to work with for control design.η The nonlinear DP equation can be linearized by making some assumptions. It is known that at zero speed, nonlinear damping can be ignored and control design can use linear damping D [3]. The relative velocity ν r can be ignored if ocean currents are treated as a slowly varying bias vector b which can be compensated by the integral action of the controller. To remove the rotation matrix the position η is typically replaced by vessel parallel coordinates η p .
The vessel parallel coordinate system [6] is used for designing linear controllers. It defines a fixed coordinate system that is translated to the desired position (x d , y d ) and rotated to the desired heading ψ d . The vessel parallel reference frame is temporary and changes based on the desired position input to the controller. Notice that for low yaw rates r ≈ 0 the rate of change of the vessel parallel position is approximately equal to velocity.
This results in the following linear DP model which will be used for the design of a state space controller.η

Thrusters
A simple thruster model assumes there is a way to generate a force in each direction, also known as fully actuated. It takes into account the limitations of propellers by modeling the actuators using time constants for each direction in the diagonal matrix A thr .
The time constants represent how quickly the thrusters reach their commanded input τ com . The higher the time constant, the slower the propeller is.
To get the generalized forces in each direction the vehicle must be fully actuated and have a thruster configuration matrix T c . This process is called control allocation. The configuration matrix has a column for each actuator that splits the force into components of surge, sway, and yaw. Some examples are below.
The distance from o b in the x and y direction for the i-th actuator is represented by l x i and l y i , respectively, and the angle of the i-th propeller is represented by α i . Each thruster is combined into T c and multiplied by a force coefficient matrix . . , K n ) and the control input u to get the desired thrust.

Current Marine Control Techniques
Industrial control systems tend to use linear control methods because of their simplicity and ease of implementation, while the majority of academic marine control techniques are nonlinear. A few reasons for this are discussed by Strand [7]. The inherent properties of the mechanical system are nonlinear and certain system properties can be exploited in nonlinear control design. Linearization is always an approximation, hence it is easier to design a robust controller with nonlinear design. Strand also argues that nonlinear control is simpler for marine systems because it requires no linearization or gain scheduling methods. Now that that has been said, this thesis will attempt to show that robust linear techniques will be sufficient for marine systems under certain operating conditions.

Nonlinear
A simple technique used in the MSS toolbox [8] is a nonlinear DP PID controller with a passive wave filter to prevent wear on thrusters. Adaptive control [9] has been implemented for the CyberShip II for a DP controller under wave disturbances. Fossen [3] presents many examples of DP control, including PID with acceleration feedback, linear quadradic optimal control, integrator backstepping , and sliding-mode control.

Linear
For reduced models, such as the linear Nomoto model [10], there has been significant research in the system identification of the Nomoto Indicies [11,12].
These models are often good enough for quick implementations of heading autopi-lots under constant forward velocity. This model is not sophisticated enough to achieve the maneuvering goals of URI's ASV and this thesis.
Linear DP controllers have been proposed using vessel parallel coordinates by Fossen [3] which will be investigated in this thesis.

List of References
[12] F. Azarsina  control example for the CyberShip II, and many other useful marine control blocks.
These Simulink blocks aided in the development of realistic marine simulations for testing state space control systems.

The Model
The maneuvering objectives of URI's ASV dictate that a DP model in 3 DOF should be used to design the control system. If the state of the model is assumed to be x = [η p , ν ] , the input is u = τ , and the position η p is measured, then the linear time-invariant state space model can be derived using the DP model in  (44).
An alternative representation includes the thrusters τ in the state x and uses the commanded thrust τ com (see section 2.3.5) as the input u. The state becomes x = [η p , ν , τ ] and u = τ com , making the model in (45).
Adding thruster dynamics to the model is a good approximation for the unknown behavior of the nonlinear thrusters. A controller designed with this model should be robust to unmodeled dynamics.
To fill in these models and design the controller, parameters need to be obtained for M and D. Thankfully, system identification has been done on the CyberShip II which is similar in size to the target ASV. A controller designed using these parameters should be able to serve as a guide for the URI ASV when its parameters are determined. The parameters for the CyberShip II [2] are found in Table 3. All damping parameters except those requiring yaw motion (Y r , N r , Y |r|v , ...) were identified experimentally by Skjetne [3] during tow tests. The thruster

Controller Design
The goal of the controller is to take a reference input such as a track of an ellipse and follow it with minimal error. As a test, a full state space regulator can be designed as shown in figure 2 to hold the vehicle at the origin. For a regulator, it is assumed that all states x = [η p , ν ] are measured and the sampling rate is T . Poles were selected based on the rules in [5] to achieve the settling time T s . good measure as to what qualifies as a acceptable robustness is that δ should be ≥ 0.5. Also, tenths matter. For example, a δ of 0.7 is noticeably better than 0.6.

Closed-Loop
A tracking system will allow the system to follow a given input such as a desired path. For a tracking system, the additional dynamics must first be chosen.
The main roll of the additional dynamics is to integrate the error signal to track the desired input and reject constant or slowly varying error. To accomplish this, a SISO discrete additional dynamics can simply be Φ a = 1, Γ a = 1.The additional dynamics can also be selected to reject a specific disturbance such as waves and then replicated for each input.
Poles must be selected for design model using the pole selection method below [5].
Robustness of this closed loop system can be calculated by using the input perturbation model [6] for error. This is done by introducing a system ∆ with input f and output w at the input of the design model and calculating the system from w to f . such as the FIF. An example derivation for the tracking system is given below.
x = Ax + Bu This results in the matrix from of the design model from w to f shown in (51).
Now the results of section 2.2.5 can be applied with the system ∆ representing H 1 .
Minimizing the H ∞ norm of the system from w to f results in the greatest stability robustness.
The experimental rfgb function from the digcontr library directly minimizes the H ∞ norm of the robustness design model from w to f , such as the one in equation 51. This function optimizes the gain matrices L 1 and L 2 until maximum robustness is achieved. MATLAB's place function uses a different method to attempt to choose acceptable gains. The place function tries to make the closed loop eigenvectors as orthogonal as possible. This is only indirectly related to robustness [7]. Therefore, rfbg produces gains that have higher robustness than place.
The final resulting closed-loop design from r to y for the tracking system is

Observer Design
Up to now it has be assumed that all plant states are measured. However, this is rarely the case in real systems. When only some states can be measured the rest of the states must be estimated using an observer. Designing the observer is similar to regulator and tracking system design. The rules for choosing pole locations of the observer are below [5].
Observer Pole Selection Methods

1.
If the plant has zeros with (zero) < 0, then use these for observer poles.
The closed-loop design model from r to y which will be used to calculate the inverse filter is

Feedforward Inverse Filter
To ensure that the designed observer-based tracking system tracks the desired input exactly, a feedforward inverse filter (FIF) [8] can be designed. The inverse filter is an exact inverse of the design model and generates an input to the controller that will produce the desired position with a delay of d samples, where d is calculated in (55). Using the discrete design model ( When creating the inverse filter, the zeros and poles of the design model will become the poles and zeros of the filter respectively to create an exact inverse. If there are high frequency zeros in the design model caused by sampling, then the inverse filter will attempt to cancel these out resulting in high frequency oscillations. This can be remedied by choosing appropriate initial conditions, as outlined in section 3.6.
These oscillations die out after a while and therefore can be canceled out completely by choosing good initial conditions. A simple way to do this is to simulate the commanded input backwards through the inverse filter until the oscillations are no longer present in the filter output.

Track Generation
The goal maneuver was to perform an ellipse similar to Fossen in [3]. The desired path can generated using the parametric equation of the ellipse centered at the origin with semi-major axis a and semi-minor axis b. Recall that x is north and y is east and notice that y d is inverted so that the ellipse turns clockwise.
To generate a single rotation about the ellipse the parametric variable t can be replaced by a vector from 0 to 2π that has number of elements equal to T S where T is the sampling interval and S is the amount of time to travel along the ellipse.

Initial Conditions
The initial conditions for η are simply η d (0) and the initial velocities and accelerations can be calculated by taking derivatives of the parametric equations.
The initial thrust can be calculated using the linear DP model and the initial acceleration and velocities.
Now the initial state x 0 can be used to calculate the initial state of the additional dynamics.
The initial observer statex 0 can be initialized to match the initial plant state x 0 .

Implementation in Simulink
Simulink was used to simulate the designed controller and boat model. Disturbances were added to simulate waves, wind, and measurement noise to make the simulation more realistic. Many debugging tools such as scopes to view signals, outputs to the MATLAB workspace, and switches to toggle elements were used.

The Controller
To build the tracking system controller, two Simulink blocks were made without model connections so that models could be swapped later. The first control block uses full state feedback while the other uses a full-order observer. In each case discrete state space blocks were used for the designed additional dynamics, gain blocks were used for the L 1 gains and the output selection matrix C, and initial conditions were set based on section 3.5. When the observer was used, a discrete state space block was implemented with input u o = [u, Cx] by the use of a multiplexer, and B = [K, Γ]. The full state feedback tracking system and observer-based tracking system were connected as in (4) and (5) respectively.

Models
First a linear boat model based on vessel parallel coordinates was created as a continuous state space block. This is the same model that the controller was designed for and was used to verify that the controller was functioning as expected.
It is a rough approximation of the actual real world vehicle.

Feedforward Inverse Filter
The FIF was added between the desired input and the control system to enhance its performance. Its implementation was a simple discrete state space block. A switch was added to enable and disable the FIF to observe its effects on the control system. The desired path was input into the FIF from the MATLAB workspace, transformed to η p coordinates, and then sent into the controller.
The continuous model can then be converted to discrete time using the zohe function from the digcontr library or MATLAB's c2d function.
The sampling time used in the controller design was T = 0.1 seconds and the settling time was chosen as T s = 5 seconds. The discrete additional dynamics matrices were chosen to act as a simple integrator replicated three times, one for each tracked output signal which results in an identity matrix for Φ a and Γ a . The resulting maximum robustness norm δ for the designed discrete tracking system using rfbg which stands for robust feedback gains, is 0.7287.
A four times faster full-order observer with settling time T s /4 was designed to estimate the state variables from the three measured positions. The plant has no special properties to aid in selecting pole locations, so the Bessel poles are used.
The second, third, and fourth Bessel poles are scaled to the observer settling time. The above procedure can be repeated using the same poles and MATLAB's The resulting robustness norm of the tracking system is 0.5927. The observer gains were then calculated to be This resulted in a final robustness of 0.2483. Again, the FIF has a delay of three samples.

Simulations
Once the two controllers were designed using the place and rfgb methods, simulations were run to test robustness. The desired path was an ellipse with semi-major axis a = 20 and semi-minor axis b = 10 (56) that takes 200 seconds to complete a single revolution. This ellipse is translated to the east by a meters so that the initial position is the origin and the boat travels clockwise around the ellipse.       Standard deviations were calculated over the entire simulation for x, y, and ψ.
The maximum error is also displayed for each signal.
The values for M A and D were chosen to be positive so that the resulting matrix was positive definite. These nonzero values account for errors in the symmetry assumptions that were made previously when deriving the model in section 2.3.4.
The results with only model perturbations are displayed in the plots below in the same fashion as before. Error plots are split into position and heading error and

Analysis
Right away it easy to see that feedforward inverse filter is an absolute necessity when using this DP model and speed. Without the FIF, the controller goes off path when going around the tighter arc of the ellipse. This is where the yaw rate is at its maximum and the furthest point from the origin. The linear approximation made by converting to vessel parallel coordinates assumes that the boat is close to the origin and has a yaw rate close to 0. The FIF is able to adjust the desired input to the controller so that the marine vehicle never strays too far from the desired ellipse. With the FIF enabled, the error is still at its maximum when the boat is farthest away from the origin and turning the quickest. Previous state space controllers would have to constrain their speed to where the linearization is more accurate, while the FIF allows for greater maneuvering speed.
Both pole placement methods were able to make it around the entire ellipse without becoming unstable when using the FIF. However, rfbg produced gains that had a measurably greater robustness than place. The robustness norm was 0.5160 using rfbg and 0.2483 using place, which is a difference of 0.2677. This difference is much greater than the 0.1 difference that is required to view a measur- The heading was affected the most by these oscillations, while the position error is relatively small. If the goals for the application vehicle depend highly on heading, then more care must be taken to estimate parameters accurately. However, for path following, position is more robust to modeling errors and disturbance. Using rfbg the error never exceeded 0.17 meters for position, while the heading error never exceeded 14.25 degrees.
The improved robustness of rfbg over place, when combined with the feedfoward inverse filter, produces acceptable results when simulated on the nonlinear

Improvements and Application to URI's ASV
From these simulations we see that a few things can be done to improve the performance of the linear controller. It is possible to gain schedule with respect to forward speed or yaw rate if higher speeds are desired. A design consideration when path planning could be cap the maximum speed and yaw rate that is sent into the controller to prevent the controller from entering highly nonlinear regions.
As the marine vehicle operates for an extended period of time, it may venture far from the origin where the coordinate change to vessel coordinates is less accurate. To prevent issues, the origin of the controller can be translated to a new point close to the vehicle. When doing this, the states x a andx of the controller would need to be calculated to fit the new origin to avoid large jumps from the controller adjusting. This includes integrators accumulating and the observer settling to the correct state.
The simulation could be improved slightly by adjusting the measurement noise models so that high frequencies are removed by use of a high pass filter. This is more realistic because most sensors have some filters built. Wind noise could also be made sightly more realistic by adding a noise element or gusts.
URI's ASV currently has two trolling motors, which means that it is under actuated. The controller designed assumes that the vehicle is fully-actuated or over-actuated, so one or more motors would need to be added that produce forces in a different direction that the first two. The current motor controller takes forward thrust and turning commands and mixes them internally using an unknown method. In other words, it is not certain what input commands produces a certain output force. This means the motors would need to be modeled or a new motor controller would be needed.
The current computing power and code structure will allow for the computations needed to implement the modest requirements of this controller. The matrix multiplications are small enough that they will be able to be completed in less than a sampling period T = 0.1.
System identification for the ASV will need to be done to obtain approximate parameters for the DP model. This thesis has shown that even if the estimated parameters are not 100% correct, the linear controller is robust enough to handle these perturbations. All work done in this thesis can be applied to URI's ASV. The developed controller would be an improvement over the current controller and allow for greater maneuverability. To implement the controller on the ASV, a rough system identification is needed to estimate parameters of the DP model. The ASV must also be modified so that it can produce forces and moments in each direction by adding actuators.

List of References
The MATLAB code and Simulink model that was developed during this thesis is applicable to a variety of marine surface vehicles. The code can be modified for other models so that others can test their marine system. The Simulink models were constructed with a modular element so that parts can be enabled and disabled using switches.
To summarize, these results show that linear controllers are sufficient for DP controllers under higher speeds provided that an inverse filter and robust controller is designed. This widens the accessibility of marine control to those that have knowledge of linear theory, but may have limited knowledge of nonlinear systems. A.14 Initial Conditions