joe045 / wave_sensors_one_ocean_expedition_2023

Processing of the wave data obtained during the One Ocean Expedition
0 stars 0 forks source link

Filtering #3

Closed joe045 closed 1 year ago

joe045 commented 1 year ago

Hei again @jerabaul29,

There are some outliers of Hs for the radar and ug1 (about 20m Hs) that I would like to remove. The easiest is to remove them directly from the Hs time series, but I guess it is more "correct" to remove them from the original elevation data?

I have had a look at the maximum of each probe, and they are all saturating between 15.4 - 15.8m, but most often the radar (slide 1). I have tried to remove all values above 15.2m (maximum range for ultrasonic probes) and using the 1.5 IQR rule (slide 2,3 and 4). Both methods actually give worse results (slide 5). I think it is because the data is also filtered when setting fmin = 0.05 and fmax = 0.5. So when I remove some outliers, some values that earlier were excluded by the frequency range gets included.

Do you have a better suggestion for how to remove the outliers?

Some smoothing is performed when calculating the power density spectrum with a savgol filter (slide 6) (signal.savgol_filter(Pxx_den, window_length=9, polyorder=2), but it does not impact the Hs if I remove it.

outliers.pdf

jerabaul29 commented 1 year ago

Hi @joe045 :)

Sorry for the small delay, a bit hectic here as usual :) .

A few thoughts from your figures:

A small extra note: I am a bit surprised by how different UG1 is compared with UG2 / radar. Is this doing the (correct) motion compensation? If so, this is really a demonstration that motion compensating a sensor at the very from of a sailship bowsprit is really hard - which a posteriori may not be so surprising :) .

joe045 commented 1 year ago

Thanks for taking the time to give good answers Jean!

I have looked at the daily min, max and mean values for the three probes (see slide 1). In the user manual it is stated that the accuracy of the Ultrasonic and Radar probe is ±0.25% of measured range. May the reason for larger outliers for ug1 and radar be that the mean range is generally larger than it is for ug2? And why is the mean range for the radar larger than ug2 when they are mounted at the same locations? Is it also related to the ADC conversion?

The histogram is a good way visualize it! I guess it is better to show 30minutes than a full day so that it is easier to spot the outliers (slide 2 and 3)?

These figures are raw elevation data, not compensated for the motion of the ship. I added some figures comparing significant wave height for ug1, ug2, radar and solely IMU data if you are more curious :) In these figures no outliers are removed, except for the frequency limitation.

Outliers_new.pdf

jerabaul29 commented 1 year ago

Happy this discussion helps :) .

Regarding slide 1:

Agree, the histograms look really good, it is very well visible what is outliers :) .

These figures are raw elevation data, not compensated for the motion of the ship. I added some figures comparing significant wave height for ug1, ug2, radar and solely IMU data if you are more curious :) In these figures no outliers are removed, except for the frequency limitation.

Ok, interesting. If you can also add figures for UG compensated with IMU it would be great :) . In theory / if we manage to build and post process the system / data well, that should be giving the best results :) . The "both nice and tricky" thing is that with these waves motions, all the measurements (IMU, UG) are always a "not so complicated to related to local swell using a well tuned simple transfer function", so even if the "IMU+UG" should be best, it is well possible that in practice, with a bit of tuning, "IMU" or "UG" is good enough / even better.

joe045 commented 1 year ago

Fabian's thesis states that the PRL-050 is used, and in the manual PRL-050 refers to 50ft = 15m. But I should have mentioned that the figure above is for the new inverted radar fluctuation (to match ug2 fluctuation). The mean is calculated over each 30-minute file:

    radar_wrong_fluctuation = old_radar - radar_mean
    radar_right_fluctuation = -radar_wrong_fluctuation
    new_radar = radar_right_fluctuation + radar_mean 

The old radar fluctuation does not exceed 15,57m and has minimum values around zero, which is probably more similar to what you expected? Slide 1 (orange is old radar and green is new radar), 2 (new radar) and 3 (old radar) shows that the old outliers around zero, are shifted to 20m (twice the mean). But the old radar fluctuation actually has several values exceeding 15.2m than the new radar. The old radar also has some negative values down to -1m that are unrealistic.

I will therefore continue with the new radar with an elevation limit. Excluding ug1 values above 15.2m actually gives worse results (slide 4), so I will only exclude values above 15.8m, so that only the radar is affected.

The figures above named UG is the combination of UG+IMU (should have been clearer about that). But I had a look at solely UG data (slide 5), and it looks like the UG+IMU gives the best results (I will do some statistics on it). For the ug1, the difference is quite large, so the IMU compensation is needed as expected!

Otliers_newest.pdf

jerabaul29 commented 1 year ago

Thanks for the update about the radar "conventions", that makes sense, I think it is simpler for the user to show things in the "natural" way, ie actual radar range - it is a bit confusing otherwise to read about radar readings that are appearently "out of range" due to the offset even though they are not truly out of range ^^ :) .

Ok, sounds good - agree it is very expected that UG + IMU should be the best, this is what we hope for / how things should be if the processing is done correctly :) . I think that being very detailed / explicit / not having any implicit convention makes it easier to understand, so yes it may be a good idea to write UG / radar + IMU :) .

Sounds excellent, then I think all makes sense and the results look really good actually :) . Let me know if you want to have a chat some day in case there is more to discuss (but seems that everything is clear now right? :) ).

joe045 commented 1 year ago

Forgot to answer, but yes, everything is clear now! Thanks again :)