Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Inverted pendulum simulation using matlab/simulink

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
5,437
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Dec 2, 2008

This was for a homework problem in automatic controls. I didn't wright the code to animate it or the Simulink diagram to do the calculations, I just designed the PD controller. The pendulum gets hit two times (once from each side) and the cart has to keep it upright. Notice the cart will go right forever, a state space controller could fix that problem.

  • likes, 0 dislikes

Link to this comment:

Share to:

Uploader Comments (atotoole21)

  • I've been trying to find tutorials on the internet on how to draw squares and rectangles, but the only thing i've seen was how to draw circles. could you please tell me what commands you are using?

  • Apparently I can't post a link on youtube, so just google "Create one or more filled polygons Matlab" and the documentation for Matlab's patch command should be the first link.

  • ok so what did you use in order to create animations with simulink?

  • @x89codered89x The only thing simulink is doing is the calculations, its outputs cart position, and pendulum angle to matlab, and I do the animations in matlab. The animation is pretty simple. I just use matlab's "patch" command that is used to draw polygons. For the animation I :

    - Get the values from simulink

    - Draw the pendulum and the cart

    - Get the next values from simulink

    - Delete the last drawing

    - Draw the new pendulum and cart.

see all

All Comments (5)

Sign In or Sign Up now to post a comment!
  • could you share with your model in simulink ?

    the animation is very fast:)

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more