Real-Time Ship Draft Measurement and Optimal Estimation Using Kalman Filter

Ship operators typically depend on the visual method for draft reading, which may lead to errors or approximations, and it further introduces draft survey calculation errors and cannot provide continuous updates. Ensuring accurate real-time ship draft measurement becomes crucial for enhancing navigational safety, optimizing vessel performance, and achieving precise cargo and consumable measurements. With the current approach towards automation and remote operation of ships, the need to rely on the accuracy of the measurements provided by the sensors has increased. Although different sensor types are gradually being adopted for draft measurement, they encounter challenges in the demanding marine environment which may result in noisy and inaccurate readings. This paper aims to estimate the true draft of a ship in different conditions from noisy sensor measurements using the Kalman filter algorithm. The purpose of the algorithm is to reduce uncertainty in draft measurement that is generated from inaccuracies in the sensor or from the dynamic marine environment. The paper involves designing the Kalman Filter algorithm for draft measurement to work within the different conditions the ship may experience. Simulating different situations and analyzing the result, the application of the filter shows the advantage in real-time draft measurement in both static and dynamic conditions.


INTRODUCTION
The maritime industry plays a pivotal role in global trade, transportation, and economic development.Vessels of various sizes navigate through vast oceans, rivers, and seas to transport goods, passengers, and resources.Ensuring the safe and efficient operation of these maritime vessels is paramount to avoid potential risks, accidents, and environmental hazards.One crucial aspect of ship operation that demands meticulous attention is draft reading [1].The draft of a ship is the vertical distance between the present water line, which is the airwater interface and the lowest point on its hull.Accurate draft readings are essential for maintaining vessel stability, optimizing cargo loading and unloading, and ensuring safe navigation through shallow waters and restricted channels [2].Traditionally, the visual method has been the predominant approach for draft measurement [3].This method often involves the visual observation of the ship's six draft marks (both port and starboard side, near its bow, stern and midships), employing brackets, and climbing ladders to achieve the most parallel angle of observation to the water surface.However, it is prone to errors that can lead.___________________________________ *Corresponding Author: sushmit.dhar@uit.noto significant economic losses in shipping operations [4].Factors like parallax errors, restricted visibility of the draft marks, and challenges posed by high waves during observation may contribute to such inaccuracies [5].Therefore, improving the precision of draft measurement in real-time can not only enhance the safety of maritime operations but also benefit the interests of shippers and consignees.
As the maritime industry embraces remote operation and autonomous shipping, the demand for real-time sensor-based draft monitoring systems becomes more important [6].The integration of draft measuring sensors, such as optical fiber detection technology, RADAR, IR, and pressure sensors, on ships has enabled continuous and automated draft monitoring [4].However, challenges arise as these sensors may introduce noise in readings, potentially compromising the accuracy of draft measurements.The noise can be attributed to the demanding marine environment or inherent electrical noise in the sensors.
This paper seeks to address these challenges by employing the Kalman filter algorithm to estimate the true draft of a ship under various operational conditions.The primary objective of the Kalman filter is to reduce uncertainty in draft measurement stemming from sensor inaccuracies or the dynamic marine environment.Through simulations and analytical assessments, the study demonstrates the potential of the Kalman filter in enhancing draft estimation accuracy.

IMPLICATIONS OF DRAFT CHANGES ON SHIP OPERATIONS
Fluctuations in the draft can have wide-ranging implications that significantly impact various critical aspects of ship operations.This section explores the consequences of draft changes in some key areas.

Under-Keel Clearance
Navigating marine vessels in shallow waters poses unique challenges, and one critical aspect that demands the utmost attention is maintaining a safe under-keel clearance (UKC).The under-keel clearance refers to the vertical distance between the vessel's lowest point and the seabed.It is determined by subtracting the overall dynamic draft from the available water depth at different points of the transit [7].Ensuring an adequate UKC is essential for the safety of voyages, preventing groundings, and facilitating seamless port and channel operations.
Floating vessels are exposed to hydrodynamic effects leading to dynamic change in their UKC.As part of passage planning before entering restricted waters, the ship's master should ensure an adequate safety margin by considering factors such as the vessel's dynamic change in the draft, potential inaccuracies in hydrographic data, and other relevant variables.To accomplish this, access to reliable real-time weather and tide forecasts, as well as an approved method for predicting the ship's motion and subsequent dynamic change in draft under various conditions, is crucial [9].

Ship Stability and Performance
Knowing the ship's draft is essential for maintaining a stable metacentric height (GM), which determines the ship's stability.GM is the distance between the center of gravity and the metacenter of the ship (Fig. 2.).A positive GM indicates stability, while a negative GM signifies instability and the risk of capsizing.This knowledge also aids in achieving a safe balance between the maximum cargo load that can be carried and its distribution while also preventing the ship from becoming unstable [10].
The fuel efficiency of a ship, affected by its design, hull form, machinery, and operational factors such as speed through water, mean draft, and trim (the difference between forward and aft draft), plays a crucial role in its energy consumption [11,12].Trim, in particular, has a considerable impact on a vessel's performance and propulsion energy requirements.By maintaining an optimal trim relative to the draft, fuel consumption can be reduced [13].Additionally, ships equipped with a bulbous bow to reduce drag are effective only within specific operational draft limits.Thus, it becomes essential to maintain a minimum operational draft to ensure propeller immersion, rudder effectiveness for maneuverability, and engine load considerations [14].

Cargo Mass
The draft survey method is commonly used to determine the cargo mass onboard a ship [15].Based on the observed values at different draft marks and taking its arithmetic mean, it is possible to calculate the present vessel displacement after accounting for corrections due to the distance of the draft marks from forward and aft perpendiculars, sagging or hogging and water density.Subsequently, by deducting the ship's dead weight and deductibles such as fuel and ballast, the cargo mass can be computed.However, it is important to note that this method is susceptible to specific systematic and accidental errors, primarily caused by incorrect draft readings [16].Draft reading errors and subsequent survey miscalculations can lead to significant economic loss (Fig 3 .).For instance, on a cape-size ship, an error of a onecentimeter draft can result in a cargo capacity loss of up to 120 tons, equivalent to 24,000 dollars for common coal priced at 200 dollars per ton [4].

Dynamic Positioning Vessel
During the operation of a dynamic positioning (DP) vessel, the vessel model estimator algorithm is fed with the drag coefficient values [17].The drag coefficient table varies with different drafts of the vessel, and the correct value is essential for the estimator to work accurately for thrust generation for station-keeping purposes.Often, manufacturers use an averaged draft value from different sensors located on the vessel.Failure of a sensor or providing false reading leads to the incorrect input value of drag, generating inaccurate estimation and may affect the operation [18].Fig. 3.The observed error of tons per centimeter for the three primary ship types in the bulk market, corresponding to the quantity of goods under the summer load [4].

SHIP DYNAMIC MOTION AFFECTING DRAFT
When a ship is floating on the water, it experiences various hydrodynamic forces that act upon its hull.These forces can be influenced by factors such as wave action, currents, wind, and the ship's own motion.As a result of these hydrodynamic forces, the ship may undergo dynamic changes in its draft (Fig. 4.).

Squat
The relative motion of the ship's hull through the surrounding bulk of water leads to variation in hydrodynamic pressure along the vessel, associated with the Bernoulli effect.This causes a downward vertical force and a moment about the transverse axis leading to sinkage and/or trimming of the vessel; this phenomenon is called squat [19].As this relative velocity between the vessel hull and the water flowing underneath increases due to restriction in shallow water, the squat effect increases, leading to a further decrease in UKC which may lead to grounding.The squat depends on multiple factors like the waterway the ship is in, its present speed through water, dimension and hull form, loading condition and the depth underneath the vessel's keel [10].
Commonly, most ship operators rely on empirical formulas to calculate squat, which provides approximations and may not give a correct result when generalized for different ships in different conditions.Barrass's empirical formula provides a straightforward and convenient method for estimating the maximum squat (  ) experienced by a vessel and can be applied to all channel configurations [20], which is expressed as: where   is the block coefficient, a dimensionless parameter representing the total volume of the hull to the volume of a rectangular block with the same overall dimensions,  is the vessel's speed through the water (in knots or m/s), and  is the blockage factor, accounting for the vessel's interaction with the confined water channel, is expressed as: where  is a parameter that depends on the extent of restriction in the water channel due to shallowness or confinement.

Heel
Ship heel refers to the angular inclination of a vessel along its longitudinal axis, causing it to tilt to one side.Due to wind moment and also while turning, the ship experiences heel, which in turn reduces the UKC near the bilge keel on the side the vessel is heeled [21].For a boxshaped ship at hydrostatic equilibrium due to heeling moment (M), the resultant angle of heel (ɸ) measured in radians is expressed as: where  is the mass of the ship (tons),  is the acceleration due to gravity (~9.8 m/s 2 ), and   is transverse metacentric height (m), which is a measure of the initial stability of the ship in the transverse direction.
Additionally, the extra sinkage or increase (  ) (m) in draft due to the heel angle (ɸ) can be approximated using the following formula: where  is the measure of ship beam (m), which refers to the width of the ship at its widest point.

Dynamic Bending
Dynamic stresses can cause the ship's structure to bend due to hydrostatic forces induced by the sea [10].This longitudinal bending can have an impact on the ship's dynamic draft.When the ship's ends are on a wave's crest, and the midship region is below a trough, it experiences sagging, which leads to an increase in the draft at the midship region.Conversely, when the ends are on wave troughs, the ship experiences hogging, resulting in an increase in the draft at both the forward and aft ends of the vessel.

Combined effect of Heave, Pitch and Roll
A ship usually encounters three types of displacement motions -surge, sway, and heave and three angular motions -roll, pitch, and yaw.In this study, we are only concerned with the heave, pitch, and roll motion, which affects the ship's dynamic draft.When a ship is excited by a sinusoidal force (due to regular wave motion) (Fig. 5.) of  (  ), where  is the amplitude and   is the angular frequency of the applied force at time .
The resultant change in vertical height (ℎ) at any point (  ,   ) on the ship can expressed as, ℎ(  , ) = () −   Ɵ() +   ɸ() where () is the heave motion of the ship at time , Ɵ() is the pitch motion of the ship at time , ɸ() is the roll motion of the ship at time ,   is the distance of the point   ,   from the ship's longitudinal axis, and   is the distance of the point   ,   from the ship's transverse axis.
The function representing a sinusoidal motion in the vertical height (ℎ) at a specific point on the ship due to the action of a harmonic force with angular frequency   , is expressed as: where ℎ  is the amplitude of the sinusoidal motion, which determines the maximum displacement or height variation from the mean position and Ɛ ℎ is the phase angle, representing the initial phase of the motion.
When a regular sinusoidal force encounters the ship, the resultant response motion is also sinusoidal [21]; hence the change in the draft due to a combination of heave, pitch and roll at any point on the vessel will likewise become a sinusoidal function.

DRAFT SENSORS
Though the traditional method for draft measurement is to make visual observations from the vessel draft mark, there has been a transition where vessels are being fitted with sensors for that purpose to receive a real-time update [4].Usually, six draft sensors are positioned on the six draft marks (fig.6.), located at the port and starboard of the fore, aft, and midship of the ship.These draft sensors operate by converting the dynamic water level into electrical signals, which are then transformed into digital information.This section explores some popular methods employed for real-time draft measurement.

Ultrasonic draft sensor
The ultrasonic draft sensor operates by transmitting a package of ultrasonic signals, which helps measure the distance between the sensor level and the air-water interface.By calculating the time taken for the emitted signal to be received back after reflection, the device determines the draft of the vessel [22].However, these sensors are prone to errors due to the impact of temperature and humidity changes.Variations in temperature and humidity can affect the speed of sound in the air, leading to inaccuracies in the draft measurement [5].

Pressure Sensor
Hydrostatic pressure sensors' function based on the principle of a transducer with a predefined pressure range, which generates a signal output corresponding to the pressure variations at different water levels [2].However, accurately measuring the ship's draft using pressure sensors is hindered by the change in water density.In order to ensure accuracy, density compensation is important in the measurement process.During voyages, draft detection using pressure sensors becomes more complex due to the influence of sea conditions and dynamic vessel motions, which cause constant pressure fluctuations.

Optical Fiber Technology
An optical fiber-based method for draft measurement involves directing a light source into an optical fiber installed along the ship's draft mark.When the light reaches the submerged portion of the cable, total internal reflection occurs within the fiber and the surrounding liquid cladding, resulting in minimal light loss compared to the non-immersed section.By calibrating the gauge for different draft levels and reading the corresponding signal from the detector, the draft of the ship can be accurately measured [16].However, the installation and maintenance of photoelectric sensors, which are used in this method, can be challenging, making their widespread adoption on ships limited [5].

RADAR or IR technology
A distance measurement method, which can utilize either Infrared (IR) technology using lasers or RADAR technology employing radio waves, is employed to determine the ship's draft.This method involves measuring the distance from the deck surface to the water surface simultaneously at multiple points along the ship's sides on both the port and starboard sides.However, signal variations resulting from density and temperature changes can impact accuracy and need to be accounted for [4].

KALMAN FILTER
The presence of uncertainty and noise in the sensor signal during their use for draft measurement makes it essential to apply an efficient and dependable method for optimizing the sensor signal.Also, gradually with the goal of lesser human involvement with the advancement of ship automation and remote parameter observation, more reliable draft sensors will be desirable.
The Kalman filter [23] is a collection of mathematical equations that offers an efficient recursive approach to estimate the state of a process while minimizing the mean squared error.Its strength lies in its ability to provide estimations for past, present, and even future states, even in situations where the exact nature of the modeled system is uncertain [24].Kalman filter has a continuous-time version and various discrete-time versions (which can be readily executed in a computer program), out of which the predictor-corrector discrete-time version is the most popular [25].
The recursive Kalman Filter algorithm optimally estimates a process state at a given time by balancing the mathematical model with sensor measurements, taking into account their respective inaccuracies and Gaussian errors, enabling accurate estimation of the next state and correction of the estimated state with actual measurements (Fig. 7.).
System modeled in state-space is expressed as: And the measurement model is expressed as: where   is the state vector in time step ,  is the state matrix,  is the control matrix,   is the input vector in time step ,   is the measurement of the state   in time step , and  is the matrix which relates the actual state with the measurement   and   state and measurement white noise with known covariance matrices  and .
The Kalman Filter has undergone extensive research and application in diverse domains, proving successful in solving a wide range of problems, including signal processing, due to its ability to extract valuable information from noisy sensor readings with minimal computational demands [24].The Kalman Filter has a storied history of successful application in various operational settings, initially gaining prominence in the Apollo program during the 1960s [26].Its pivotal role in navigating spacecraft to the moon showcased its effectiveness in space exploration.Since then, the filter has become a cornerstone for advanced estimation and prediction in numerous domains.In the realm of autonomous vehicles, it is integrated to process data from cameras, LiDAR, and radar sensors, enhancing vehicle perception and contributing to advancements in self-driving technology [27].Global Navigation Satellite System (GNSS) receivers employ Kalman Filters to mitigate signal interference and multipath effects, ensuring accurate positioning [28].In maritime applications, most vessels use Kalman filters to enhance navigation accuracy and optimize performance, by estimating crucial parameters like velocity, and heading, and position contributing to safer and efficient maritime operations [29].These real-world case studies exemplify the Kalman Filter's adaptability and effectiveness in a wide array of operational contexts across industries.
The Kalman Filter, while a potent tool for state estimation and prediction in numerous domains, may not be the optimal choice in certain situations.Its effectiveness relies on key assumptions, such as Gaussian noise, linearity in system dynamics, and the availability of adequate sensor data [30].In instances where the system exhibits non-Gaussian noise characteristics or highly nonlinear dynamics, the Kalman Filter may not perform optimally, necessitating the exploration of alternative estimation techniques like Particle Filters or Unscented Kalman Filters [31].Similarly, when dealing with complex, high-dimensional state spaces or situations where the system lacks a well-defined model, the Kalman Filter's utility might be diminished, prompting the consideration of different approaches [32].Therefore, evaluating the suitability of the Kalman Filter is essential within the specific context of the system and application under consideration, taking into account its strengths and limitations.
In the subsequent sections, we will explore the application and utility of the Kalman Filter for estimating a ship's draft under various conditions, from uncertain or noisy sensor readings.Fig. 7. Recursive Kalman Filter predictor-corrector algorithm.

DRAFT MEASUREMENT PROBLEM MODELLING
(i) The ship's draft will remain static when its displacement is constant and floating in calm water, i.e., no motion: where  ̇ represents the time derivative of the draft  with respect to time .
(ii) The draft is increasing or decreasing, due to variation in the ship's displacement such as due to cargo loading/discharging, fuel consumption, etc. or due to squat varying with its speed: where  is the rate of change in draft.
(iii) The draft changing as a sinusoidal function of time due to sinusoidal ship motion in response to the regular hydrodynamic force acting: where ℎ  is the amplitude,   is the angular frequency,  is the time variable and Ɛ ℎ represents the phase shift of the sinusoidal component of motion.
Hence, the estimated state has three components: The continuous time process model for the estimated state components x � m , x � v and , x � s is expressed as: where w m and w v represents the sinusoidal motion variable which follows a normal (Gaussian) distribution with a mean of 0 and a variance of q m and q v .The probabilistic distributions p(w m ) and p(w v ) capture the uncertainties or noise associated with the estimates.
The state form (x �) estimate of the system is expressed as, The new state estimate at time t + dt is expressed as, x x The continuous time state matrix (A) is expressed as, The continuous time process error covariance matrix (Q) is expressed as, The discrete-time state matrix (A(dt)) is expressed as, where ℒ −1 represents the inverse Laplace transform, s represents the complex frequency variable used in the Laplace domain, and I is the identity matrix.
where, B is the input matrix.
If y represents the noisy sensor signal corresponding to the draft measurement.In other words, it is the measurement obtained from a sensor, and it may be subject to random noise or inaccuracies, then the estimated or predicted value of the draft measurement (y �) is expressed as: where C is the observation matrix, and x � represents the state estimate of the system.
The discrete-time covariance matrix Q(dt) is, Qe A T τ dτ from continuous A and Q Then, Q (t, dt) is expressed as, The results are the discrete-time covariance matrices representing the propagated uncertainty or variance of the state variables in the system.

SIMULATION RESULT
The above model is used in MATLAB® to simulate different probable conditions for the ship's draft reading at a draft mark and analyze the noisy measurement sensor signal and estimated result using the Kalman filter algorithm in graphical form.

The First Scenario
The ship is in calm water with no vessel motion or changes in its displacement, with a constant draft of 10 m (Fig. 8.).The value of   = 1 −3    = 1 −3 for the process noise covariance matrix .Sensor measurement frequency of 100 Hz and a noise covariance  = 100.Fig. 8. Filter performance for the first scenario.

The second scenario
The ship is floating with regular vessel motion with an amplitude of 0.2 m and period of 12 s, oscillating around a mean draft of 10 m (Fig. 9.).The value of   = 1 −3    = 1 −3 for the process noise covariance matrix .Sensor measurement frequency of 100 Hz and a noise covariance  = 100.

The fourth scenario
The ship of block coefficient (  ) 0.8 is underway in restricted water with regular vessel motion with an amplitude of 0.4 m and a period of 10 s and moving at a constant speed of 10 knots up to the first 50 s then increases speed from 10 knots to 15 knots in the next 2 min (Fig. 12.).
The ship experiences squat when underway, using Barrass's empirical correlation (Equation 1) for calculating the change in the draft (Fig. 11.).With an increase in speed from 10-15 knots, the ship's draft increases from 11.6 m to 13.6 m.The performance evaluation of the Kalman filter algorithm indicates that it works satisfactorily in the above simulated scenarios to estimate the true draft of the ship from the noisy sensor reading.After the first few iterations, it can be observed that the residuals consistently drop and converge, which demonstrates the filter's ability to effectively reduce sensor noise and provide accurate state estimations.The estimated state closely aligns with the actual state of the system, indicating the filter's proficiency in tracking system dynamics accurately.Additionally, the filter maintains stability throughout the estimation process, ensuring reliable and robust performance under different conditions.

CONCLUSION
Accurate real-time draft readings hold significant value for ensuring overall ship safety and can be utilized by subsequent systems, such as the Electronic Chart Display and Information System (ECDIS) or cargo loading computers, to assess navigational safety, hull stress, cargo safety, and ship performance.However, the challenging marine environment poses obstacles to reliable sensor utilization, necessitating the application of filtering and smoothening techniques to improve sensor measurements.
This paper highlights the implementation of the Kalman Filter as a viable solution to enhance and extract useful draft readings from uncertain or distorted draft sensor data, ensuring robustness in real-time draft measurement.Throughout various simulated conditions, the Kalman Filter effectively attenuated sensor noise and accurately converged to the true draft value.Nevertheless, it is crucial to acknowledge that the assumption of vessel sinusoidal motion may not fully represent actual sea conditions, and the model may not provide an optimal estimate when encountering irregular waves or other forces leading to irregular ship motion and draft changes.Addressing this challenge will be the focus of future work, with an expansion of the model to analyze nonlinear functions and improve accuracy under such scenarios.

Fig. 4 .
Fig.4.Factors resulting in a change of ship's draft.

Fig. 5 .
Fig.5.Combined effect on vertical displacement from heave, pitch and roll in a regular wave.

Component 1 :
x � s where x � s represents the present draft.Component 2: x � v ≡ d x � s dt where x � v represents the rate of varying draft.Component3: x � m ≡ C s (constant)where x � m magnitude (amplitude) of a sinusoidal component of motion.In this case, the constant C s determines how far the waveform extends from its central position (the amplitude) and remains the same throughout the entire oscillation.

7. 3 .
The third scenarioThe ship is floating with regular vessel motion with an amplitude of 0.4 m and a period of 12 s and discharging cargo resulting in a change in a draft from 14 m to 10 m (Fig.10.).

Fig. 11 .
Fig.11.Draft change due to squat for the fourth scenario.The value of   = 1 −3    = 1 −3 for the process noise covariance matrix  Sensor measurement frequency of 100 Hz and a noise covariance  = 100.The performance evaluation of the Kalman filter algorithm indicates that it works satisfactorily in the above simulated scenarios to estimate the true draft of the ship from the noisy sensor reading.After the first few iterations, it can be observed that the residuals consistently drop and converge, which demonstrates the filter's ability to effectively reduce sensor noise and provide accurate state estimations.The estimated state closely aligns with the actual state of the system, indicating the filter's proficiency in tracking system dynamics accurately.Additionally, the filter maintains stability throughout the estimation process, ensuring reliable and robust performance under different conditions.