Games Inverted Pendulum on Cart and PIDController Class

Discussion in 'Game Development' started by Gunther, Nov 30, 2018.

  1. Gunther

    Gunther Active Member Licensed User

    Hi,

    after so many questions here I want to contribute something which is not the main path of interest but was a side issue.

    This litte App is showing the Inverted Pendulum on a cart which is actuated by motors on the wheels. The pendulum is freely jointed.

    The controlling process behind is done by a PID Controller Class. One instance is controlling the Angle of the Pendulum, the other the position of the cart.

    With the settings in the Initialization Procedure you may have influences to the dampening of the disturbances or it swings up ;o)

    Code:
    ' Settings of Angel Controller
    angleController.setGains( 1800550 )
    ' Settings of Position Controller
    positionController.setGains( .550.05.25)
    '
    You may put disturbance on the pendulum by left and right keys. You may drag and drop also the items in this world by the mouse.

    upload_2018-11-30_10-25-9.png
     

    Attached Files:

    Last edited: Nov 30, 2018
    Erel likes this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice