RC Submarine 5.0 – testing and PID tuning (9/10) 0 ▲ Brick Experiment Channel 3 hours ago · 10 min read2012 words · Tech · hide · 0 comments 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… No comments yet. Log in to reply on the Fediverse. Comments will appear here.