Haptic Inverted Pendulum

Final Report: HERE

Design Objective

The purpose of this project is to develop the design, control, and dynamic system analysis of a haptic device. The project must result in a system with bidirectional haptic interaction between a person and a robot/intelligent agent or an augmented, remote, or virtual environment, as well as a study that shows something about the control and/or system dynamics.

For our project, we chose to implement a device that applies force and visual feedback to the user to simulate balancing an inverted pendulum on a plate. The display has a Hapkit mounted on the back wall of a box that stays firm on the table with suction cups. The Hapkit handle sticks out of the box and represents a plate that can be moved side to side to balance the 2D pendulum. The box is paired with a visual simulation of the pendulum to provide an engaging and fun experience for users. By performing a user study, we aim to better understand the role of sight and force feedback, respectively in balancing objects.

Design Outcome

The resulting product allows for the user to control the speed and position of the base of a simulated inverted pendulum via a 1DOF handle. The handle is supplied with force feedback that is proportional to the angle and speed of the pendulum. On demo day the device was paired with a physical inverted pendulum that users tried with a glove (to remove haptic feedback) and tried with their eyes closed (to remove visual feedback). Overall, both the display and the physical pendulum successfully conveyed information on the respective roles of haptic and visual feedback in balance.

Force Feedback Demonstration:

Project Motivation

There were two primary motivations in this device concept:

  • To develop a game-like device that people can experience and learn from easily in a demo setting, with the ability to teach people about the dynamics of pendulums, and challenge their ability to balance.

  • To learn more about factors that humans rely on to balance, through simulating information about the object geometry, and an implementation that controls for any combination of visual and haptic feedback.

  • Applying this research on what tools humans use to balance objects could provide information relevant to prosthetic arms, people with impaired balance, and improvements in robotics. Furthermore, this platform could allow for research into types of objects humans balance well, leading to developments in ergonomics for tools used in daily tasks like cooking.

    Previous research on haptic feedback for an inverted pendulum suggests that both accurate and congruent visual and haptic feedback is important for a user’s ability to balance the pendulum. This concept also has many connections to a person’s balance of self, with research showing that supply of haptic feedback to the body improves balance control in patients with balance difficulties. Perhaps, similarly to the pendulum, there is a time delay or visual, haptic incongruence that limits the effectiveness of this feedback if it is not done with the necessary precision.

Methods

Hardware Design and Implementation

For our project, we adapted the Hapkit, which is a kinesthetic haptic device, to focus on the role of kinesthetic haptic feedback and visual feedback in balance. To create our actuation system we utilized our hapkit to take advantage of the 1 DOF and DC motor for force feedback.

In order for the control of the pendulum to feel more realistic with the calculated dynamics of an inverted pendulum, we suspended our hapkit horizontally within a box. This box is made of lasercut Acrylic and Birchwood, and is assembled with fasteners and adhesives. The box has an opening to allow for the handle to move through its entire range of motion, while keeping the handle as the only part of our system that the user needs to touch. The intention for this was to allow for ease of use and help users understand how to operate our simulation as quickly as possible.

System Analysis and Control

Using our hapkit, we utilized the magnetic sensor on the arduino to measure the handle position. After recording the handle position, we used 2nd order backward differentiation to determine both the handle velocity and acceleration:

In order to simulate our Inverted Pendulum within Arduino, we first began with the following dynamic equations that describe an inverted pendulum on a cart. These equations were found in Advanced Dynamics & Motion Simulation For Professional Engineers and Scientists.

Starting with the second equation, we used variable parameters: mass, g, length, Izz, and the acceleration listed above to solve for angular acceleration. Then, using the equation for angular acceleration, we used 4th order Runge-Kutta to determined our theta, and angular velocity.

While using this method resulted in a somewhat realistic inverted pendulum simulation, there were many approximations made along the way, and this resulted in our pendulum behaving not quite as naturally as we had hoped. After attempting many different methods of approximation for handle acceleration and angular acceleration, we were able to tweak some parameters to help the pendulum look and feel more realistic. For example, the simulated pendulum would fall much slower than our physical pendulum demo, so we decided to increase mass and gravity, and decrease the length parameters until the simulation looked and felt realistic.

Additionally, the angular momentum of the simulated pendulum carried much longer than seemed realistic, and so we implemented a condition where the gravity parameter is greatly increased when the pendulum is close to upright, and this acted as some sort of pseudo damper which kept the pendulum from tilting over unexpectedly, and thus made it more intuitive to interact with.

We implemented a simple equation for the force feedback, where the force is proportional to the angle times a constant Kp, plus the handle velocity times a damping constant Kd

Final Arduino Code: HERE

Final Processing Code: HERE

Demonstration + Application

For our demonstration, we first had users practice balancing a physical system (a small pool cue) to give them some intuition behind balancing an inverted pendulum. This physical demonstration also had users attempt to balance the pool cue without sight (blindfolded), and with limited haptic feedback (wearing layered gloves).

Next we had users try our simulated inverted pendulum program with force feedback turned on and off. We took their best (longest) time for each version of the simulation, and recorded the results. We also randomly changed the order for which each user tried the simulation: some starting with force feedback, and some without. The reason behind this was to try and get a grasp on how much practice had an effect on the best time results and which they thought was easier.

Skills Learned

  • This project taught me about incorporating sensors (accelerometers) to measure the position and orientation of the handle, providing data for the simulation and haptic feedback system. I learned how to enhance the realism of the simulation through designing haptic feedback mechanisms that convey the simulated forces and movements of the pendulum to the user.

  • This project taught me how to use Processing to simulate the behavior of the inverted pendulum visually, and test control algorithms before implementing force feedback.

    Working with the arduino taught me about writing code for microcontrollers to process sensor data, implement control algorithms, and generate haptic feedback.

  • Our accelerometer was extremely noisy, which gave us a lot of trouble with filtering and approximating for velocity and position. As such, we had to conduct countless experiments to test the performance of the haptic simulation and control system and tweak variables for a more realistic experience. Over time, we iteratively improved the system's design and control algorithms for better performance.

Previous
Previous

INTREPID Watch Display

Next
Next

I-Beam Climbing Robot