Let's recover the vessel model of its kinematic and dynamic combination. It has been known that the marine vessel or ship system has six degrees of freedom in three-dimensional spaces. Since the USV model is designed to operate in low/medium sea states (such as Lake Ontario or Lake Simcoe), the vessel’s motion can be expected to be planar in horizontal and vertical directions, as well as the heading angle expressed in the rotational direction.
Before motion of a kinematic equation is created for the system modeling, there are several vehicle vectors states that have to be clarified as:
The q
state vector describe vehicle’s North and East positions x
andy
, and heading angle ψ
in the global frame, as well as their velocity vectors in the body-fixed frame (surge velocity u
, sway velocity v
, and yaw rate r
). The q_dot
state describes vehicle’s North, East velocities and angular rate, as well as their acceleration vector in the body frame. The transformation matrix J(ψ)
is presented to convert between the velocity vector in the global frame and velocity vector in the body-fixed frame as follows.
Then, we write the relationship between q_dot
and thier velocity vector in the body-fixed frame proposed as:
The force and steering torque vector will be treated as an input vector of nonlinear system modelling to create the USV state vectors by importing two rudderless motor forces generated.
τ_x
and τ_y
are denoted as the thruster forces created in x_b
and y_b directions, respectively. τ_z
is the moment around z_b
axis. Environmental perturbations are not involved for motion analysis in this part. T_p
and T_s
are described as the resulting forces generated by the port and the starboard pontoon separately.
The motion equation shown below describes the Heron M300 dynamic model:
M
is the mass matrix, C(u,v,r)
is the Coriolis matrix, D
is the drag matrix, and τ
is the vector of the forces and moment by both thrusters. The vessel dynamics is derived based on the rigid body dynamics law. To deunrstand how parameters in mass matrix, Coriolis matrix, and drad matrix, are computed and defined, please refer to my technical document or codeblocks below by droping me an email.
Kinematic and dynamic equations combined to create a continous state-space equation q_dot = f(q,τ)
as
are presented in discrete-time version as
function [New_eta_dot,Accleration] = HERON(X_u_dot,Y_v_dot,N_r_dot,I_z,V,tao,eta,t)
m = 38; % mass of Heron M300(kg) within payload mass
L = 1.3; % length of Heron M300(m)
W = 0.98; % width of Heron M300(m)
H = 0.32; % height of Heron M300(m)
%H_antenna = 0.74; % height within the antenna element(m)
Drought = 0.12; % Drought of Heron M300(m)
B_hull = 0.24; % beam of the individual pontoon
B = 0.74; % beam of Heron M300(m)
LCG = 0.49; % longitudinal centre of gravity wrt plane og engine
Q = (1.1+0.0045*(L/Drought)-0.1*(B_hull/Drought)+0.016*((B_hull/Drought)^2))*0.5*pi*Drought*L;
M11 = m - X_u_dot;
M22 = m - Y_v_dot;
M33 = I_z - N_r_dot;
X_u = 26.43;
Y_v = 72.64; % quadratic sway drag term (N/(m/s)^2) changes from 72.64
N_r = 22.96; % quadratic yaw drag term (N/(rad/s)^2)
new_V_dot(1) = (1/M11) * (tao(1) + M22*V(2)*V(3) - V(1)*X_u(1));
new_V_dot(2) = (1/M22) * (tao(2) - M11*V(1)*V(3) - V(2)*Y_v(1));
new_V_dot(3) = (1/M33) * (tao(3) - (X_u_dot - Y_v_dot)*V(1)*V(2) - V(3)*N_r(1));
Accleration = [new_V_dot(1);new_V_dot(2);new_V_dot(3)];
new_eta_dot(1) = cos(eta(3))*V(1) - sin(eta(3))*V(2);
new_eta_dot(2) = sin(eta(3))*V(1) + cos(eta(3))*V(2);
new_eta_dot(3) = V(3);
New_eta_dot = [new_eta_dot(1);new_eta_dot(2);new_eta_dot(3)];
end
Discrete-time state space equation is describled as follows.
function [Position,Velocity]= Vehicle(new_eta_dot,new_V_dot,eta,V,t)
new_V(1) = V(1) + t * new_V_dot(1);
new_V(2) = V(2) + t * new_V_dot(2);
new_V(3) = V(3) + t * new_V_dot(3);
Velocity = [new_V(1);new_V(2);new_V(3)];
new_eta(1) = eta(1) + t * new_eta_dot(1);
new_eta(2) = eta(2) + t * new_eta_dot(2);
new_eta(3) = eta(3) + t * new_eta_dot(3);
Position = [new_eta(1);new_eta(2);new_eta(3)];
end