Skip to content

Specification

Howard (Luhao) Wang edited this page May 21, 2019 · 10 revisions

Overview

Our main goal for this quarter is to generate accurate information about wave statistics using the Smartfin’s IMU data. The wave statistics that we are interested in generating include: significant wave height, peak period, and peak direction. The IMU consists of an accelerometer, gyroscope, and magnetometer.

Approach

To determine significant wave height, we will have to create a data processing framework for the values obtained by these sensors over the course of the surf session to determine the orientation of the fin in the water. Once we can accurately determine how the fin is positioned, we can double integrate over the accelerometer values that correspond to the vertical axis in order to obtain vertical displacement while the surfer is floating. We will reset the calculation of wave height after each wave that passes in order to prevent the added error of double integrating wave height over time to become compounded. To determine the peak period, we will perform spectral analysis on the Smartfin’s accelerometer data. “Spectral analysis assumes that the sea state can be considered a combination of a large number of regular sinusoidal wave components with different frequencies, heights, and directions” (link). Spectral analysis is based on the FFT of the signal obtained by the Smartfin’s accelerometers, from this we can calculate a wave’s peak period and direction.

Main Objective

We will need to iteratively test and rewrite our current wave height and direction algorithms in order to ensure that they perform as planned. To test our algorithms, we will do two types of controlled tests where there is relatively little noise in order to see if our algorithms do what we expect. The two tests would be: simulating waves in a pool setting, and simulating waves using Scripps’ datawell ferris wheel (which is what they use to simulate waves to make sure that their buoys are calibrated correctly). If we are able to do this relatively well, we will test our algorithms in a real world setting, by floating on a surfboard with the Smartfin in the ocean, then compare our results to the CDIP buoy. The final tests would consist of surfing with the Smartfin, which would create an extremely noisy dataset, finding the points where the surfer is floating, and then see if we are still able to generate accurate wave statistics results using the Smartfin’s IMU data. Additionally, because of the presence of noise in these sensors and the environment, we will also need to test and adapt different filtering methods in order to produce the cleanest result. Secondary objectives for Smartfin, if the first is achieved, include figuring out solutions to gps data transmission from the Smartfin, as one of the problems deals with signal propagation in dense mediums such as water. Another objective is to develop the Smartfin platform to be able to gather data more effectively. This might include added features for surfers to more easily and more willingly gather data during their recreational surfs.

Milestones

Our milestones would therefore be: ensuring that our algorithms work in a controlled environment via pool and datawell testing, and that our algorithms work in the real world, which consists of testing in an ocean environment.

By midway through the quarter, we should have a working model from the pool environment ready to go, which is both mature and easily applicable to surfing in a relatively calm beach/coastal setting. Once our model is able to handle and filter noisy signals, near the end of the quarter we will make beach trips to test out our code in actual coastal environments. This will be done at beaches near campus.

Major Deliverables

Our main deliverables for each of these goals would be:

  1. The code that was written to accomplish each goal.
  2. Data models from our filtering.
  3. In-depth analysis/notebook entries of our findings. These will include reports for each processing framework that describes how it was tested and the amount of error present in each test case.

Constraints, Risks, and Feasibility

A potential risk that we may run into is that testing in a real world condition, like using the Smartfin in the ocean, is very difficult because of the amount of noise present. We will have to create an extremely robust way of processing data in order to produce an algorithm that can calculate wave statistics and surfer location over the course of a surf session which will often span 1-2 hours and consist of multiple wipe-outs. Additionally, because of the short length of the quarter system, we are deciding to focus all of our energy on this specific task in order to do it well, rather than try to do this task in parallel with another (ex: “dead reckoning” surfer location from IMU data).

Group Management

Group Roles

The major roles in our group’s management are: project lead/project manager (Jasmine Simmons) and team members (Samprith Kalakata, Brendon Ho, Howard Wang). Decisions will be made by a team consensus, so that everyone can contribute equally to how we proceed with implementation decisions within the scope of our predefined project. Roles may be switched interchangeably as project development progresses.

Group Communication

We will communicate via the #smartfin channel in UCSD E4E on Slack. We will have 1-2 meetings per week for 1-2 hours, held on Tuesdays/Thursdays before class, (usually from 11:30am-1pm).

Group Scheduling and Deliverables

We will use our detailed project schedule (which appears in the last section, “project schedule”) to guide us, so that we know when we are on or off schedule. We will deal with schedule slips by factoring in some time to refactor code that isn’t working; additionally, we are planning on having two iterations of our product, so that hopefully at least one works. We will create a Gantt Chart in the project schedule section to determine who is responsible for which deliverables and milestones.

Deliverable Responsibilities

This is included in the project schedule section of the wiki.

Project Development

Filtering, Orientation - Brendon

Problem:

How to determine the orientation of the device from the Smartfin’s IMU data. How to determine what filters to use on the data (high pass/low pass/buttersworth).

Solution:

(Adapted from https://journals.ametsoc.org/doi/pdf/10.1175/2010JTECHO724.1)

  • Calculate orientation
  • Library scikit seems to have a way to find orientation based on IMU data...
  • Determine what filters to use
  • There are two limitations that will keep the buoy from accurately measuring the waves:
    • At higher frequencies, the wave wavelength becomes comparable to the buoy dimensions and the buoy will not be able to follow the particular waves anymore (geometric attenuation). In other words, there is lots of noise.
  • Solution: Apply a low pass filter
  • At lower frequencies, the accelerations become very small and disappear in the sensor noise.
  • Solution: Apply a high pass filter

Sources:

Wave Period and Frequency - Jasmine

Problem:

How to determine wave period and frequency from the Smartfin’s IMU data?

Solution:

(Adapted from https://journals.ametsoc.org/doi/pdf/10.1175/2010JTECHO724.1)

  • Obtain vertical acceleration
  • Assumption: using controlled experiment data, we already know that the fin is essentially upright, so we can just use IMU A2 since we believe the error between reported vertical acceleration and actual vertical acceleration to be small
  • When Brendon’s orientation code is written, we can test using the “real” vertical acceleration
  • Filter to remove outliers in acceleration data, then linearly detrend data
  • remove values > 3x the standard deviation
  • data interpolation using cubic splines to replace removed outliers
  • Kalman filter
  • Take FFT of filtered vertical acceleration data, then use Kaiser-Bessel window to reduce spectral leakage, then calculate power spectra for acceleration wave spectra
  • Apply frequency-domain filter to remove low-frequency noise
  • Noise-corrected acceleration spectra is converted into displacement spectra by dividing by the frequency to the fourth power
  • Apply heave RAO used by NDBC and determine significant wave height, peak period, and mean wave were determined from the displacement spectra (using definitions provided on the NDBC website: http:// www.ndbc.noaa.gov/)
  • Choose reported peak frequency as “true” frequency
  • Test on controlled pool experiments to verify correctness; later test against CDIP results to verify correctness on ocean data

Sources:

Wave Height - Samprith

Sources:

Wave Direction - Howard

Problem:

how to determine Wave direction from given constraints and instruments?

Approach 1 (use the fin):

  • Use embedded IMU to determine wave density changes when surfer orients his/her surfboard any which way. The direction in which the wave density is most prevalent is the incoming direction of the wave. This is because is the surfer’s board is against the wave, more force and mass will be pushing against the Fin.
  • Calculate wave density from acceleration values of the surfboard or lack thereof. This can be done by taking into account the mass of the surfer and the energy it takes to move the surfer a certain distance, whether this is against the wave or with the wave
  • Use these density values in a 360 degree context to pinpoint the direction the wave is coming from AKA hitting the board most strongly.
  • Take tests at proximal locations to determine if results are collectively accurate, or simply an errored reading.

Approach 2 (use existing buoys):

  • The second approach is to use the scattered buoys to get a general sense of which direction the wave is traveling within a certain area of the ocean

  • This approach is technically more accurate as there is less room for minor errors such as error readings with the smartfin and erratic movements involving the surfer.

  • Source/inspiration:
    https://cdip.ucsd.edu/?nav=recent&sub=observed&stn=073&stream=p1&xitem=splot

Hardware/Software

In terms of hardware, we will be working exclusively with the Smartfin that has been developed by Scripps and handed out to surfers, mostly in the San Diego region but also in other parts of the world. We have a surfboard available for use for testing in the ocean (Jasmine’s longboard) as well as an extra fin that anyone on the team can borrow for testing within the lab. We shouldn’t need anything else to accomplish this project. For software, we will be coding in Python and using Jupyter notebooks as well as a shared Github repo in order to share all of our updated work with each other as well as Prof. Ryan Kastner and other students in the class at the end of the quarter. We will write up our documentation in our shared google drive folder.