Several summers ago, a college mentor from FRC 931 built a low cost self-balancing scooter as a demonstration project while working as an intern in my lab at Emerson. His creation looked very much like one built earlier by
Trevor Blackwell. Both versions employ Kalman filters to correct for drift in the tilt angle estimated by integrating a gyro's output.
While that student has gone on to pursue PhD level work since then, he had never heard of a Kalman filter before starting the project. Full comprehension of the Kalman filter's mathematical beauty requires the kind of study that previous posters in this thread have described -- and that study is rewarding for its own sake. However, you can apply what others have done without getting to that depth.
Yes, the mathematical basis for balancing an inverted pendulum really is rocket science. Be encouraged by the evidence that the math works, not intimidated by its beautiful details.
__________________
Richard Wallace
Mentor since 2011 for FRC 3620 Average Joes (St. Joseph, Michigan)
Mentor 2002-10 for FRC 931 Perpetual Chaos (St. Louis, Missouri)
since 2003
I believe in intuition and inspiration. Imagination is more important than knowledge. For knowledge is limited, whereas imagination embraces the entire world, stimulating progress, giving birth to evolution. It is, strictly speaking, a real factor in scientific research.
(Cosmic Religion : With Other Opinions and Aphorisms (1931) by Albert Einstein, p. 97)