Six Pearls Designs

Double Pendulum

2010 April 15

Introduction

Last summer, I stumbled across this amazing video of acrobatic radio control airplanes. I was thinking about how one might get an embedded system to control this: what kind of inertial measurement system would be needed, computation to model position, etc. This was especially salient in light of my recent issues with the sharp IR distance sensor on my balancing robot. Then I had an "aha moment"-- if this guy can use his vision to know where the airplane is positioned and how it is oriented, why can't a digital control system do the same? I believe that rudimentary vision processing can replace many basic robotics sensors. I have a strong hunch that in the future, all robotics will have some kind of vision system to aid in control.

My goal with this project is to demonstrate my theory that a control system can be very robust if the measurement system is separated from the actual process. To that end, I will be designing and manufacturing a cart and double-pendulum (3DOF) chaotic system. I am still in the middle of this project. I wanted to document my modeling and simulation work while waiting for parts to arrive.

System Overview

overview

The basic idea is to create a relatively flat system on a uniformly colored background that can be controlled by a laptop using a USB webcam as a measuring device, which can transmit digital control signals to the plant. On the plant side of the control system, I'll use the PWM output of a Xbee reciever and an H-bridge kit to drive two geared motors with timing belt pulleys. These timing belt will clamp to a cart and double pendulum system.

Simulations

Dynamics

It was important to me that the parameters of the double pendulum exhibited chaotic behavior, so I wanted to simulate a model of the system without any controls to ensure that chaotic behavior would be exhibited. With my chosen pendulum designs, the system does exhibit chaotic behavior. Consider the simulation of the system in matlab and an animtaed version from SolidWorks:

chaotic_behavior

Control

Of course, more important than the chaotic behavior is the controlled behavior. I decided to start with a linearized LQR based controller. My first step was to design a continuous controller that could handle reasonable disturbances. I was having trouble initially defining "reasonable disturbances," and eventually decided that horizontal displacement of the endpoint was the measure I would use when manually disturbing the system. My model uses voltage as an input rather than the usual force or acceleration (using a simplified DC motor model). This lets me check that the control system can work on voltage sources I have available, like remote control car packs.

  • continuous_input
  • continuous_outputs

Above is the response to an initial disturbance of 3 mm displacement of the lower pendulum. Notice the fast response of the system, even with the saturated input voltage at 7.2 volts.

  • discreet_input
  • discreet_output

This is the same system and disturbance, using a discreet time controller. I was able to achieve stability for that disturbance with a control loop period of 0.04 seconds, which will hopefully be significantly slower than my actual system.

If I have trouble when implementing this in a physical system, I will come back and determine the limits of stability when quantizing the voltage input and/or implementing an estimator to filter the camera measurement noise. Depending on my motivation, I may also come back and change the controller to a linearized feedback controller.

Mechanical Design

A few months ago, I came across a single part suspension system on a society of robots page, and I thought it was a clever idea. I decided that it would be a great way to pre-tension the cart wheels to the rails to ensure that the cart traveled in the proper orientation. So, like the original author, I drew up a few schemes in SolidWorks and measured the deformation and stress under a reasonable (5 lb) load. These are the results:

  • cart-h-deformation-stress-stress1
  • cart-o-deformation-stress-stress1
  • cart-s-deformation-stress-stress1

In none of these designs was the the internal stress close to fracture, however only the "S" shaped cart produced significant deformation under the light load. Because the "S" design allowed for the most deformation, it was selected as the cart design.

Initial Results

As I say in the video, the initial results are promising in principle but not fast enough. I am migrating over to openFrameworks. Hopefully the speed of the C++ language will be enough to implement the control system. I will also have more access to openCV's features, which might also help in quickly measuring the position and angle of the cart and pendulum. The status in the video was my progress for the Harvey Mudd "Awesome Things" competition. Since this was a work in progress, I was not eligible to win but I did earn third place.