Inverted Pendulum

Team: Reed Cao, Robert Herkenham, Ryan Meredith, and Stan Smith

 

 

 

 

 

Progress Report #1

Insert Graph 1 Here

Fig. 1: The block diagram as of progress report #1

Insert Graph 1 Here

Fig. 2: Plot of the of the force used to imbalance the pendulum

To generate Fig. 2, we summed two step functions to generate a pulse that is used to initially imbalance the pendulum. The addition of this force to the system may be seen in the block diagram toward the top left where “Step” and “Step1” are added to the output of the discrete PID controller. Applying this force to the system can be imagined as the inverted pendulum initially being in perfect balance on top of the cart, and the cart is then pushed to the right for a short period by an external force, thus causing the pendulum to become imbalanced.

Insert Graph 2 Here

Fig. 3: Plot showing the discrete response of the controller

This plot displays the force generated by the discrete PID controller in response to the angle of the pendulum. After subtracting the angle of the pendulum from π (which corresponds to the angle at which the pendulum is upright in the orientation of this system), the discrete PID controller takes the angle error as input and generates a force as output to correct the error. In this case, the discrete PID controller samples the error signal at a rate of 10 Hz and provides a constant force until the next sample is taken, shown by the boxiness of the graph in Fig. 3. As the external force in Fig. 2 pushes the cart to the right, the pendulum falls to the left, causing the force outputted by the discrete PID controller to become negative in order to push the cart back to the left and rotate the pendulum toward the right.

Insert Graph 3 Here

Fig. 4: Plot showing the angle of the pendulum and position of the pendulum base

Fig. 4 shows the angle that the pendulum makes from vertical in green and the position of the cart in blue. In the case of this system, the pendulum is at an angle of 0 when it is pointing straight down and the angle increases as it moves counterclockwise. To create this graph, we used a discrete PID controller in Simulink to determine which direction the cart will move. The cart’s position begins increasing at 1 s due to the external force, causing the angle of the pendulum to begin to increase as it rotates counterclockwise. The cart’s position then begins to decrease after the external force stops in order to move the pendulum clockwise and decrease its angle back to π.