CMU
UM


Animation for the Inverted Pendulum

Purpose
Running the GUI
Using the GUI

Purpose

The purpose of this Graphical User Interface (GUI) is to allow the user to view an animation of the Inverted Pendulum system with the step response plot. This allows the user to see the correlation between the plot and the systems physical response.

The animation and GUI are based on the Inverted Pendulum:State-space example, found here. This method was used because we can easily return the cart position and pendulum angle as well as their respective velocities. For more information on the system model please refer to the Inverted Pendulum: Modeling page found here.

Running the GUI

To run the GUI you will need 3 files (hopefully in the future we can combine these or make the download easier). Copy each of them to the directory in which you are running matlab. These files will work with Matlab version 5.0 and 4.2.

Once these files are copied into your matlab directory, simply enter the following command:

Neither of the other two files need to be run from the command window, they will be called separately by the GUI. The following figure should appear on your screen after the command has been executed:

Using the GUI

Below are descriptions of each of the controls found in the GUI. These descriptions are intended to give the user a better understanding of what each control actually does. However, feel free to experiment with the controls and use this section as a reference for any questions you might have.

The first group of controls contains the RUN, REPEAT, and CLEAR buttons. These controls perform most of the work in the GUI.

An example of the animation and response plot are shown below. As you can see, both the cart's position and pendulum's angle were plotted in the step response plot.


The next group of controls allows you to set the weighting factor of the Q matrix for the LQR design method utilized in the animation. For more information on LQR and weighting factors for this problem click here.


This group of controls allow you to change the step input command.


This group of controls contains checkboxes that allow the user to change various features of the GUI.


REMEMBER, this GUI is intended to be an interactive learning tool that will allow the user to get a feeling for how some basic control techniques and ideas are represented in the real world. Therefore, the user is encouraged to PLAY around with this tool to enhance their understanding of controls.


User Survey
Your anonymous answers to the following questions will help us to improve future versions of these animations.
How useful was this animation?
Very useful Useful Somewhat useful Not very useful A waste of time
How difficult was it to run the animation?
Very easy Somewhat difficult Too difficult
Was the animation
Too slow About right Too fast
Was the GUI
Too simple About right Too Complicated

We would like to hear about suggestions you have for improvement, difficulties you had with the tutorials, errors that you found, or any other comments that you have. This feedback is anonymous.


Inverted Pendulum Examples
Modeling | PID | Root Locus | Frequency Response | State Space | Digital Control

Animations

Bus Suspension | Inverted Pendulum | Pitch Controller | Ball & Beam

Tutorials

Basics | Modeling | PID | Root Locus | Frequency Response | State Space | Digital Control | Examples | Animations

8/07/97 CJC