# Going Behind the Scenes of My Inverted Pendulum Project

## Solomon Wiznitzer (MSR ‘18) shares how he developed his winter independent project and what he learned from the experience

Solomon Wiznitzer (MSR ‘18) shares why he chose his winter project and how he made it work.

By Solomon Wiznitzer

Have you ever tried to balance a broomstick or dowel on the tip of your finger? It’s not so easy. Just how fast should you move your hand to keep the stick balanced? How should you respond if somebody bumps into you?

Those were the types of questions I tried to answer as I used a robot to perform an inverted pendulum project for my winter quarter independent project.

For those who don’t know what an inverted pendulum is, picture the swinging bar of a grandfather clock. Now imagine that bar 180 degrees in the opposite direction. That is an inverted pendulum.

As I was thinking of project topics, I knew I wanted to use the capabilities we learned in our robotic manipulation class (like inverse kinematics) for moving the end effector of a robot along a straight-line path (the end-effector is to a robotic arm as a hand is to a person’s arm). I also wanted my project to be an ‘all or nothing’ type project so that it would be easy to see if the project did what it was supposed to.

The inverted pendulum fit those requirements.

As I look back on it now, I learned a lot while doing this project. I gained a better understanding of robotic manipulation (like how to code an inverse kinematics solver, calculate Jacobians based on current joint angles and use them to find the necessary joint velocities to move the robot’s end effector along a straight-line path at a specific velocity). I designed my first linear quadratic regulator controller based on the dynamics of the inverted pendulum system. I also discovered the advantages and disadvantages of some communication protocols while learning to use Bluetooth for the project.

Perhaps most importantly, I learned how to present my work in a way that anyone can understand.

This past April, my classmates and I were able to display our projects to the public at the Museum of Science and Industry, which was great practice for presenting in a non-technical way. To make it more fun, I brought some meter-long wooden dowels as props. I asked people I talked with to try balancing the stick on their hand or finger. Each time, they lost control after a few seconds. I hoped this demonstrated the difficulty of the task so they could appreciate a robot doing it (and it did).

Instead of using technical words, I explained how there was a ‘motion sensor’ at the top of the pendulum that could sense tilt angle. This info was sent over Bluetooth to my laptop, which used it in a control algorithm that I developed to move the robot’s ‘hand’. I’d also point out that the robotic arm had seven joints and that those joints needed to be controlled so the end effector moved along a straight-line path at the speed specified by my control algorithm to prevent the pendulum from falling.

Finally, I did a demo. With the robotic arm standing still, I let visitors feel how heavy the pendulum was and how it was able to freely rotate. I then stood the pendulum up and turned on the control algorithm so that visitors could see it work. Next, I slightly pushed the pendulum so the arm would have to compensate for the movement, and then, when it was able to stabilize, turned off the control algorithm to show how the pendulum fell freely.

People were interested and thought it was cool. Kids liked balancing the dowels I brought. Visitors especially liked seeing me swing the pendulum up and start the algorithm, the effects of disturbances and how the pendulum fell when the controller was turned off.

There were a lot of components that went into this project, and while I learned a lot, I feel the real value was that I can confidently walk a potential employer step by step through it. In this manner, the employer can see I can develop and present a complicated project, and hopefully they will be confident that I could do the same thing for their company.