Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Heave (vertical displacement in waves) estimation #8

Open
mgrouch opened this issue Aug 21, 2024 · 2 comments
Open

Heave (vertical displacement in waves) estimation #8

mgrouch opened this issue Aug 21, 2024 · 2 comments

Comments

@mgrouch
Copy link

mgrouch commented Aug 21, 2024

I did some research on how it can be estimated based on vertical acceleration.
There are two approaches.

One is by plugging acceleration into trochoidal wave model, which allows to calculate displacement from acceleration at any given time.
It requires estimating frequency of the acceleration and adjusting it for Doppler effect due to boat moving through the waves.
Estimating frequency of acceleration can be done without doing Fourier transform, by using
Aranovskiy frequency estimator filter.
Acceleration sampling need to be high frequency 100Hz or higher if possible.

Second method is Kalman filter that calculates double integral of acceleration into displacement and adjusts for drift of the integration based on average zero vertical displacement. Again acceleration sampling needs to be high (>= 100Hz)

Do you know what max frequency of acceleration sampling you can achieve with the IMU hardware you are using?

Here is write-up I did for both methods with all required formulas and algorithms:

https://bareboat-necessities.github.io/my-bareboat/bareboat-math.html

With Aranovskiy estimator it all can be done as a set of on-line filters.

Thanks

@mgrouch
Copy link
Author

mgrouch commented Aug 21, 2024

I’ve looked at datasheet for BNO085

https://www.ceva-ip.com/wp-content/uploads/2019/10/BNO080_085-Datasheet.pdf#page50

It looks like it can provide linear acceleration at
400Hz. Which is very promising

@mgrouch
Copy link
Author

mgrouch commented Aug 24, 2024

I’ve experimented a little with estimating wave frequency using IMU. I have m5atom with built in mpu6886 and tiny LCD to display it.

Here is the code

https://github.com/bareboat-necessities/bbn-wave-period-esp32

so far no tilt compensation, sample rate is too low 100Hz and I didn’t find the way to switch accelerometer rage from 8G to 2G for better readings (in ocean waves you have less than 2G accelerations). 1G is breaking wave.

If I can make good estimates for wave periods then I can add Kalman integrator, estimations from trochoidal model and Doppler adjustments.

I actually played with those too.

Good IMU is important, lower noise, higher sample rate, control over acceleration measurement range, less bias and drift on compass, as well as less lag in AHRS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant