## 2 Materials and Methods
### Ship Linearized Model Identification  
In model-based control strategies, such as Model Predictive Control (MPC), modeling is necessary to predict future plant outputs on the basis of past and current input signals. Thus, it determines the quality of designed control system. Fast, reliable, and being as accurate as possible are required. Ship dynamics are highly non-linear, full of cross-couplings between separate channels, and are difficult to model due to inertia and susceptibility to external disturbances. Most commonly known are non-linear ship models [1; 5]. However, complications cause increases in computation time and demand for computational power, when determining optimal control values. Thus, there is a need to find simple and reliable linear model identification methodology. A reliable linear model identification procedure requires:  
* input-output data acquisition: identification trials should be recorded without external disturbances (e.g., wind, wave); all plant modes should be properly excited; ship should not enter into circulation; time-domain inputs should have different frequency and amplitude pseudo-random signals;
* model type selection: ship dynamics for the future control system are defined as a discrete state-space, polynomial, or transfer function model, which may be black-box (only the model order is specified) or grey-box (where initial guesses for coefficient values are provided);  
Figure 1: LNG carrier—’Dorchester Lady’. model order selection: the higher the model order is, the higher its flexibility, but there are also more parametric uncertainties in the obtained model; so there is a need to find a compromise between model flexibility and reliability;
* future model purpose definition: a good simulation model, in most cases of ship model identification, may have poor prediction, and vice versa, so one should specify the purpose of using the linear model. * parameters estimation method selection: three methods are commonly used--subspace, prediction error minimization, and regularized reduction; the choice of parameter estimation method is strictly related to the future purpose of a model. State-Space Model Identification  
A ship's automatic course or trajectory tracking at constant speed, in the case of an azipod-powered vessel, can be reduced to a one-dimensional problem. In this type of control, course changes are realized by the pods' angles of rotation change, while the propeller revolutions remain constant. The presented model will be used for a line-of-sight (LOS) trajectory tracking algorithm. The designed automatic control system has one controlled input (rotational speed \(r[\text{deg}/\text{s}]\)) and one output (pod angle of rotation \(\delta[\text{deg}]\)). Due to this assumption, 3 DOF single-input single-output (SISO) described by Equations (4) and (5) was identified. The mathematical model of the LNG Carrier 'Dorchester Lady' can be represented in state-space in form, which is schematically shown in Figure 2.  
\[x_{k+1}=\mathbf{A}\cdot x_{k}+\mathbf{B}\cdot u_{k}+\mathbf{K}\cdot e_{k} \tag{4}\]  
\[y_{k}=\mathbf{C}\cdot x_{k}+e_{k} \tag{5}\]  
where:  
\(\mathbf{A},\mathbf{B},\mathbf{C}\)--dynamic, input, output or sensor matrix,  
\(\mathbf{K}\)--noise component matrix,  
\(x\), \(u\), \(y\)--state, input and output vector,  
\(e\)--disturbance,  
\({}_{k,k+1}\)--current time, next time moment. The LNG carrier does not have direct feedthrough, which needs to be taken into account during the identification process. State-space model of canonical form, which guarantees observability, with white noise as the disturbance was identified. [PERSON] et al. [37] proved that the third-order polynomial model is sufficient to represent forces acting on a ship during normal maneuvers. They also include trajectory tracking, which is a future application for the MPC controller and will be built on the basis of the above-described model.