It Takes Two Neurons to Ride a Bicycle (2004)
paradise.caltech.edu
paradise.caltech.edu
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.)
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.
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).
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.
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.
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.
https://www.sciencedaily.com/releases/2011/03/110307130215.h...
I was just thinking that I like doing those sorts of calculations, and given that so many people on the Internet profess to hate them, there should be an exploitable niche somewhere.
For contrast, the bioengineering track at my state college did include electronics (along with programming, high level math and of course biology and chemistry).
If it were really "just" a PID, you would need some arbitrarily complex procedure involving a human for tuning all the parameters?
From the paper: "The three constants c_i need to be set by the implementor"
Under "Future Directions": "One obvious thing to do with this system is to have it learn and tune its parameters with experience." The work presented in the paper does not do this.
"This network was designed in an ad-hoc, if traditional, way. First, a human tried to control the bicycle with the simulator. After many attempts, the human finally became a somewhat skilled operator of the bicycle ... the human at this point was able to describe the key parameters which were being attended to, and based on this, the two-neuron network was designed." By "designed," the author means "the three constants were selected."
This sounds like the "arbitrarily complex procedure" you are looking for.
This is one of the classic texts: https://www.amazon.com/Adaptive-Control-Karl-Johan-Astrom/dp...
In short, many techniques that look a lot like modern machine learning have been in use for decades in control theory for tasks exactly like you describe (e.g. automatic tuning of PIDs). If you want to dig into this a bit deeper you might look up the "MIT Rule", which is a gradient style approach for dynamically tuning (and re-tuning) adaptive control systems, and is fairly common for PID tuning.
A Raspberry Pi is powerful enough to run hundreds or thousands of PID controllers simultaneously, depending on your sample rate.
The problem with Pis is going to be that running Linux they're at best soft real-time. Sampling, PID, etc needs hard real-time.
https://www.researchgate.net/profile/Mohamed_Mourad_Lafifi/p...
I can also see a ton of PID controller projects on various microcontrollers searching for pid and brushless controller and esc and motor controller and things like that.
I do love the visualization of "Instability of an unsteered bicycle" in figure 2 though.
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.
But more often than not I look at papers, where I know what they were doing and how and just have to ask myself: Why would you go through the work of translating what you did back into formulas, which bring exactly zero benefit and are harder to understand than the code you wrote?!
But come high school years, or in British sixth form studying for"A levels", I scored in the top decile for my class and for Applied Math, but the bottom dectile for Pure Math.
I think you can make a very good argument that math notation is not doing the potentially career changing job it could be doing, by not expanding the keys. Darn, even a key table index alongside would be night and day better. Edit - didn't remember the length of my comment after coming back to it after a break, so culled the excess. The punchline was that when we got a new young and enthusiastic Pure tutor, who was French, so he in true anger would explain to us in great eloquent depth, my marks equalized in two semesters.
There's surely something like a formal study of students to show if comprehension is the main reason math is hard?
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.
Both formats have their origins in Wolfram Mathematica.
If there's a way to add that sort of hover annotation in LaTeX, I'd gladly use that for my thesis.
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.
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.
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.
Math is heavily optimized for peope already familiar with the topic at hand. In many cases, that's the only way you have a chance of understanding the paper at all. So long names would just be noise to the main audience of the paper.
If that's really true, you are getting bad advice.
Ideally, you'd have both. The clean math notation AND pseudocode.
All you're really doing is substituting something you're unfamiliar (or less familiar) with, common mathematics symbols, with something you specifically happen to be more familiar with (programming pseudocode).
It's really no different than someone looking at your pseudocode and saying "why can't they just write it in plain English?"
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.
Bicycle wheels do not have enough mass to impact handling through gyroscopic inertia. They do not act as stabilizers.
Motorcycle wheels do, and consequently they require more effort to lean at higher speeds as well as require additional lean when accelerating into a curve.
Basically, the faster you go, the easier it is to influence your balance on the bike. If you go fast enough you can get too much influence, which is how speed wobbles happen.
Seems like a lot of people I see on the street never learned how to countersteer and turn or change lanes with alacrity.
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.
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.