We want to develop the control software for the glider in a way that will allow testing. In theory, with an accurate glider model, this allows you to develop the software independent of hardware, reducing the cost/time of PID optimisation.
The control software sets the buoyancy and trim and requests the angle and depth. Therefore, the Arduino code is written so that it either controls real or simulated hardware. A compiler flag is used to switch between real or simulated hardware.
Using Unity3d I created a simulation of the glider ascending/descending. The movement through the "water" is modelled using the buoyancy engine, Realistic Water Physics. The glider is modelled as a number of elements, the main body, a volume at the front that changes buoyancy and a mass that moves on the underside of the body that trims the angle.
Unity provides an Arduino with depth/gyroscope readings which are then used by the Arduino to calculate motor movements and these are passed back to Unity. Using these motor movements, Unity models the simulated glider.
The below GIF shows a screen capture of the glider simulation ascending and then descending.
Over the coming weeks I will optimise the simulation model to accurately reflect experimental data from the glider.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.
Hi Oliver. Do you have the files for this simulation publicly accessible ?
Are you sure? yes | no
Hi,
I am stuck at MATLAB simulation of the spiral path using Zhang et. al. 2013. Any guidance there? are you using any similar research work for underwater motion simulation?
Are you sure? yes | no
Have you checked out Bowler Studio? I have not looked into it in detail, but it might help you avoid reinventing the wheel for a lot of the simulation/real life control stuff
Are you sure? yes | no
Thanks for the pointer to Bowler Studio. Our current plan is to migrate the control system to use https://www.ardusub.com/ as it has a lot of the elements that will make mission planning and management easier. It has linkage to external simulators that may also be useful. The obvious issue is that it is aimed at motorised subs so we will have to graft in the glider behaviour.
Are you sure? yes | no
that's cool. I'm looking forward to seeing this develop!
Are you sure? yes | no
will the controls account for various surface and submerged currents, and how will those affect the glider?
Are you sure? yes | no
Not yet. Initially, the aim is to get the Arduino to control the glider (real or simulated) in still water.
There are a number of things which we plan do next:
* characterise the gliding behaviour
* validate the simulation against the real data
* simple mission descriptions, glide angles with turn depths
At the moment the glider doesn't have a GPS so the absolute position isn't known but the IMU may be able to identify underwater currents when the motion doesn't match the expected gliding behaviour.
Are you sure? yes | no