##### Page tree
Go to start of banner

# How-to Smooth Vessel or ROV Track

This document describes how to use QINSy's position filter and will also give suggestions of settings that can be used in certain practical situations.

## Introduction

QINSy is equipped with a Position Filter. With this filter you can smooth an object track, but you can also calculate a position if your GPS/USBL fails for a little while: prediction.

Note that the screenshots of the user interface in this document are valid for Controller version 8.00.2010.11.18.4 and up. If you have an older Controller, the user interface looks slightly different, but the most relevant settings are the same.

#### What is the Position Filter in QINSy

At the end of a computation cycle, the position of an object that QINSy has calculated can be filtered.

Recap: one computation cycle of QINSy is performed on a trigger, so as soon as data is received from a triggering system (e.g. a GPS receiver).
A computation cycle consists of:

1. Preprocessing of observations
2. Height aiding (where a height is calculated from other observations, such as heave or tide)
3. One or more least-squares adjustments.
4. Position filtering.

This document describes step 4.

Position filters implemented in QINSy are of the Kalman Filter type. This filter uses the history of positions to calculate an estimate of the current position. That estimate is used to correct the measured position (e.g. GPS or USBL). The estimate is calculated through the use of a dynamic model of the object's movement. This model describes the expected movement of the object. The figure below shows this process with a simple example.

The shown track is sailed by a ship, positioned by GPS, and a position filter is enabled. The new position is calculated from a weighted average of the measured position (GPS position) and the estimate, calculated by the position filter.

Top of page

#### Dynamic Model

The dynamic model contains assumptions about the movement of the object. In other words, the filter needs to be 'told' how the filtered object moves.

The following dynamic models are available in QINSy.

1D Constant Velocity

This is the simplest model, which assumes that the filtered object is moving in a straight line with constant velocity.

1D Constant Acceleration

This model assumes that the filtered object is moving in a straight line but is slowing down and speeding up with the same rate of change of velocity with respect to time.

2D Constant Velocity

This more advanced model assumes movement in a straight line with a constant velocity, just like the 1D Constant Velocity model, but it is extended to better match real-life situations.

This model compensates for crab angle and scale factors and biases introduced by the projection scale.
Crab angle is the angle between course and heading.

2D Uniform Circle

This model extends the 2D Constant Velocity model by taking course changes into account. It still assumes constant velocity.

To prevent bad results, always select the dynamic model that most closely approaches the actual movement of the object!
For example, if a constant velocity model is selected, but the object is accelerating, position errors will occur.

In addition to the type of model, one must also choose the filter strength. This setting controls the averaging between estimate and observations. A high filter strength puts a lot of trust in the dynamic model and less in the observations, thus the estimate is weighted heavier in the average. Lowering the filter strength gives the observations more weight in the average.

If the selected model is close to reality, choose a high filter strength.
If deviations from the model assumptions are expected, choose a low filter strength.
For example, if a vessel is filtered with the 2D Constant Velocity model, but the vessel accelerates, choose a low filter strength.

QINSy allows that, for specific parts of the model, the weight can be set separately from the overall filter strength. More on that subject can be found further in this document.

In fact, a dynamic model of a Kalman Filter consists of the state of an object and dynamic equations. For navigation purposes, the state vector consists of at least Easting and Northing and is usually extended with a course and speed state. So if the previous position, course and speed are known, this position can be extrapolated to a new position, using the equations of motion. In Kalman filter literature, this is called the time update. Since the model is an approximation of reality, errors are made. These errors are quantified as process noise and this can be set with the filter strength and SD's in QINSy.

Top of page

#### Input of the Filter

The position filter needs input from various systems to improve the estimate.
The most important input is the raw position QINSy has calculated for the object. This position can be taken directly from a positioning system (such as a GPS-receiver or USBL), but the calculation can be more complicated for certain setups. If, for example, more than one system that gives a position is present on an object, QINSy takes all of them into account.
Other observations, relevant for the model, are gyros and doppler systems that output an angle and a speed.
The reliability of these observations must be known to the position filter.

In the Database Setup, the standard deviation (SD) of an observation can be set. This is a figure that describes how much you can trust the observation. In other words, the error. A high standard deviation means that the error is high, so the observation is unreliable.

Standard deviations entered in QINSy are 1-sigma.

These standard deviations must be correctly set! The values should be described in the manual of the systems that are connected to QINSy. If the values are wrong, it could happen that the position filter will trust an observation that is unreliable, which will result in bad filter results. For positioning systems QINSy can use the SDs that are output by the system.

Always make sure that standard deviations (SDs) set for observations are correct! Read the manuals / spec sheets of the systems that are connected to QINSy.

When input is applied to a Kalman filter, we speak of an observation update. The effect of the observations on the state vector is calculated and a weighted average is calculated. The weights are calculated from the process noise and the standard deviation of the observations. The latter is called observation noise.

Top of page

#### User Interface

The position filter settings can be found in the Computation Setup, when an object is selected.

Dynamic model & Filter strength
See the paragraph about the dynamic model in this howto.

Extended parameters & noise SD
The position filter can be extended with extra observations. The standard deviation (SD) that is set here, tells the filter how large the error is that it is making when estimating this state.

In literature, the following rule of thumb is given: set this value to about a third of the maximum change that is expected on the observation. An example: if the maximum rate of turn of the filtered object is 6 deg/s, set the noise SD to 2 deg/s. However, in practice, you may wish to experiment with this value.

Filter object height
Enable this checkbox if the height, in addition to the position, is also to be filtered.

The heading from the priority (see the Attitude tab) is used in the filter. If this is deselected, a heading is calculated from position updates.
Heading is ignored if course is enabled.

Check these boxes if a system that measures speed & course (such as a doppler velocity log) is connected.

Observations
Select the observations that are to be used as speed and/or course. The observation SD that can be entered here overrules the one set in the Database Setup. It is important that this SD is correct!

Reject speeds
The speed and course observations are both disregarded, if the speed exceeds this threshold. This threshold is used to filter out spikes in doppler data.

COG / SOG
These parameters set which results are used in the rest of QINSy as a course and speed over ground. These results are used in the next computation cycle as an input. Choices are: Kalman Filter, Position Updates, Manual and to use an observation. If Kalman Filter is selected, the results from the position filter are used. If Position Updates are selected, a course and speed are calculated from the last couple of positions.

Usually, this needs to be set to "Kalman Filter", if a position filter is enabled and set to "Position Updates" if the filter is disabled.

Prediction
This parameter allows the position filter to calculate new positions without position input. Other observations, such as doppler velocity log or gyro are still used.

Prediction is an important feature of the position filter! It can be used to continue the survey if there is a GPS outage due to sailing under a bridge, for example.

Top of page

## Typical Settings

#### Vessel

Choose the 2D Constant Velocity model.
Set filter strength to Low or Very Low.
Verify that in the Position Results tab, the COG and SOG values are set to Kalman Filter.

Top of page

#### ROV (USBL with doppler velocity log)

Enable the target beacon (node) from the tree list in order to enable the ROV object.
In this example, the DVL (doppler velocity log) is assumed to be more accurate than the USBL system, so the DVL will be weighted heavier.

To do this, the SD of the USBL should be increased in order to give the USBL observation a lower weight in the Kalman filter. In this example the USBL SD is set to 2 m.

The SD of a USBL system is commonly set to 1 m for every 100 m of depth.

If the USBL data should have a bigger or smaller influence, the weighting of the USBL can be changed by decreasing or increasing the SD value until a satisfactory result is achieved. Remember: high SD = high uncertainty = low weighting.

It is important to set up the database correctly for the DVL system.
1) The CoG (center of gravity) of the ROV, also called reference node, must be as close as possible to the actual rotation point of the ROV.
2) Both DVL observations (speed and course) must be defined at the sensor location.
Otherwise, the DVL observations will be wrongly corrected for any existing rotation of the object.

It is important that the DVL system is calibrated correctly. An incorrect angle or speed will cause the filtered ROV track to deviate from the raw USBL track. In case this deviation is too large the Kalman filter will reset and start with the next USBL position.

On the ROV, choose the 2D Constant Velocity model.
Set filter strength to Very Low.

"Very Low" strength is more than enough; when the filter is set to a stronger setting the natural flow of the ROV track wil disappear.

Enable the speed and course observations and choose the DVL angle and speed observations.

For convenience, the observation SD of the DVL observations can be changed here. This SD is used, not the one in Database Setup. This SD should be set to the accuracy of your DVL system.

Set the speed threshold to some high value, which the ROV would never reach.

Top of page

#### Towed Fish

In most cases, the tow fish will be positioned with a Manual Layback.
In the Computation Setup, select the manual layback and set the rotation to the COG (course over ground) of the survey vessel.
If the tow fish does not have a depth sensor enabled, enable Use 'Z', just like this example.
Manual Layback is an inaccurate observation. This means that the standard deviation needs to be set to a high value, such as 20 m.

The tow fish is positioned by taking a bearing from the survey vessel to the tow fish, with the range set in the manual layback driver. In the rotation column, one needs to select which bearing to use. In this example, a bearing of 180 degrees minus the COG of the survey vessel is used.

Since the COG of the survey vessel is used to calculate fish position, this course needs to be stable. So the vessel positions need to be filtered.

Select the survey vessel and enable the 2D Constant Velocity Kalman filter.
Set strength to Low.

Set COG and SOG values to Position Updates.
Leave the count at 10.

This means that the last 10 positions will be used to calculate the course and speed over ground. Since the position of the vessel is filtered, the course will be more stable.

On the tow fish, select the 2D Constant Velocity Kalman filter.
Set strength to low.
Verify that in the Position Results tab, the COG and SOG values are set to Kalman Filter.

Top of page

#### Stationary Object

For a stationary object there is no specific dynamic model, but the 1D Constant Velocity model will work fine.
Set the filter strength to very high, since we want the object to follow the model as close as possible.
Tick Filter object height and add speed and course observation.
Select manual course and speed and enter 0.0 for both of them.
Verify that in the Position Results tab, the COG and SOG values are set to Kalman Filter.
While online, the Scatterplot Display is an interesting display to see the statistics oft the calculated position.

Top of page

## Summary

• The position filter filters object positions, not individual observations.
• Use the position filter to
1. Smooth an object track,
2. Fuse information from different sensors, such as USBL and doppler velocity log,
3. Predict an object track if GPS (or other position sources) fails for a little while.
• Choose a dynamic model that approachates the movement of your object.
• Set filter strength higher if the object behaves closer to the model.
• Set the extend model SDs to 1/3 of the maximum change of that quantity.
So if the maximum rate of turn of your vessel is 6 deg/s, set SD to 2 deg/s.
• Make sure the observation SDs of your observations are correct!
This includes: GPS, USBL, doppler velocity log and gyro.

Top of page

## Questions about Kalman Filters applied in QINSy, prediction and deskewing.

General documentation describes three types of use for a Kalman Filter:

1. update/filtering (estimate of state vector at time t_k using all epochs up to and including time t_k)
2. prediction (estimate of state vector at time t_i after the last set of measurements at t_k, where t_i > t_k)
3. smoothing (estimate of state vector at time t_i using all the measurements from t_1 to t_n where t_1 <= t_i <= t_n)

Q1: In QINSy, when Online, if a vehicle has a KF set on the Position Filter tab but no prediction set on the Position Results tab, then is this doing type 1) of KF application described above? If the vehicle has a KF set on the position filter tab and prediction is set to "yes" on the position results tab is this doing type 2) of the KF application described above?

A1: More or less correct. If a Kalman Filter is enabled, QINSy will update the state vector with a weighted mean of (1) a prediction from the last trigger time to the current trigger time (called time update in KF literature), and (2) the position and external observations (called observation update in KP literature). The position observations are only added for the new trigger time (t_k in usage type 1). The external observations are added for both observation update time and trigger time. When prediction is enabled, BOTH steps continue, but without the position observation updates and using an internal heartbeat time (t_i in usage type 2). So if an external speed and course observation (for instance from a DVL) are enabled, it will continue to use those observations during prediction. In other words, the QINSy Kalman Filter is always of usage types 1 (during position trigger updates) and 2 (during prediction), but if you consider a whole online or replay session, then you could regard the position results as usage type 3 (smoothing of raw position track).

Q2: When using Replay, is type 3) of the KF application being used? Is there anyway to force replay to be able to use either type 1) or type 2) of the KF application, and thus reproduce what is seen online?

A2: In Replay, the Kalman Filter acts the same as in the online situation. The only difference could be that more (external) observations are available in case there was a latency online or in case data have been imported. See previous answer.

Q3: If the vehicle has no KF set but has prediction set on the position results tab, then what is used to predict the position?

A3: QINSy will use the Course Over Ground and Speed Over Ground (as selected on the position results tab) to linearly extrapolate (deskew) the last position to the current heartbeat time. The height is computed by applying the delta height from the priority height system (selected on the height tab) to the last known position height.

Q4: In the Generic Layout Editor, for node positions there is an option to use deskew. Please can you explain what happens in both of the cases "no" and "yes", when the trigger is time (say every 5 seconds)?

A4: With "no", the last position is displayed. With "yes", the position is extrapolated to the display time. See previous answer.

Q5: Is there an option in the Computation Setup to choose deskew or not?

A5: Enable prediction without a Kalman Filter.

Q6: Do the online positions (seen in displays) use deskew or not?

A6: This depends on the display. Most displays show Raw data (observation time) or Results (trigger time) and do not (need to) deskew positions. Some displays update on fix events and will deskew the positions to fix update time. The same applies to online export modules.