
what their algorithm was, and as it turned out they had developed similar techniques, based
on carefully adjusting the angle at which the bicycle is leaning.
Based on the reports of the humans, the two-neuron network controller was implemented,
and it worked almost immediately, having few parameters, and not being overly sensitive
to any of them. This method is the subject of the next section.
5 The Two-Neuron Network
Here we present a two-neuron network which can operate the bicycle competently over a
range of speeds. The output of the first neuron is fed into the second neuron, whose output
is connected to an actuator which applies the specified amount of torque to the handlebars.
As inputs to the network, we provide the desired heading θ
d
, as well as the current heading
θ and the degree to which the bicycle is currently leaning γ, along with their derivatives
˙
θ
and ˙γ.
6
Due to the nature of the problem, we will use a network that is continuous both in time and
in values. A unit’s output is determined simply by a thresholding function of a weighted
sum of the unit’s inputs. If necessary, this can be interpreted as a mean-firing-rate model,
but we will not explore issues of network realism here. Given that such a small network
of this type suffices, there seems little doubt that more realistic networks could solve the
problem as well.
The task for the network will be to make the bicycle travel in the desired direction. This
can then be used by higher-level planning systems to make the bicycle head towards a goal,
or to follow a path by heading towards a sequence of waypoints.
In order to set the bicycle’s heading θ as desired, we need to be able to control
˙
θ. We know
from figure 3 that
˙
θ is strongly related to γ, the amount the bicycle is leaning, so we can try
to control
˙
θ indirectly by simply controlling γ.
7
To control γ, we need control over ˙γ. And indeed, our actuator, which can exert a desired
torque on the handlebars, happens to have reasonable control of ˙γ. 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. Thus, by
setting the torque according to how we would like γ to change, we should be able to have γ
converge towards its desired value. (Note that it doesn’t make a big difference if the actual
convergence is just towards some approximation of γ’s desired value—the exact desired
value is not critical for this method of control to succeed.)
The first neuron in our circuit will output the desired γ, with the nonlinearity being applied
so that the bicycle doesn’t try to lean too far over.
8
The second neuron in our circuit will
output the desired torque to be applied to the handlebars.
The first neuron will take as inputs θ and θ
d
(which one can assume to be within ±π of θ,
6
Actually, as we will see, the network does not even need to use
˙
θ.
7
One of the reasons that controlling γ works is due to the realistic bicycle geometry. Real bicycles
are designed to be stable, which allows a rider to ride without holding the handlebars, simply by
controlling the amount the bicycle is leaning. We note that one typical important factor in stability is
that the axis of rotation of the front fork should pass below the hub of the front wheel but above its
point of contact with the ground, a feature we have duplicated on the virtual bicycle.
8
Although most of us do not have direct experience with this, bicycles can become quite unstable
if they are in a state of extreme leaning. In real life, usually the wheels skid out from under us before
this point is reached. In this simulator, skidding does not occur, but since this controller specifically
avoids states of extreme leaning, it thereby avoids the problem entirely, regardless of whether the
problem is that of slipping or that of becoming unstable.