Académique Documents
Professionnel Documents
Culture Documents
Anthony Limani
Adriana Mulla-Carrillo
Arya Popescu
Youssef Saafan
Ryan Zimmerman
1
Table of Contents
Executive Summary 2
Introduction 2
Literature Search 3
Patent Search 3
Journal Search 3
Internet Search 4
Executive Summary
Building an inverted pendulum is a complicated controls and design problem. We aim to build an
inverted pendulum experiment for Columbia MechE majors that will allow students to learn about
different types of control systems and experiment with various parameters. The apparatus consists of a
free-swinging pendulum over the full 360 degrees mounted on cart riding on a linear track. There are
sensors for the angle of the pendulum and position of the cart. A motor moves the cart and thus keeps the
pendulum upright. A graphical interface allows the user to configure the algorithm that keeps the
pendulum upright, thus showing them the various benefits and drawbacks of various control systems in a
hands-on setting.
Introduction
An inverted pendulum is a classic physics problem, yet building one is a classic controls problem.
Being unstable nonlinear system with a single input and multiple outputs makes the inverted pendulum an
interesting controls problem. Historically, it has served as a benchmark for the performance and
effectiveness of a particular control techniques. Examples of practical applications include rocket flight
control, segways, robotic arms, or a human standing upright.
While there are several variations and levels of complexity to inverted pendulum systems, we will
be dealing with a system that has only two degrees of freedom (horizontal position of the carriage and
angle of the pendulum). Our project deals with tackling this controls problem in a way that will enable us
to teach some basic controls to undergraduate students. Our goal is to build and control a pendulum that
can balance vertically, in unstable equilibrium while centering itself on a track. Other higher levels of
success would be to add weighted objects to the end of the pendulum, to be able to balance when starting
from the down position, and in an extreme case, add a second link to the pendulum.
Literature Search
Patent Search
The patent search process started out with a keyword search for inverted pendulums. This
actually yielded some great results of patents for inverted pendulums on linear tracks. However, these
promising patents were in Korean, so we kept searching for more patents in English. The next category
searched was G05B11/0 (physics instruments controlling or regulating a system through electronic
means). This category search did not yield relevant results, as the types of systems being controlled in
these patents varied widely from power plants to water systems, and voltage control.
We went back and tried a new keyword search, specifically for balancing robots. In this search we
found a reconfigurable balancing robot which was a little closer to what we were looking for. This led to
the category search in B60L2200/16 (Transporting vehicles with electric propulsion with a single axis).
In this category we found two patents with high relevance to our inverted pendulum project.
The first patent is for a self balancing ladder and camera dolly1, which utilized balance control in
a feedback loop to keep a ladder in place for someone climbing it. This is, essentially a large scale
inverted pendulum. While the design in this patent is not constrained to a track, the control system is well
detailed, and it uses a small angle approximation approach that we will be using for our control system.
The second patent that was relevant from this category search was for an inverted pendulum
moving apparatus and its accompanying control system2. This apparatus is also an inverted pendulum,
however the control system in this design is more complex than we anticipate ours being because the
patented apparatus detects the ground condition and moves to balance accordingly. We will not need to
go into this level of detail, but this patent is useful to our project because of the control system that is
explained in the patent.
Journal Search
In our journal search we found numerous papers related to the controls aspect of our project.
Being that this is a classic controls problem, most papers focused on a more accurate/efficient control
system than those previously studied. These papers were extremely helpful in introducing us to various
methods and approaches to stabilizing an inverted pendulum system. When looking at all the various
methods, we tried to focus more on simpler techniques that could be understood with just the basics of
control theory. The following are some of the papers that we found most applicable in exploring this
problem.
1 Kamen, Dean L. et al. Self Balancing Ladder and Camera-Dolly. Patent 6915878B2. 12 July 2005.
2 Nakamura, Ryosuke et al. Inverted Pendulum Moving Apparatus and Control Method Therefor. Patent
9290109B2. 22 March 2016.
4
A paper titled A Novel Method to Balance Inverted Pendulum by Angle Sensing Using Fuzzy
Logic Supervised PID Controller3 discusses a method to balance a carriage balanced inverted pendulum
using a fuzzy supervisor and PID controller. Fuzzy logic is a form of logic that uses degrees of truth
(values between 0 and 1) as opposed to true-false boolean logic (0 or 1). The fuzzy supervisor takes in the
system error and its difference (e(t) & e/t) and outputs different parameters for the PID controller
(KP, KI, KD). This method proved to be successful as the system did approach a stable state over time.
Another approach to this problem is described by Ming Li from the Wuhan Textile University 4
where a digital double loop PID is used to stabilize the system. The inner PID controller stabilized the
pendulum angle in the desired upright position while the outer loop was used to control the horizontal
position of the carriage. Results from this experiment showed that this was an effective method in
stabilizing the system but only at smaller sampling periods of 50 ms at most. At larger sample periods
such at 100 ms, calculation showed that the system would stabilize but performance was too poor for any
practical real world application. Lis research concluded that a single loop PID controller would be
ineffective at stabilizing an inverted pendulum but a digital double loop was a cheap and effective
solution.
A.N.K. Nasir et al. compare the performance of a LQR (Linear Quadratic Regulator) and PID
controller when stabilizing an inverted pendulum system. 5 LQR uses a state space representation of the
physical system. This is helpful when dealing with a system with multiple outputs and a single input. This
method replaces an nth order differential equation with a single first order matrix that depends on the order
of the system and number of inputs and outputs. Two coupled PID controllers were used to control the
carts horizontal position and pendulums angle. While not exactly the same, this approach is similar to
the digital double loop PID previously mentioned. The Ziegler-Nichols method was used to tune the PID
controller. Both methods were successful in stabilizing the system. The LQR had a faster rising and
settling time but a much larger percent overshoot range when compared with the PID. Overall, the LQR
had better performance although both approaches stabilized the system with a zero steady state error.
Internet Search
While the inverted pendulum problem is not a unique one, it is still very much an experimental challenge,
requiring a deep understanding of controls as well as classical mechanics. Cursory internet searches help
us to better understand all of the relevant topics so that we may attempt to create an inverted pendulum of
our own.
During our search, we uncovered a short paper published by MIT 6 detailing a simplistic controls
calculation complete with root locus plots. The paper explains how the placement of the poles and zeroes
results in a stable or unstable system and how to manipulate the poles and zeroes to gain the desired
3 Kumar, S., Agarwal, A. K., Gupta, A., Tripathi, H., & Kulshrestha, P. M. (2011). A novel method to balance
inverted pendulum by angle sensing using fuzzy logic supervised PID controller. Sensors & Transducers, 126(3),
92-100. Retrieved from http://ezproxy.cul.columbia.edu/login?url=http://search.proquest.com/docview/861942601?
accountid=10226
4 Li, M. (2013). Digital double-loop PID controller for inverted pendulum. Sensors & Transducers, 156(9), 324-
329. Retrieved from http://ezproxy.cul.columbia.edu/login?
url=http://search.proquest.com.ezproxy.cul.columbia.edu/docview/1509845928?accountid=10226
5 Nasir, A. (2008-01-01). Performance comparison between LQR and PID controllers for an inverted pendulum
system. AIP conference proceedings,, 124-128.doi:10.1063/1.3008655
6 Lundberg, K. The Inverted Pendulum System [PDF document]. Retrieved from MIT papers:
http://web.mit.edu/klund/www/papers/UNP_pendulum.pdf
5
effect. A textbook7 used in a Stanford class about controls and vibrations, which was discovered via the
same search, details some of the physics involved in the problem and builds the underlying formulas for
velocity, position, linear acceleration, and angular acceleration. Both of these papers were incredibly
useful to understanding our problem and how to approach it.
In addition to finding theoretical information about our problem, we also discovered ways to
simulate the problem with an animation. An article on the Wolfram blog 8 shows some of the equations
used in a sample inverted pendulum simulation and provides some Mathematica source code that we can
use to manipulate our desired variables. This will likely become a valuable tool for us as it will allow us
to experiment with constants more easily and quickly and could potentially be used to develop our
instructional aspect to our design project.
Because much of our design was dependent on the needs of a control system, we first do a basic
controls analysis of this problem to help further define the constraints of the system.
Controls Analysis
For our controls analysis, we separated the system into two distinct control problems:
Keeping the pendulum upright
Keeping the pendulum centered on the track
After performing the physical calculations, we ended up with the following parametric equation for the
plant for the upright pendulum control problem (equation for the behavior of the upright pendulum):
s2a - b = s2X
Where is the angle parameter of the upright pendulum and X is the positional parameter of the base of
the pendulum, and a and b are independent parameters that are functions of the length of the pendulum,
the mass and mass distribution of the pendulum, and the gravitational acceleration. The transfer function
of the plant is therefore
7 Mitiguy, P (2009). Control, Vibration, and Design of Dynamic Systems. NA: MotionGenesis
8 A Moylan. (2011, January 19). Stabilized Inverted Pendulum [Web log comment]. Retrieved from
http://blog.wolfram.com/2011/01/19/stabilized-inverted-pendulum/
6
G(s) = s2 / (as2 - b)
We opted for a pole placement solution with parameters k 1 and k2. We obtained the following solutions:
k2 = a(1 + 2)
k1 = a12 + b
Where 1 and 2 are the chosen placements of the roots in the complex plane. The values of 1 and
2 are chosen based on the desired settling time of the system and the desired overshoot in the control
system. While in normal circumstances we could choose any settling time and any reasonable overshoot
(or no overshoot at all) as long as the system stabilizes, the length of the track imposes the following
limitations:
Slower settling time means greater displacement along the track thus risking a bump into
either end limits
Less overshoot means greater displacement along the track -- if the base of the pendulum
overshoots the tip, the entire pendulum is being decelerated thus moving less overall along the
track.
Thus we need both a fast settling time (which can only be calculated from the requirements of the
second control system, the positional one) and some amount of overshoot. This is an interesting problem
because often overshoot is undesirable in control systems, and is just a necessary evil. Here overshoot is
beneficial.
It is interesting to observe how the two separate control systems requirements influence each
other. The parameters of the upright pendulum influence the maximum travel distance for the horizontal
position control system. Conversely, the desired position for the horizontal position control system will
guide the desired value of the angle for the upright pendulum control system.
Based on a very ballpark approximation of the system requirements, making successive
approximations and taking the worst case scenario at every step we were able to perform a back-of-the-
envelope calculation for the minimum requirements of our control system in terms of the required
maximum velocity and acceleration of the base, which will guide the choice of a motor. A complete
calculation is impossible to be performed at this stage due to the fact that the final parameters depend on
the choice of the motor, pendulum, track system, and encoders, which depend upon the final parameters
of the solution thus creating a circular dependency. However taking the worst possible scenario is
possible and easy, and we have obtained the following results based on reasonable assumptions of the
mass of the pendulum system (< 1 lb), the overall mass of the pendulum and belt system (< 2 lb,
excluding motor shaft), the maximum impulse (bump) speed that someone might push the tip of the
pendulum with (0.25 m/s) and the maximum permissible travel in one direction after a bump (less than
half of the track length). Thus we have obtained a requirement for at least 22 m/s 2 of peak acceleration for
the base of the pendulum in the worst case scenario, and a maximum velocity of at most 0.5 m/s of the
base of the pendulum in the worst case scenario. This was obtained by applying the formula
(t)=0 sin(omega*t + phase) e-decay*t/tau
By taking the derivative twice we get formulas for the velocity and acceleration
In this case, we dont care what the actual angular frequency and the decay of the system are, as
they are dependent upon the control system and we want our assembly to work with any control system
that we might end up going for. We know that the maximum omega (worst case scenario) of the system is
the undamped omega which we got before from analyzing the system. By taking the undamped omega,
assuming worst case scenario initial phase (such that the entire sin or cos is 1) we arrive at our worst case
value of 16*sqrt(2) which is about 22 m/s 2 rounding up. This is an incredibly back-of-the-envelope
calculation and yet by successive worst-case-scenario approximations we got a result that will both (1)
work with our final control system and requirements and (2) be mistake-proof as any mistake in
assumptions or calculations, or any physical complications (friction of the track system, inertia of the
motor, error and aliasing in the angular encoder are unlikely to offset all the other successive worst-case
approximations.
7
Thus our choice of motor was dictated based on these parameters.
Because of our choice for an analog encoder, due to cost considerations, we can create both an
analog and a digital control system. The analog control system will be significantly harder to design
electronically, because of the requirement of the use of analog circuitry, but will be easier to design for
from a controls perspective. Conversely, a digital control system will be significantly easier to design for
electronically, principially requiring the use of a DAC from the encoder and a microcontroller, but it will
be harder from a controls perspective. Thus our choice of analog vs digital control systems, because it is a
very late-game choice, will probably be performed depending on other constraints as they arise or on the
educational purpose of the apparatus.
Below is a potential block diagram for a digital control system for keeping the pendulum upright.
Figure 2: Motor
The specifications of our motor are largely dependent on the amount of rolling friction we need to
overcome. Our initial calculations for our first track design assumed steel on steel contact for simplicity
and the bearings on which the cart slides were modeled as a single wheel (which in aggregate, they
mimic). Considering the weight of the cart and all objects it would support, and using the coefficient of
rolling friction (looked up for steel on steel contact) we determined that 5616 oz-in of torque would be
needed from our motor in order to move our system. We also ran an FEA analysis in Solidworks to verify
these numbers. Using the appropriate materials and modeling the system as a linear bearing on a rod, we
received an output of 3144 oz-in of needed torque. We therefore decided to look for motors with output
torques near 4000 oz-in. Finding such motors was not difficult, but we also require a motor with high
RPM in order to have a very quick response time from the control systems. Therefore we refined our
search to exclude motors with RPM less than 1000. However, we had great difficulty in finding motors
cheap and small enough. Furthermore, such motors needed more current and voltage than we could safely
apply and had access to.
Eventually, we decided on ordering a pre-made track system and downsizing the cart and
associated components significantly, which resulted in less friction in the system. Data sheets for the track
system in question specify the kind of accelerations they were rated for. Working backwards from the
capabilities of our preliminary control system, we determined that we needed an acceleration of 22 m/s 2
and a torque of around 500 oz-in, which made our search easier. The data sheet for our chosen motor is
displayed below. It is both powerful and fast enough for our application and can be used with a reasonable
12V supply.
9
Track
When considering track options, we initially wanted to machine our own system because we
hoped to be able to achieve a reliable and cheap track to build our system off of. However, when we
started to pursue this at length, looking into linear bearings and shafts, we became increasingly concerned
with the friction that this track might have. In a basic analysis, we determined that a simple two shaft
track system would have a considerable amount of friction (conservative hand calculations indicated 5616
oz-in of torque needed to overcome friction while CAD FEA gave us a more manageable 3144). In
addition, we would have to ensure the two tracks were completely parallel, or risk creating even more
friction for the moving carriage.
This led us to the conclusion that we should investigate purchasing a track system, where
everything could be optimized for the least amount of friction, far better than we could manufacture in
house. One large reason we were hesitant to purchase a track was that it could potentially be very
expensive. Our initial searches revealed that we could purchase a track system for a range from $200 to
$500. Our budget for machining our own track was about $200 initially, so if we could purchase a system
for close to this amount, purchasing a track could be a viable option.
We settled on a linear track and carriage system from Rollon, because it was under $300 as well
as could offer us the desired speed and acceleration we would want to use, and this track had a ball
bearing carriage. We were hesitant to purchase other track systems that did not use ball bearings because
they are not as effective at minimizing friction. This track was also preferable because we could order
any track length we needed.
In making this decision, we looked at the maximum velocity and acceleration for the track, which
were 3.5 m/s and 500 m/s2, respectively. These are around 5 times higher than the 0.5 m/s velocity and
22 m/s2 acceleration needed to achieve a balanced pendulum. Additionally, we were concerned about any
moment (Mx on Figure 3) being placed on the carriage by the additional hardware on the cart (pendulum,
encoder, shafts). A quick calculation for our system revealed that we could potentially be applying 50 Nm
of torque in the Mx direction, but again this is two times smaller than the maximum moment for this rail.
Lastly, we needed to ensure we selected a light carriage option. By opting for the 15 mm rail, we
are using a carriage that weighs 0.14 kg, which will fit nicely within our 1 pound cart limit.
10
Cart
Encoders
Speed Controller
Limit Switches
Normally closed limit switches will be placed on both ends of the track in order to
avoid/minimize potential damage when testing the system. This would also serve as a safety measure if
this apparatus were to be used by other students. Our preferred type of limit switch would be a snap
acting roller lever switch. These switches can be easily mounted to the sides of the track and are available
with various lever lengths and actuator heights. Furthermore, the roller attachment would allow for
overtravel without damaging the actual switch. This is ideal considering that the carriage will undergo
relatively high acceleration before reaching a stable state.
We will also have soft limit sensors placed before the normally closed limit switches in order to
allow the control system to calibrate for the travel range of the track and to allow the control system to
gracefully shutdown in case soft limits are reached without having to cut power to the entire system.
Budget
Our primary concerns are acquiring a high quality bearing for the pendulum as well as a high
quality angular acceleration encoder. Secondary are the motor and the track system. We tried to budget
our funds accordingly while ensuring that we have some room leftover for small spare parts/replacement
parts. Thus far, we have spent ~$1000 on high quality products like the track, motor, and the angle
encoder/bearing, with the motor and encoder being the most expensive products.
Limit switch 2 0 0
Pendulum Shaft 1 0 0
Additionally, we are on track to keep the moving carriage weight within our 1 lb goal. Some
weight will be added when we add in wires and shafts, but this will not add a huge amount of weight.
Appendix A
16
17
18
19