234 points · by orenjacob · 8y ago · 87 comments
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.
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.
If it were really "just" a PID, you would need some arbitrarily complex procedure involving a human for tuning all the parameters?
For contrast, the bioengineering track at my state college did include electronics (along with programming, high level math and of course biology and chemistry).
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.
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.
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.
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?
If that's really true, you are getting bad advice.
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?"
Ideally, you'd have both. The clean math notation AND pseudocode.
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.
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.
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.
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.