72 days ago · 10 min read2012 words · Tech · hide · Fediverse post

Now the submarine is built and the software written. It’s time to test it, tune the parameters, and make the final fixes. Tuning depth control Submarine’s depth is controlled in a cascaded P+PI loop, where we have a P-controller for position and a PI-controller for velocity. There are three parameters to tune: POS_KP, VEL_KP and VEL_KI. I started testing in a water container that is only 25 cm deep. To stop surface tension from messing with the tests, I used a Lego structure on top to hold the submarine just below the water level. To get comparable results, the submarine needs to be neutrally buoyant at the start of each step response. Since there is no ballast level sensor, I used an automated launching procedure: 1) setup the submarine slightly negatively buoyant so that it floats at the surface, 2) in code, start slowly pumping water into the ballast, 3) wait until the depth has increased by 1 cm (meaning the submarine has detached from the surface), 4) start the automation for 15…

Commenting on Bubbles has been removed. Why? If you want to talk about this post, write to the author, use the comments on their blog if it has them, or reply with a "RE:" post on your own blog. Suggestions? feedback@bubbles.town