HELP!!! Segway Stabilization Equation.(Physics)

Hi,
I'm new here, I just finished my mini-segway. It has 2 RC servos, 1 for each wheel (CDs), a RC helicopter gyro and a nunchuck for accelerometer. It works quite well. It's a bit shaky though. I didn't use any physics equation to make it balancing. I just used "practical" physics (experimental).

I found yesterday on Internet, 2 pages (there are more than 2) with the physics equation called equations of motion of the inverted pendulum. It must work somehow to make my segway feel stable and responsive. I used GlovePIE to make my mathematical mini simulation of these equations.

1st link
http://www.mathworks.de/access/helpdesk_r13/help/toolbox/ncd/appendi7.html

2nd link (Image)
http://www.avantgravity.com/3d_pendulum.html

Can one of these be used simply to make the mini segway be very stable? I don't know the physics used in that thing yet. Well! I almost understand. Could anybody help me out? I actually don't understand what the dots on the top of some letters mean. I read something and thing that it has to do with time... Is there a way to put one or two equations giving them:
the angle of the pendulum
the angular speed
the current speed
the weight of the center of gravity
the weight of the base (motors)
the length of the pendulum
and the length between the center of mass of the pendulum and the center of the wheels or something...

AND the equations GIVING ME OUT the acceleration needed for the motors to keep under the center of mass?

Thank you in advance.