
It Takes Two Neurons to Ride a Bicycle (2004) - orenjacob
http://paradise.caltech.edu/~cook/papers/TwoNeurons.pdf
======
amerine
This is a really easy read if folks are looking for easy-to-digest papers!

From the results:

> Although the two-neuron network controller works well for a range of speeds,
> one thing the controller does not do is to try to dampen the instabilities
> that can arise when riding too slowly or in too sharp of a turn. (This would
> probably require a third neuron that is dedicated to this task.)

------
dahart
> There is not a direct or fixed correspondence, but as a general rule, during
> stable riding, a higher clockwise torque on the handlebars will cause the
> bicycle to start leaning more to the left

It's counter-steering! I was glad to read that counter-steering is accounted
for and works in their physics simulation like it does in the real world.

I don't have a source handy, but I believe that there is a fixed
correspondence between steering angle and the resulting turn that depends on
the bike's speed, lean & steer. (And maybe tire radius counts too.) A bike
riding in a stable constant clockwise turn will have a slight right lean &
clockwise steer in steady-state. Steering clockwise from there will turn the
bike left, or increase the turning radius until it's straight and then start
turning counter-clockwise. Steering counter-clockwise from steady state
clockwise turn will turn turn the bike right, increase the lean and decrease
the turning radius.

~~~
aidenn0
The fixed correspondence between leaning and turning is easy to derive on your
own:

Draw a picture of a leaning bike from behind. Add a horizontal line for the
ground. Assume the entire bike/human system is leaning an equal amount, so put
the center-of-mass somewhere in the leaning line.

If the bicycle is maintaining a constant amount of lean, then the extended
line of the force applied by the ground to the bike must pass through the
center of mass (i.e. in this case the angle of the force vector is the same as
the angle of lean).

Now decompose the force vector into vertical and horizontal components. The
vertical portion when riding on the ground (i.e. not jumping the bike),
neglecting aerodynamic effects, is fixed to be the gravitational force, so it
will be constant regardless of the direction of lean.

This means that the horizontal portion of the force will be equal to the the
gravitational force times the tangent of the lean-angle. This also means that
when the tangent of the lean-angle exceeds the coefficient of friction between
the tires and pavement, you will crash.

The turn-radius can then be calculated by treating the horizontal force as the
centripetal acceleration, and is indeed related to speed (faster speeds mean a
larger turn radius).

~~~
dahart
Yeah, that's a useful breakdown, thank you!

Does this help to explain the fixed correspondence between steer and direction
of turn? (For example, to someone who doesn't believe counter-steering is a
thing.) The physics of the lean seems easier to decompose than the physics of
counter-steering.

I am interested in finding a way to describe counter-steering so that it's
obvious, similar to the way you described the horizontal force vs coefficient
of friction.

~~~
aidenn0
When you turn the wheel, your wheels move to the right.

Inertia keeps your center of mass moving straight, so your center of mass is
now to the left of the wheels.

Think of it as the ground pulling the wheels out from under you.

~~~
aidenn0
Also, there is no fixed correspondence between turning the wheel and leaning,
because in this case you do move your body. Think about when you are in a car
and someone turns sharply to the right. At first you lean left, but then you
unconsciously right yourself.

Similarly on a bike, if you turn the wheel right, you will eventually either
fall over, or turn to right (which will happen with an unconscious lean).
Since the correction to lean-right is usually not done consciously, and
happens very quickly most people don't realize there is an initial lean left.

------
pje
This is now my favorite scientific paper headline, beating out the previous
champion, "How Many Birds Are There?"

[https://link.springer.com/article/10.1023/A:1018341530497](https://link.springer.com/article/10.1023/A:1018341530497)

~~~
rafi_kamal
Do you have a freely accessible copy of this paper?

------
hathawsh
Does a Raspberry Pi have enough computing power to run these two neurons in
the real world? Could I attach motors and sensors to a real bike and have it
drive itself? That would be amazing.

~~~
Seden
This is just a PID controller, they have existed and been used in industry
much longer than computers and thus require almost no computing power at all.
Everyone taking higher level engineering courses learns how to design these
because almost everything uses them. Honestly I thought that the paper was a
joke on how everything is called neural network, but maybe it is serious...

[https://en.wikipedia.org/wiki/PID_controller#History](https://en.wikipedia.org/wiki/PID_controller#History)

~~~
iovrthoughtthis
I'm with you here. Did no-one else do robotics in CS?

~~~
dharmab
Unfortunately it's not a part of many curriculum. A lot of CS tracks seem to
shy away from hardware.

For contrast, the bioengineering track at my state college did include
electronics (along with programming, high level math and of course biology and
chemistry).

------
digikata
Nice paper. It makes me wonder how different the two 'neurons' are from a
classical control theory set of equations (w/ gains in a feedback loop)
solving for the same plant model.

I do love the visualization of "Instability of an unsteered bicycle" in figure
2 though.

~~~
vletal
I have some minor background in control theory. After going trough the paper I
had a very same thought thus I googled and found this:
[http://www.control.lth.se/media/Staff/KarlJohanAstrom/Lectur...](http://www.control.lth.se/media/Staff/KarlJohanAstrom/Lectures/BikeTalkKTH2006.pdf)

After checking out the slides I kind of feel that there might be some
oversimplification in the used simulator, like producing _the desired lean
angle_ might not be enough. But I am no expert.

~~~
digikata
I give the authors a little bit of a break because they're sort of more
thinking about the meta problem of how to build an automated system to create
a controller. From that standpoint, the original paper is more introducing the
early landscape of the problem and documenting some early stabs at it.
Introducing the question of how to get that automated derivation to arrive a
simple set of end controls for the system as simulated.

------
viach
Looking at the roads it seem like driving cars is taking no neurons at all.

------
chrischen
I wish math notation becomes substitued with pseudocode. I can never figure
out all the greek letters!

~~~
lucb1e
But then it wouldn't look as "scientific" (i.e. anyone could understand it, it
wouldn't look complicated). At least that's what I feel like, reading and
writing a bunch of papers for my master's. We are encouraged to put math stuff
in ours just because it looks more theoretical that way. Whenever I do
something of worth I also make sure to blog about it so I can write down in
normal terms what we did and found, with code, (online) demo, and anything
else that might be useful.

~~~
chestervonwinch
1) Sometimes it's actually helpful to use greek letters when a convention is
used. For example: capitals for matrices (A), lowercase for column vectors
(a), and Greek for scalars (α).

2) I agree with the gist of your point, but I'm guessing you're being down-
voted because you come off as sort of flippant. Anyhow, I've long thought that
mathematics should have hover-text to help remove the mental overhead of
translating the concise notation to meaningful interpretation. Obviously,
using variables names like `velocity_of_thing` is much too verbose in
mathematics (papers would 1000's of pages); however, β with hover-text "This
is the velocity vector of the thing." would be super helpful IMO.

~~~
lucb1e
> Obviously, using variables names like `velocity_of_thing` is much too
> verbose in mathematics

That is not obvious to me. Perhaps in a purely mathematical paper with dozens
of formulas, but that's not my field of study. In any paper I read of any
discipline, I never came across any paper filled with enough formulas that it
would make sense to compress at the cost of clarity.

I fully agree, though, on following conventions (that only conveys extra
context) and using hover text to act as a quick lookup function. I actually
looked for the latter in the past but couldn't find a way to do it in LaTeX.

~~~
chestervonwinch
> I never came across any paper filled with enough formulas that it would make
> sense to compress at the cost of clarity

Fair point, but with this approach, even simple formulae could really clutter
up a page if the variable names are long and descriptive (imagine just a
rational function!). Also, as with programming, folks might abbreviate (e.g.,
`vel_thg`) and then we're nearly back at square one.

~~~
lucb1e
Also in programming, when my girlfriend (the mathematician[1]) used single
letters in code and I helped her with the coding part of it, she had to remind
me what some letters stood for. With acronyms or abbreviations I might need to
ask a first time (or maybe not even that, especially if you put a comment with
the full version upon declaration), but it's definitely easier to remember
what is what.

But anyway that's programming. Papers are a little different of course, with
limited space so usually there are no big code parts with declarations and
comments. Which is also why I like blog posts: things are clickable and
interactive. A PDF is super static and you can't expect a reader to click
through to the code or to be able to zoom in.

[1] well, she claims not to be, but from my POV it's math even if she says
it's a subfield.

------
dreamcompiler
This sounds a whole lot like a Braitenburg vehicle [1] and I was surprised the
author did not cite and compare/contrast Braitenburg's work.

[1]
[https://en.m.wikipedia.org/wiki/Braitenberg_vehicle](https://en.m.wikipedia.org/wiki/Braitenberg_vehicle)

------
erikig
I loved that diagram titled "Instability of an unsteered bicycle"

------
GoToRO
There are no secrets to riding a bike:

1\. Do no try to go straight. Move the handlebars violently left and right
when you feel you are falling left or right.

2\. Going slow is hard. Go fast. The wheels spinning will behave as
stabilizers, making it easier to stay on the bike.

3\. Moving your body will make you fall at first if you do not counteract by
moving the handlebar. Start by going downhill, without pedaling.

~~~
perl4ever
The two "secrets" I know to riding a motorcycle are (1) not leaning on your
arms, and (2) consciously countersteering.

Seems like a lot of people I see on the street never learned how to
countersteer and turn or change lanes with alacrity.

~~~
kqr
> (1) not leaning on your arms

I can already guess an answer to this, but would you mind expanding on it
anyway? I tend to do this on my bicycle a lot.

~~~
perl4ever
Well, I was told not to in the course I took to get my license, and I found it
helped without really thinking about why.

However, if I try to introspect...supporting my weight with my arms tends to
conflict with the counter-steering part. If I push on the left side, the
motorcycle leans that way. But one instinctively pushes on something to hold
oneself up. So I think I would say my brain gets subconsciously conflicted
over whether to push or pull.

Unfortunately, sport bikes typically have a seating position that makes it
very difficult not to put weight on your wrists unless you have good leg and
abdominal muscles.

------
hprotagonist
(2004)

~~~
skykooler
Unfortunately, the videos linked in the paper seem to have disappeared. Are
these mirrored anywhere?

~~~
burkaman
They work, but the tilde character in the pdf is wrong. Try this:
[http://www.paradise.caltech.edu/~cook/Warehouse/RecursiveBik...](http://www.paradise.caltech.edu/~cook/Warehouse/RecursiveBike.avi)

------
plg
code?

------
snek
does anyone recognize what software was used during this study

------
XnoiVeX
About the most fascinating thing I read all week.

