Design and Production of a Prototype Wheeled Pendulum
for the new 2.004 Laboratory
by
Jane Sujin Yoon
SUBMITTED TO THE DEPARTMENT OF MECHANICAL ENGINEERING IN
PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE DECREE OF
BACHELOR OF SCIENCE
AT THE
MASSACHUSETTS INSTITUTE OF TECHNOLOGY
JUNE 2006
©2006 Jane Yoon. All rights reserved.
The author hereby grants to MIT permission to reproduce
and to distribute publicly paper and electronic
copies of this thesis document in whole or in part
in any medium now known or hereafter created.
ARCHIVE
Signature of Author:
V
V
%_-
o
Department of Mechanical Engineering
May 12, 2006
Certified by:
David Gossard
Professor of Mechanical Engineering
Thesis Supervisor
Accepted by:
"I.-
--
John H. Lienhard V
Professor of Mechanical Engineering
Chairman, Undergraduate Thesis Committee
MASSACHUSETTS INSTITUTE
OF TECHNOLOGY
AUG
2 2006
LIBRARIES
Design and Production of a Prototype Wheeled Pendulum
for the new 2.004 Laboratory
by
Jane Sujin Yoon
SUBMITTED TO THE DEPARTMENT OF MECHANICAL ENGINEERING IN
PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE DECREE OF
Abstract
The goal of this thesis was to create a piece of physical hardware that would be suited for
a multi-week design project for the design component of the Dynamics and Control II
(M.I.T. course number: 2.004) laboratory. The wheeled pendulum model was chosen as
an appropriate system to use in the second half of the laboratory component of 2.004
because of its clearly defined and well understood system. The inverted (or wheeled)
pendulum is a classic controls problem-in the absence of a controls component, the
system is non-linear and unstable. This thesis analyzes the system dynamics by deriving
the equations of motion for the wheeled pendulum, and uses mathematical modeling
(MatlabTM)to further understand the instability of the system. Based on the Matlab
models, several design iterations were developed, and a robust, functional prototype of
the wheeled pendulum was created.
Thesis Supervisor:
Title:
David Gossard
Professor of Mechanical Engineering
2
Acknowledgements
I am grateful to many people who have helped me develop and complete this thesis
project. I would first like to thank Professor David Gossard for proposing the initial
project to me, and for providing continuing support throughout this thesis' development.
I have learned a great deal about the engineering design process, and have developed
many practical skills that I know I will utilize in my future. Thank you again for
everything Professor Gossard!
I would also like to thank Dick Fenner, managing director of the Pappalardo
Laboratories, and the entire Pappalardo Lab technical staff for their assistance in building
this inverted pendulum prototype.
I am also very grateful to Mark Belanger, manager of the Edgerton Center Student Shop,
and the technical staff for their advice and help in creating the prototype for this thesis.
Thank you all again!
3
Table of Contents
1
Title Page .............................................
Abstract .............................................................................................................................. 2
Acknow ledgem ents ........................................................................................................... 3
Table of Contents ..............................................................................................................
4
List of Figures .................................................................................................................... 5
List of Tables .....................................................................................................................
5
Introduction .......................................................................................................................
Background ...................................................................................................................
System Dynamics ..............................................................................................................
FBD Analysis 1 ..............................................................................................................
6
6
9
9
MathematicalModeling: Matlab Analysis of FBD system #1...............................10
12
FBD Analysis 2 .............................................
MathematicalModeling: Matlab Analysis of FBD system #2...........................
14
15
V ariable Design Factors .............................................
16
Design Iteration 1 .............................................
... 16
1.......................................
Pendulum Portion ...............................................
W heeled Portion ............................................................................................................ 17
Design Complicationsand Considerations........................................
.....
18
20
Design Iteration 2.............................................
Pendulum Portion ........................................ ................................................ ......... 20
W heeled Portion ............... ................................................. ....................................... 21
Design Complicationsand Considerations........................................
.....
Design Iteration 3 .............................................
Pendulum Portion ............................................................. ........................................
W heeledPortion ............................................................................................................
Prototype .............................................
MaterialsSelection.............................................
W heeled Portion .
................................
22
23
23
24
26
26
.............................................................. 27
PendulumArm .............................................
PendulumHead.............................................
28
29
Future W ork.............................................
References ...............................................................................................
31
32
AppendixA: Matlab Scriptsfor FBD Analysis.............................................
33
Appendix B: Design Iteration Part Drawings (SolidWorks).
36
Appendix C: PrototypeImages.............................................
4
...........................
43
List of Figures
Figure 1: First Wheeled Pendulum robot (Anderson, 2005) ............................................... 7
Figure 2: JOE, radio-controlled, wheeled pendulum (Grasser et al. 2002) ........................ 7
Figure 3: nBot two-wheeled balancing robot (Anderson, 2005) ........................................ 7
Figure 4: Segway HT model uses a gyroscopic system (Dean Kamen, 2001) ................... 8
Figure 5: LegWay uses EOPD sensors which omit the need for the conventional
gyroscope system (Hassenplug, 2002)................................................................................ 8
Figure 6: FBD of entire system #1 ...................................................................................... 9
Figure 7': FBD of the wheeled portion for system #1 ........................................................ 9
Figure 81: FBD of pendulum portion of system #1............................................................. 9
Figure 9: Matlab Result of Step Impulse Response for State Space Model of FBD system
#1 ..............................................................
11
Figure 10: Matlab Result of Step Impulse Response for State Space Model with PID
control for FBD system #1 .............................................................
Figure 1: FBD of entire.............................................................
Figure 12: FBD of wheeled portion for system #2 (Gossard, 2006) ................................
Figure 13: FBD of pendulum for system #2 (Gossard, 2006) ..........................................
Figure 14: Matlab Result for State Space Model of FBD system #2................................
Figure 15: Design Iteration 1 .............................................................
Figure 16: Pendulum Arm Module for Design Iteration 1 ...............................................
Figure 17: Wheeled Portion of Inverted Pendulum for all design iterations ....................
Figure 18: Design Iteration 2 .............................................................
Figure 19: Pendulum-Arm Module for Design Iteration 2 ...............................................
Figure 20: Design Iteration 3 .............................................................
Figure 21: Pendulum-Arm Module for Design Iteration 3 ...............................................
Figure 22: Prototype Frame of Inverted Pendulum ..........................................................
Figure 23: Wheeled Portion Prototype Frame .............................................................
Figure 24: Manufactured Axle Shaft for Wheel .............................................................
Figure 25: Bearing for Axle Shaft .............................................................
Figure 26: Axle Shaft and Bearing .............................................................
Figure 27: Pendulum Arm portion of Inverted Pendulum ................................................
Figure 28: Pendulum Head Prototype Frame .............................................................
12
12
12
12
14
16
17
18
20
21
23
24
27
27
28
28
28
29
29
List of Tables
Table 1: System #1 Variable Notation .............................................................
Table 2: System #2 Variable Notation .............................................................
Table 3: Variable Constant Values for Systems 1 and 2 used in Matlab Scripts..............
Table 4: Materials Needed for Design Iteration 3 Prototype ............................................
5
10
13
15
26
Introduction
The reorganization of the mechanical engineering curriculum this year at M.I.T. has
changed the order in which the material in the Dynamics and Controls courses is
presented. The new curriculum focuses on controls in the secondary, more advanced
level course- 2.004 (Dynamics and Controls II). In restructuring the course, the
laboratory component was also altered; the latter half of the course deals with control
systems. The purpose of this thesis was to design and prototype a physical apparatus that
will act as an appropriate experimental vehicle for this second half of the 2.004
laboratory design component.
Background
The inverted pendulum has remained a classic controls problem because of its non-linear,
unstable nature. In order to stabilize the system, a controls system is necessary to correct
the imbalance caused by a perturbation to the system. The first successful creation of an
autonomous wheeled pendulum system (refer to Figure 1) was in 1986 by Professor
Kazuo Yamafuji at the University of Electro-Communications in Tokyo (Anderson,
2005). Yamafuji used the inverted pendulum system design with a controlling arm
pivoted at the pendulum head to create a two-wheeled robot (Feng, et. Al., 1988).
Stability is provided by the controlling arm, which rotates to counteract the moment of
the pendulum head; feedback control is based on the "pole assignment and the optimal
control" (Feng, et. Al., 1988). While several other wheeled pendulum robots have been
6
created since Yamafuji's prototype, one of the most well-known models was created by
the Industrial Electronics Laboratory at the Swiss Federal Institute of Technology.
"JOE" (refer to Figure 2), a radio-controlled, two-wheeled, inverted pendulum vehicle,
uses a digital signal processor (DSP) board to implement the controller (Grasser et
al.2002). The design of this vehicle has two coaxial wheels, which are coupled to DC
motors-- two decoupled state-space controllers control these motors (Grasser et al.2002).
In order to monitor the states of the system, a gyroscope and motor encoder sensors are
used to stabilize the system (Grasser et al.2002). Another well known inverted pendulum
robot is the nBot (refer to Figure 3), a two-wheeled balancing robot, which uses the same
principles of system dynamics, with a similar controls system arrangement. The nBot,
created by David P. Anderson, uses a HC 11 robot controller, a piezo-electric gyroscope,
and an ADXL202 accelerometer (Anderson, 2005).
_
_
___
Figure 1: First Wheeled
Pendulum robot (Anderson,
2005)
riul-
Figure 2: JOE, radio-controlled, wheeled
pendulum (Grasser et al. 2002)
7
.2. -n-1
_ad. UnDUL Lwu-wn11rLUu
balancing robot (Anderson, 2005)
The wheeled pendulum model was arguably most popularized by the commercially
available product, SegwayTM(refer to Figure 4), which follows a similar design scheme.
The Segway uses tilt sensors, advanced gyroscope systems, and two electronic controller
circuit boards to control the motion of the vehicle (Dean Kamen, 2001). Each of these
aforementioned systems requires a specialized controls system for analyzing the statespace representational model of the wheeled pendulum. Steven Hassenplug, creator of
the LegWay, used a different controls system method to build a two-wheeled balancing
robot (refer to Figure 5). The physical vehicle for the LegWay robot was constructed
using the commercially available LEGO Mindstorms robotics kit. The controls system
consists of two Electro-Optical Proximity Detector (EOPD) sensors that measure the
distance between a specific location on the vehicle and the ground; this provides the tilt
angle information of the pendulum portion of the vehicle for the controller (Hassenplug,
2002). Using EOPD sensors eliminates the need for the conventional use of a gyroscopic
component that has been utilized by the previously mentioned developers.
Figure 5: LegWay uses EOPD sensors which omit
the need for the conventional gyroscope system
(Hassenplug, 2002)
Figure 4: Segway HT model uses a gyroscopic
system (Dean Kamen, 2001)
8
System Dynamics
In order to create a physical model, the system dynamics of the wheeled pendulum first
needed to be understood. Two representations of the wheeled pendulum were analyzed
to determine the model design. The equations of motion for each system were derived
using free-body diagram analysis of the wheeled-portions and the pendulums for each
system.
FBD Analysis 1
Inverted pendulum systems are typically modeled as a wheeled-cart with a rigid rod
(pendulum) attached, as shown in Figures 6, 7, and 8.
Ii
P
I
..
F
b
--- bx
RFicia
m
Figure
6:
system
FD
of
entire#1
Figure 61: FBD of entire system #1
Figure 71: FBD of the wheeled portion
for system #1
Figure 81: FBD of
pendulum portion of
system #1
Table 1 explains the notation for each free-body diagram figure.
I M I Mass of the cart
' Images were obtained from the CTM website maintained by the University of Michigan (see Reference
#7).
9
m
b
1
I
F
x
e
Mass of pendulum
Friction coefficient between cart and ground
Length to center of mass of pendulum
Moment of inertia of pendulum (rod)
External force applied to cart
Horizontal position coordinate of Cart
Pendulum angle from vertical
Table 1: System #1 Variable Notation
Using Newtonian laws, each component can be analyzed and related to form the
equations of motions2 for the entire system.
Wheeled-Cart:
Mi+bi+ N- F
(1)
Pendulum:
N m,IMl&mo-=Iae
(2)
Pai +N
-
(3)
-nuemlI+m-i
Free-body diagram analysis yields the following equations of motion:
EOMEntireSystem:
4,
i~ iE`
(I+mO)&+ =
O-
-i
E--F
t - V+l
.4ueNh=
(4)
(5)
Mathematical Modeling. MatlabAnalysis of FBD system #1
Each FBD system was analyzed using a mathematical modeling system, MatlabTM,to
observe the system behavior under variable constant parameters. Matlab scripts for
analysis of FBD system #1 were modified from existing scripts found on a "Control
Tutorials for Matlab" website maintained by the University of Michigan (see Reference
7). Matlab scripts for the first system were created using transfer functions and state-
2 Equations for FBD Analysis of System #2 were obtained from the CTM website maintained by the
University of Michigan (see Reference 7).
10
space modeling techniques (refer to Appendix A for full Matlab scripts). Matlab analysis
of the wheeled-cart inverted pendulum system showed the following results:
10
Step-Input Response of FBD System #1
-
,
I
E
.'
,5
- --- ----
.--. ':
-.----
i
I
/
9-
0
0.5
1
1.5
2
2.5
3
3.5
4
4.5
5
Time (sec)
Figure 9: Matlab Result of Step Impulse Response for State Space Model of FBD system #1
In the above Figure 9, the cart position (in blue, on right) is shown with respect to the
pendulum angle (in green, on left). As predicted, this model is unstable and requires the
addition of a controls system. One commonly used controls system is the PID
(proportional-integral-derivative) control, which can be mathematically modeled and
simulated. The addition of a PID control using Matlab mathematical modeling results in
system stability, as shown in Figure 10. Refer to Appendix A for full Matlab script.
11
Impulse Response of FBD System #1 with PID Controller
0.4
03
1.2
:
\ \/ s
0
o.
E
.
-0.2
-0.3
-0.4
0
0.5
1
1.5
2.5
2
3
4
3.5
4.5
5
Time (sec)
Figure 10: Matlab Result of Step Impulse Response for State Space Model with PID control for FBD
system #1
FBD Analysis 2
Analysis of the second free-body diagram of the inverted pendulum models the system as
a unicycle-type design-the
two masses (the wheel and the pendulum) are connected
with a rigid rod (see Figures 11, 12, and 13).
X2
2 + m 2g
I ,ml
1
T
-Jl,ml
JI'MI~~~~
T
-41
Figure 11: FBD of entire
system #2 (Gossard, 2006)
xf
- X1
Figure 12: FBD of wheeled portion
for system #2 (Gossard, 2006)
12
Figure 13: FBD of pendulum
for system #2 (Gossard, 2006)
Table 2 explains the variable constants used in FBD analysis of system #2.
mi
J1
r,
T
Mass of wheel
Moment of Inertia of wheel
Radius of wheel
Rotational angle
Wheel horizontal position coordinate
Mass of pendulum
Length of pendulum arm
Pendulum angle from vertical
Pendulum horizontal position coordinate
Friction force in x-direction
Friction force in y-direction
Reaction force in x-direction
Reaction force in y-direction
Torque (externally applied via motor)
g
Gravity: g = 9.81 [m/ s2]
01
xl
m2
r2
02
x2
fr,
fr
fx
f
Table 2: System #2 Variable Notation
Isolating each component for free-body diagram analysis results in the following
equations of motion3 for the wheeled-portion and the pendulum, respectively.
Wheeled-Portion:
Pendulum:
KinematicRelations:
f. - f.r= mAi
(6)
T
(7)
= A.^
-fra
T=
r2202
mff2gr2sinO- T = mr2 2
(8)
x1 = rl01
(10)
(11)
-
(9)
X2 = Tr81 + r2#2
+I)(1
Substitution and rearrangement of the above equations result in the following equations
of motion for the entire system:
EOM Entire System:
(71
= _(12±B
Jeq
where:
(
+
eq
)T
r2
(12)
2
J4,= J1 + (I + Mn2)rl
3 Equations of motion for FBD analysis of system #2 were obtained from documents created by Professor
David Gossard of the Mechanical Engineering department at M.I.T. (see Reference 3).
13
(13)
6=(~y~a,
-( wT~r22)T
r2
Mathematical Modeling: MatlabAnalysis of FBD system #2
Matlab analysis was conducted on the second system using an ordinary differential
equation solver function-ODE45
(refer to Appendix A for full Matlab script). Using
equations of motion (12) and (13), the following results were obtained:
Response of FBD System #2
10
5
0
5
._
n
:t:
-5
E
-10
-15
-20
-0
1
2
3
4
5
6
7
8
Time (sec)
Figure 14: Matlab Result for State Space Model of FBD system #2
14
9
10
Each of the colored graphs represents the rotational and translational motions of both the
wheeled and pendulum portions of the system. This response does not factor any
damping effects that may be caused, for example, by air resistance. The response shows
the changes in the angles from the vertical for each portion of the system: the angular
velocity (blue) and angular acceleration (green) of the wheel, and the angular velocity
(turquoise) and angular acceleration (red) for the pendulum. This system represents the
idealized situation in the absence of damping effects, and shows the predicted cyclic
motions of the wheeled pendulum system.
For all Matlab scripts, the following constant values were used:
System 1
M
m
2 lbs
0.5 lbs
System 2
g
rl
9.81 [m/s2 ]
0.1524 [m] (6 in.)
b
I
0.2
0.005
r2
ml
0.508 [m] (20 in.)
2 lbs
g
L
9.81 [m/s 2]
0.508 [m] (20 in.)
m2
J1
0.5 lbs
0.0232 [lbs/m 2 ]
Table 3: Variable Constant Values for Systems 1 and 2 used in Matlab Scripts
Variable Design Factors
Based on these Matlab mathematical models, several design factors could be deduced.
Two factors that can change the relative stability of the system are the masses of the
pendulum head with respect to the wheel mass, and the length of the pendulum arm.
Increased stability results in a longer pendulum arm length, and a smaller pendulum head
mass (with respect to the wheeled system).
15
Design Iteration 1
Research of previously designed wheeled pendulum systems showed a design
predilection closer towards the unicycle-type design of system 2. Based on the success of
these existing systems, design iteration 1 followed a similar design schema.
Figure 15: Design Iteration 1
PendulumPortion
The main design consideration of the wheeled pendulum system is the housing for the
electrical components of the controls system. With the unicycle-type design, the controls
mechanisms needed to be placed along the pendulum arm portion of the physical vehicle.
The main focus of this design iteration was to completely protect the fragile parts of the
controls system by keeping all electrical components housed within the aluminum
rectangular tube. Two sliding entrances would allow access to the controls system on
either side of the tubing. The use of aluminum material would provide robust protection
16
against damage due to forceful impact. Figure 16 shows the primary module for design
iteration
1.
Figure 16: Pendulum Arm Module for Design Iteration I
WheeledPortion
The wheeled portion of the inverted pendulum would be comprised of two six inch
diameter plastic wheels, two DC motors, and the bearings and couplings used to link the
wheels and motors together (Refer to Figure 17).
17
Figure 17: Wheeled Portion of Inverted Pendulum for all design iterations
Each of the wheels would be press-fit onto an axle shaft and placed through a bearing.
The shaft would be powered by the motor through a coupling component. 3-D models
and diagrams can be found in Appendix B.
Design Complicationsand Considerations
Preliminary sketch models of design iteration 1 using foam-core material showed several
flaws in this design. Although the housing portion of the pendulum arm provided ample
protection against damage, the sliding portions only allows access to fifty percent of the
total space inside, rendering the other fifty percent completely useless. Since the design
specifications of the controls system are currently unknown, the limited spatial allowance
could cause this entire design vehicle to be unusable. Anticipated problems with the
18
controls system also made up a large factor in changing the design- while protection
against damage is an important design consideration, ease of access to the controls
system is more crucial.
19
Design Iteration 2
Due to the limited access in design iteration 1, the main concern behind design iteration 2
was to create a strong casing for the electrical components, but also allow for ease of
access in order to modify the controls system. The most efficient way to modify the
controls system would be to allow for the entire system to be exposed. Design iteration 2
is therefore able to be fully disassembled if necessary.
Figure 18: Design Iteration 2
PendulumPortion
The use of rectangular tubing as the outer-most casing ensures minimal damage to the
inner components of the pendulum arm. Figure 19 shows the main module component
for design iteration 2.
20
Figure 19: Pendulum-Arm Module for Design Iteration 2
Unlike design iteration 1, this design allows for complete access to the controls system,
and allows visibility of the controls system at all times to the user. The use of the
rectangular tubing also allows for variability of the pendulum arm length and width.
Multiple base-plate templates for the extrusions could be manufactured to create varied
sizes of the pendulum depending on the controls system specifications. The extrusions
would provide robust protection against any damage due to mishandling, since the
controls system would be attached to the aluminum plate completely encased within the
four extrusions. Ability to fully disassemble the pendulum arm portion will be useful if
extensive modification or repair needs to be conducted on the controls system.
WheeledPortion
21
The wheeled portion of design iteration 2 remains the same as in design iteration 1 since
no major flaws were found in the first design concept (refer to Figure 17).
Design Complicationsand Considerations
Although design iteration 2 solves both problems concerning robustness and
accessibility, several modifications could be further made to improve the design of the
prototyped vehicle. For its purpose as an experimental vehicle to be used in the
laboratory component of the 2.004 course, the wheeled pendulum prototype does not
need to have all four extrusions as a protective casing. Two aluminum extrusions would
provide ample protection against the predicted damage of rough-handed use. The
fabrication of base-plate templates to create variable width and length is also somewhat
extraneous, since the height of the extrusions should provide ample space to house the
entire controls system. Also, ease of manufacturing base-plate templates would be
inefficient for the purpose of this prototype vehicle.
22
Design Iteration 3
Design iteration 3 was modified to cut-out the unnecessary components of design
iteration 2. Figure 20 illustrates the major changes made.
Figure 20: Design Iteration 3
PendulumPortion
Design iteration 3 uses only two aluminum extrusions to house the controls system and
eliminates the use of the aluminum plate to hold the electrical components-- circuit
boards, and other parts can be attached directly to the extrusion casing. The extrusions
would be attached to two aluminum pieces that can be disassembled at both ends from
23
the wheeled-portion, and the pendulum-head portion of the vehicle.
Figure 21 shows
the detached pendulum-arm module for design iteration 3.
Figure 21: Pendulum-Arm Module for Design Iteration 3
The two aluminum extrusions will still provide ample protection against impact damage.
The detachable pendulum-arm portion will allow for ease of access for modifications to
the controls system. Attaching the electrical components directly to the extrusions also
eliminates any extra weight from the aluminum used in design iteration 2.
WheeledPortion
24
The wheeled portion of design iteration 3 remains the same as in design iteration 1 since
no major flaws were found in the first design concept (refer to Figure 17).
25
Prototype
MaterialsSelection
Aluminum was used to create the prototype vehicle of design iteration 3 since it is robust
enough to provide protection to the controls system components of the inverted
pendulum. Of the readily available materials, aluminum was also the most cost-efficient
material to use to create the first prototype of this design. Table 4 discusses the necessary
materials for design iteration 3.
Type of Aluminum
1"x 1" square extrusions (for pendulum arm and bearings)
1/4" thick sheet
1/8" thick sheet
3/4"
diameter rod (for press-fit wheel shaft)
Amount
46"
2" x 8"
20" x 20"
6"
ExtraneousMaterials
6" diameter, polypropylene wheels
2
Table 4: Materials Needed for Design Iteration 3 Prototype
Figure 22 shows the prototype frame of the wheeled portion, pendulum arm, and
pendulum head. Additional images of the prototype frame can be found in Appendix C.
26
Figure 22: Prototype Frame of Inverted Pendulum
WheeledPortion
Figure 23: Wheeled Portion Prototype Frame
27
The wheeled portion of the inverted pendulum uses two 6" diameter polypropylene
wheels, which are press-fit onto manufactured axle shafts (refer to Figure 23).
Figure 24: Manufactured Axle Shaft for Wheel
The axles are placed through bearings (refer to Figures 24 and 25) and connected to a DC
motor using a coupling.
Figure 26: Axle Shaft and Bearing
Figure 25: Bearing for Axle Shaft
Exact dimensions and models of each of the base components can be found in Appendix
B. Additional images of the physical prototype can be found in Appendix C.
PendulumArm
The pendulum arm was created by welding both aluminum extrusions to two aluminum
rectangular base-pieces (refer to Figure 26).
28
Figure 27: Pendulum Arm portion of Inverted Pendulum
Dimensions and solid models for the pendulum arm component can be found in
Appendix B.
PendulumHead
Because the specific components of the controls system are currently unknown, the
pendulum head was designed to house several possible parts, such as the batteries for the
system and the processing board (refer to Figure 27).
Figure 28: Pendulum Head Prototype Frame
29
Two circular aluminum pieces will be attached to the base of the head to add aesthetics to
the system and create a more accurate pendulum design. Part drawings for the pendulum
head can also be found in Appendix B. Additional images of the prototype can be found
in Appendix C.
Each of the three components that make up the prototype can be disassembled from one
another. The three portions are attached using #8-32 and #10-32 nuts and bolts of
varying lengths.
30
Future Work
Due to a time constraint, I was unable to start producing the controls system for the
wheeled-pendulum robot. An understanding of the necessary electrical components
required of the controls system would have allowed for a more precise prototype design,
and would also have helped determine the weight distribution of the system. Matlab
analysis of the inverted pendulum system showed that stability is dependant on the mass
of both the wheeled-portion and the pendulum. Since estimated values were used to
determine the parameters of the system, implementing a physical controls system would
have allowed for a second, more accurate prototype to be created based on the additional
mass a controls system would cause. Without the controls component, the stability of the
current prototype is questionable, since Matlab modeling was also based on ideal
conditions.
31
References
1. Anderson, D.P, 'Nbot, a two wheel balancing robot', Viewed 6 March 2006
<http://www.geology.smu.edu/-dpa-www/robo/nbot>
2. Feng, Qing; Yamafuji, Kazuo, 'Design and simulation of control systems of an
inverted pendulum', Robotica. Vol. 6, no. 3, pp. 235-241. 1988
3. Gossard, David, 2006, '2.004 System Dynamics and Control, Wheeled Pendulum'
4. Grasser, Felix, Alonso D'Arrigo, Silvio Colombi & Alfred C. Rufer, 2002, 'JOE:
A Mobile, Inverted Pendulum', IEEE Transactions on Industrial Electronics, vol
49.
<http://leiwww.epfl.ch/publications/grasser darrigo_colombi_rufermic_01 .pdf>
5. Hassenplug, Steve, 2002, 'Steve's Legway', Viewed 6 March 2006
<http ://www.teamhassenplug.org/robots/legway/>
6. Kamen, Dean, 2001, Viewed 6 March 2006, http://www.segwa.com
7. University of Michigan, 1997, 'Controls Tutorials for Matlab,' Viewed 15 March
2006. <http://www.engin.umich.edu/group/ctm/index.html>
32
AppendixA: Matlab Scriptsfor FBD Analysis
% MATLAB SCRIPT FOR FBD ANALYSIS OF INVERTED PENDULUM SYSTEM #1
%Approximated Values for Variables
M
m
b
i
g
=
=
=
=
=
2.; % in lbs (mass of wheeled portion)
0.5; % in lbs (mass of pendulum portion)
0.2; % friction coefficient
0.005; % moment of inertia
9.8; % gravity in m/sA2
1 = 0.508;
% in
[ml length
(= 20 inches)
%State-Space Model Representation
A =[0
1
(Matrix Form)
0
0;
0 -(i+m*l^2)*b/(i*(M+m)+M*m*A12)
(m^2*g*1^2)/(i*(M+m)+M*m*1^2)
0
1;
0;
0
0
0 -(m*l*b)/(i*(M+m)+M*m*l^2)
0]
B=
[
m*g*l*(M+m)/(i*(M+m)+M*m*1A2)
0;
(i+m*1^2)/(i* (M+m)+M*m*1^2);
0;
m*l/(i*(M+m)+M*m*1^2)]
C =
[1 0 0 0;
0 0 1 0]
D=
[0;
0]
T=0:0.05:10;
U=0.2*ones(size(T));
[Y,X]=lsim(A,B,C,D,U,T);
plot (T,Y)
xlabel('Time (sec)','FontSize',16)
ylabel('Amplitude','FontSize',16)
title('Step-Input Response of FBD System #1','FontSize',16)
axis([0
5 0 100])
% MATLAB SCRIPT FOR FBD ANALYSIS OF INVERTED PENDULUM SYSTEM #1 WITH
PID
% CONTROLLER
%Approximated Values for Variables
M
m
b
i
g
=
=
=
=
=
2.; % in lbs (mass of wheeled portion)
0.5; % in lbs (mass of pendulum portion)
0.2; % friction coefficient
0.005; % moment of inertia
9.8; % gravity in m/s^2
33
1 = 0.508;
num
=
% in
[m] length
(= 20 inches)
[m*l/((M+m)*(i+m*l^2)-(m*l)^2)
0]
den = [1 b*(i+m*1^2)/((M+m)*(i+m*lA2)-(m*l)^2)
(M+m)*m*g*l/((M+m)*(i+m*lA2)-(m*l)^2)
-b*m*g*l/((M+m)*(i+m*l^2)(m*l) 2)]
kd = 1;
k = 100;
ki = 1;
numPID = [kd k ki];
denPID
=
[1 0];
numc = conv(num,denPID)
denc = polyadd(conv(denPID,den),conv(numPID,num))
t=0:0.01:5;
impulse (numc,denc, t)
axis([0,
5,
-0.5,
0.5])
xlabel('Time','FontSize',16)
ylabel('Amplitude','FontSize',16)
title('Impulse Response of FBD System #1 with PID
Controller', 'FontSize',14)
%POLYADD FUNCTION SCRIPT FOR SYSTEM #1
function[poly]=polyadd(polyl,poly2)
%Copyright 1996 Justin Shriver
%polyadd(polyl,poly2) adds two polynominals possibly of uneven length
if length(polyl)<length(poly2)
short=polyl;
long=poly2;
else
short=poly2;
long=polyl;
end
mz=length(long)-length(short);
if mz>0
poly=[zeros(l,mz),short]+long;
else
poly=long+short;
end
% MATLAB SCRIPT FOR FBD ANALYSIS OF INVERTED PENDULUM SYSTEM #2
dy = zeros(4,1)
[t,y] = ode45(@whipeqnsl,
[0 10],
[0, 0, 0.5,
plot(t,y);
34
0]);
xlabel('Time (sec)','FontSize',16)
ylabel( 'Amplitude', 'FontSize',16)
title('Response of FBD System #2','FontSize',16)
axis([0
10 -20 10])
% MATLAB SCRIPT FOR FBD ANALYSIS OF INVERTED PENDULUM SYSTEM #2
(whipseqnsl function script)
function dy = whipeqnsl(t,y)
% Approximated Values for Variables
g = 9.81; %[m/s^2]
rl = 0.1524.;
%in
r2 = 0.508.; % in
[m], = 6 inches
[m], = 20 inches
ml = 2.; % in lbs
m2
= 0.5;
%in
lbs,
J1 = 0.5*ml*(rl^2).; % 0.0232 in lb*in^2
%Moment of Inertia: Solid Cylinder=1/2*M*R^2,
%l1/2*M*(Ri^2+Ro^2)
Jeq = J1 + (ml + m2)*rl^2;
Jeq
= J1;
dy = zeros(4,1);
dy(l) = y(2);
dy(2) = -(m2*rl*g/Jeq)*sin(y(3));
dy(3) = y(4);
dy(4) = (g/r2)*sin(y(3)) - 0.5*y(4);
35
Hollow Cylinder=
Appendix B: DesignIteration Part Drawings (SolidWorks)
Appendix Figure 1: SolidWorks Part Drawing for Wheeled Portion of Inverted Pendulum
Prototype ........................................................................................................................... 37
Appendix Figure 2: SolidWorks Part Drawings for Components of Wheeled Portion .... 38
Appendix Figure 3: SolidWorks Part Drawing for Design Iteration 1 Pendulum Arm.... 39
Appendix Figure 4: SolidWorks Part Drawing for Design Iteration 2 Pendulum Arm.... 40
Appendix Figure 5: SolidWorks Part Drawing for Design Iteration 3 Pendulum Arm.... 41
Appendix Figure 6: SolidWorks Part Drawing for Pendulum Head of Inverted Pendulum
Prototype ........................................................................................................................... 42
36
II
cs
II
I1
II-
...14.
-
I
41
.
1.*
I.'
10 .00
=
I.
f
Si~~~~~~~~~~~~~~~~~~s
I
.
.
...
_
'...
-1mLi
|
~
.
V|.
. ..
U
~,..l'.llnl
..
a
NW OACP
I
·
A0PHiN
C0
1a'
e=
Du-l:
I
Appendix Figure 1: SolidWorks Part Drawing for Wheeled Portion of Inverted Pendulum Prototype
I
37
I
I
05
0
i
0
0
0:
-Q,91 -J-6
0.3$
,-Z-
0
I
--I
0
-
6
1.0o
.
4.O
I 0lc:
.w
ttii*i'
4P lilw@F
fmlillg
>.~w
I~
oICP
a*M
O^Fr~vr~~~
A||~e~km
e^WFrr
*
lvmI
tA
,
i
t
tAIn
Mi
JL
s
38
J1
I
o .so
.Gm-
I
.n
0.10
a--,
I-
I
And
i
1-1
4O
IL
'I0~~~~.-1
Ij
Xi01-E
.
._
..
.
W"IWC I
A..W.
...
!
I
X
Y
Win,,f
.
Appendix Figure 3: SolidWorks Part Drawing for Design Iteration I Pendulum Arm
39
IIIIIIII_______UWYI··llllll·-·U--·l·
·I--L-Y--·Y---··-·II·C-.---__·····IYI·
_-I:I
so
- enS s
1· S
_·__I_.........·1_111..-·
II
.
-
_
*
·I
I
.
i
l
m
/
-u
I
0C~
1.00
Vc>
*
C4
A-M
.00
I
I-
L
....
l
.I--- L
-
7
r
rr
_. _
_
_
_
_
__
___
_
--
-
I
IkSi,
WLWinc
-
m4c~;
l
m
/'
k*..!
o.1
..
I-
lmd
E_ Il
8,oo00
'
_l
0,60
o- i
. =~w~
E _ .;
*4CL
Cot.
-I
,l>*pp
I
b
rI
s
I
,
I.-i
I+
I
I
I
I
"
-i
....
..
,,
,,,,
.....
LI
-l-
-II
....
......
I·
A.....
Iv
4~
.
A0"Uh
.
v
,nd.-
.
ARIOCH
O
e' iaIU
.".C
!--to-a.Ar
-
Pai m-b
Appendix Figure 4: SolidWorks Part Drawing for Design Iteration 2 Pendulum Arm
40
_
-
W "~~~ppppp~~~~~
J
_
!y
¶W MW6'MWII.
'ilt
A
0
·
Em-'<
W
I
I
M-kM
H¢O*wk
. M~.5A .z
"ua.0e9r
I|
.i
1-
l-
tI4 l.
i
*be
-
I
-
II__IUII___I*IUI__I-·-yll·-···ll
11.1111---
_111111^..1_^_1·1
__
^._·_.i
__
_
.
C
C
C
I
aK4dLia -- F
|-
1
-
I
lmma mI.
M-WIT
om.
Im
c~NrNAecP0MAI·
__
.
.
-----
M.l
-
----
--
-
.
.
-
-
_,
I
-
§
-
I
I
I
i
._r
m
o4 e
§
,#
.
.
l~mmpb
r FF
I
_
m.
'
Vi. -l1I
---
--
I
_
I
_
I
-
[ *pnd
ulumrmarO
P
- 1 · |10,·
m m.' =yc
--
-2
*
----
F' #8F
_.-
in.lb
v2·
23
I
--
--
i-
__
I I
h.
AIL"--I,
-
-~m
s
,
~
'utwAJU
----·
I
Appendix Figure 5: SolidWorks Part Drawing for Design Iteration 3 Pendulum Arm
41
YU_I__IIWI_·__L______IYYIY·-
YI--X--·-·- IIIIIXI---.·
I-· -Illl--X
II.-
I·-^I
0
clu
I
~m~~~U
d.00
I
j1
i
0
0
ct1
0,i
1.
m
-
I ',..
InhSl',
=I
I
n F l -I
;AMO
--
#Ill
ih
4F %
I&AWF
ui'-".l
Z
-"
i-
i.
"W. pi*
OAU
I
3
.
s
.
:.
,MN
WI$l
I -..
I
I *l.i I
IU
N in.l
Ie.1l-1,
Z
'·
1
I
I
.
I
I1
,hlI.
f.000"
HO
E U'
--
4* U
Ar
.Ul,&A
I
.
_
......
.
MA
..-- , r*
-
Lfop Aemb
.
-·'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Appendix Figure 6: SolidWorks Part Drawing for Pendulum Head of Inverted Pendulum Prototype
42
1"5
I,-...
^
....
.............
Appendix: C: Prototype Images
Prototype Frame:
43
Pendulum Arm:
Axle Shaft and Bearings
44
Wheeled Portion Frame
45
MITLibraries
Document Services
Room 14-0551.
77 Massachusetts Avenue
Cambridge, MA 02139
Ph: .617.253.5668 Fax: 617.253.1690
Email: docs@mit.edu
http://libraries. mit. edu/docs
DISCLAIMER OF QUALITY
Due to the condition of the original material, there are unavoidable
flaws in this reproduction. We have made every effort possible to
provide you with the best copy available. If you are dissatisfied with
this product and find it unusable, please contact Document Services as
soon as possible.
Thank you.
Some pages in the original document contain pictures,
graphics, or text that is illegible.