DEV Community

Cover image for SLX SeaBalance · STM32MP135 Roll Stabilization Controller
Marco
Marco

Posted on Originally published at siliconlogix.it Fully Autonomous

SLX SeaBalance · STM32MP135 Roll Stabilization Controller

Roll is the side-to-side rotation of a vessel about its longitudinal axis. Even on a steady heading, the deck can tilt with each passing wave. On a workboat, reducing this motion helps steady operations on deck and limits the accelerations experienced by crew and cargo. SLX SeaBalance uses two active fins, one on each side of the hull. The controller estimates the vessel’s motion and adjusts the fins to oppose it.

From vessel motion to fin commands

The controller runs on an STM32MP135F-DK board. A PC simulates the workboat’s motion, inertial measurements, and actuators. It sends accelerations, angular rates, vessel speed, and virtual fin positions to the board over Ethernet. The board returns its roll estimate, the angle requested for each fin, and the control status. The simulator applies those commands to calculate the vessel’s next movement.

Ethernet link between the simulator and the STM32MP135F-DK controller, carrying measurements to the board and fin commands back to the simulator.

The PC calculates the motion of the vessel and its virtual fins. The controller uses the measurements it receives to set the fin commands for the next step.

The two devices exchange SLXB messages over UDP. The PC sends a sample and the board returns a response at each 20 ms step of simulated time. A session identifier and sequence number match each command to the sample that produced it. A C++ service on the board runs the controller and supplies measurements and operating states to the touchscreen. The service and operator interface both run on OpenSTLinux. STM32MP135F-DK, STMicroelectronics.

Estimating roll while the vessel is moving

The controller combines readings from the gyroscope and accelerometer in the inertial measurement unit. Integrating the gyroscope’s angular rate gives the change in roll angle, although even a small bias accumulates over time. The accelerometer can provide a gravity reference when the vessel is moving gently. During a turn or an oscillation, its readings also include acceleration from the vessel’s motion.

A complementary filter combines the two signals. The gyroscope tracks rapid changes, while the accelerometer gradually corrects drift. The filter reduces or skips that correction when the reading is inconsistent with gravity or with the predicted tilt. The control loop uses both the estimated roll angle and the rate at which it is changing.

How the controller damps roll

The fins turn in opposite directions and generate opposing vertical forces on either side of the hull. Acting at a distance from the longitudinal axis, those forces produce a roll moment. The controller uses both angle and angular rate, so it can respond when the vessel passes through upright while still rotating quickly.

In PID mode, the proportional term responds to tilt, the derivative term opposes the motion, and the integral term corrects sustained deviations. The controller limits integral buildup when the fin command reaches its travel limit and limits the rate of change of the command to smooth transitions. SLX mode uses the same measurement and command interface. At lower vessel speeds, the flow over the fins provides less corrective force. SeaBalance suspends automatic control below the configured speed threshold.

Touchscreen controls and operating status

The Assetto screen shows estimated tilt and fin positions. From Bilancio, the operator can take control from the PC, enable or disable automatic stabilization, or set fin angles manually. Manovra sets speed and heading references for the simulated vessel. Allarmi shows conditions that prevent automatic operation.

SeaBalance touchscreen showing stabilization settings, with Off, Manual, PID, and SLX options and a button to return control to the PC.

The stabilization screen lets the operator choose a control mode and keep command authority on the touchscreen or return it to the simulator.

The controller checks whether measurements are current and compares requested fin angles with reported positions. If the inertial signal drops out or a fin fails to track its command for a sustained period, the controller gradually returns the requested angles to neutral. The touchscreen shows the selected mode alongside the mode in effect so the operator can see when stabilization is suspended. Before automatic control is available again, the controller needs valid measurements, fins close to neutral, and an acknowledged alarm.


This English article was drafted and translated with AI from Silicon LogiX project material and editorial direction.

Canonical article on Silicon LogiX.

Top comments (0)