Inverted-Pendulum-Control-Simulation Calculates an optimal LQR controller for a noisy inverted pendulum and simulates the result. Example 1: Demo Example 2: Swing-Up Type "help" and the function name in the command window to get a description of the function as well as the input/output definitions.