Driving a boat & abstractions

Driving a boat & abstractions

Amsterdam is a beautiful city permeated with rich & artistic canal system knitted along streets & bridges. A trip to Amsterdam is not complete without cruising its canals in a boat. If you are in Amsterdam for a few days, you can rent out a self-drive boat from one of the many providers like:

  • mokumboot, canalmotorboats: Electric boats, speed limited & convenient for first timers.
  • clickandboat: This is like airbnb for boats. If you are lucky you can get a powerful motorboat which runs on gas.

Please read the rules & adhere to the instructions & map provided when you get the boat.

Boat Mechanics

Boat is an extremely simple device when compared with a car. It also requires no understanding of physics to drive a boat - trial and error for 15 mins will get you tame a canal motor boat easily. However, getting to know the mechanics of it can make you appreciate it better - like Richard Feynman appreciates a flower.

Motorboats come with just 2 controls:

  • Throttle: Controls power of the propeller to push water - Forward & Backward.
  • Direction Control: Basically this controls the direction in which the boat's propeller pushes water.

Further, there are 2 variants in which these controls are presented to the captain - with a steering wheel or with a tiller (a stick). The effect is the same, a captain provides a value for the direction & power of a propeller for every time instant - and the boat responds with motion.

Abstractions & models

If all of software engineering was to be condensed into one word, it would be abstraction. Abstractions have a wider applicability though. An interesting power of an abstraction is that it does not need to be correct in order to be useful. Abstractions when applied to the process of thinking produce mental models. We shall be modeling the mechanics of a boat into a crisp abstraction, which shall help us drive it easily.

In order to do this we need to understand the difference b/w driving a car vs boat. Typically you will note the following:

  • Do the same moves as a car, but expect a delay in turns. As speed increases, the delay goes down.
  • There is no brake. Brake = Throttle forward - backward - forward - backward ... with decreasing amplitude.

The above abstraction actually works quite well, but can we do better? Let's see the mechanics from the lens of basic physics & find out...

Physics of car vs boat

The basic difference b/w the two in terms of physics can be summarized as:

  1. The center-of-mass of a boat must move left a little in order to do a right turn. This is not true for a car.
  2. The rectangle of a boat as seen from the sky can move (translational motion) in an arbitrary direction, which is not the case for a car.

Where are these inferences coming from?

A boat can be treated as a rectangle on a frictionless surface with a propeller attached at the center of rear end, acting like a rocket's thruster applying a force exactly at the rear center.
Free body diagram of a boat from sky

Now, let's see how this free body takes a right turn, assuming we start from a boat at rest. In order to do so, the propeller has to push the boat LEFT i.e the red force arrow would move to B. In this situation, the effect is that the boat will rotate clockwise & the center of mass would move towards north-west.

A new captain would keep doing this move-B for much longer expecting a right turn and the sideways velocity gets very uncomfortable soon - specially in narrow canals. The solution is to do move-B for a while - quickly followed by a half move-A followed by small corrections to reach the center as shown in the graph below:

Taking a right turn: Y axis represents the amount of motion of the steering

The Abstract Model

The free body diagram of a rectangle with arrow at the rear center is the perfect abstraction for captaining a boat. A captain has to imagine being given control of the power & direction of the F arrow. And then one has to simulate the motion using the a mental physics engine*.

Typically tiller based boats are harder to navigate than steering based ones. But, this abstract model fits perfectly in that case.  The direction of tiller matches the direction of thrust - and using the model above helps.

*We all have a mental physics engine - LeCun, the chief scientist at meta calls it common sense & has been using it to improve AI systems! Thought experiments like this help improve the powers of the mental physics engine!