Report Self-Balancing Skate
Report Self-Balancing Skate
Report Self-Balancing Skate
2
I-Glide: Self-balancing Personal Transporter
Rohan Chavan - ED11B010
Piyush Jadav - ED11B018
Dhruvesh Patel - ED11B026
Shambhuraj Sawant - ED11B034
May 11, 2014
Abstract
1
Contents
1 Problem Statement 3
1.1 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Market . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 Existing products . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2 Our Ideation 4
2.1 What is it? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
3 Technical feasibility 5
4 Manufacturing 7
4.1 layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
4.2 Design Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
4.3 Initial assembly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
5 Electronics 9
5.1 Code and Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
5.2 Problems faced . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
6 Appendix 14
7 References 17
2
1 Problem Statement
To develop a product that addresses the short distance transportation (2-7 km) issues of people
across age groups while keeping the product compact, portable and safe.
1.1 Motivation
Around 85% of students in institute either took public transport or cycled to reach their desired
destination. But this model had its decit. Students complained about parking issues and bike
getting stolen or damaged.
When we interacted with the older age group they complained about safety and parking is-
sues issues and an absence of transport option that could directly reach their doorstep. Other
issues also included signicant waiting times and overcrowding in public transportation systems.
We wanted a solution that could address all of these issues. This required the nal product
to be portable, compact and easy to use on daily basis.
1.2 Market
The next step was to study the market that could be targeted. There is a lot of scope for a
product like this, if tweaked as per the needs as the range would further widened
1. Students and middle-aged group: Our primary target, here the product could elimi-
nate issues mentioned above.
2. Mall, airport and hotel sta: The product could be modied to provide safe, stable
transport with an option to carry luggage.
3. Movement of operators in multi-bay plants: This would reduce waiting times and
increase plant eciency.
1.3 Existing products
Products in the market targetting these problems include Scarpar, Segway and Electric skate-
boards among others. But every option here had their disadvantages such as expensive, heavy,
availability etc
3
2 Our Ideation
Figure 1: Initial layout
2.1 What is it?
A self balancing 2 wheeled transporter
Focusing on basic control algorithm for safe propulsion
Compactness and portability to some extent.
Provided with straps to carry around.
Design can be extended further to include variants of the same to meet dierent market
needs and safety requirements.
4
3 Technical feasibility
The existing literature of mobile inverted pendulum was studied thoroughly ([1],[2]). It was con-
cluded from this study that though the dynamics of the system is nonlinear, linear approximation
works very well in a suciently large range.
The dynamics of the system was modelled using Newtons laws and linearised to arrive at
the following state space model.
States:
x =
y(t)
y
(t)
(t)
(t)
Dynamics matrix:
A =
0 1 0 0
0
2KeKm
(
MbL
2
+MbRwLJb
)
R
(
2Mb
(
Jw
Rw
2
+Mw
)
L
2
+Jb
(
2Jw
Rw
2
+Mb+2Mw
))
Rw
2
gL
2
Mb
2Mb
(
Jw
Rw
2
+Mw
)
L
2
+Jb
(
2Jw
Rw
2
+Mb+2Mw
)
0
0 0 0 1
0
2KeKm
((
2Jw
Rw
2
+Mb+2Mw
)
RwLMb
)
R
(
2Mb
(
Jw
Rw
2
+Mw
)
L
2
+Jb
(
2Jw
Rw
2
+Mb+2Mw
))
Rw
2
gLMb
(
2Jw
Rw
2
+Mb+2Mw
)
2Mb
(
Jw
Rw
2
+Mw
)
L
2
+Jb
(
2Jw
Rw
2
+Mb+2Mw
)
0
0
2Km
(
MbL
2
MbRwL+Jb
)
R
(
2Mb
(
Jw
Rw
2
+Mw
)
L
2
+Jb
(
2Jw
Rw
2
+Mb+2Mw
))
Rw
0
2Km
(
LMb
(
2Jw
Rw
2
+Mb+2Mw
)
Rw
)
R
(
2Mb
(
Jw
Rw
2
+Mw
)
L
2
+Jb
(
2Jw
Rw
2
+Mb+2Mw
))
Rw
Input:
u = V (t)
State space equation:
x
0
0 0 0 1
0
2 Ke Km L MbMb2 Mw
2 Jw
Rw
2
Rw
R 2 L
2
Mb Mw
Jw
Rw
2
Jb Mb2 Mw
2 Jw
Rw
2
Rw
2
g L Mb Mb2 Mw
2 Jw
Rw
2
2 L
2
Mb Mw
Jw
Rw
2
Jb Mb2 Mw
2 Jw
Rw
2
0
In[5]:= B 0, 2 Km Jb Mb L^2 Mb L Rw Rw R ,
0, 2 Km Mb L Rw Rw R . subs . subs;
In[6]:=
model StateSpaceModelA, B,
0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, SystemsModelLabels
"Voltage", "vel", "angle", "ang_vel", "pos", "vel", "angle", "ang_vel"
Out[6]=
Voltage
pos 0 1 0 0 0
vel 0
2 Ke Km Jb L
2
Mb L Mb Rw
R 2 L
2
Mb Mw
Jw
Rw
2
Jb Mb 2 Mw
2 Jw
Rw
2
Rw
2
g L
2
Mb
2 L
2
Mb Mw
Jw
Rw
2
Jb Mb 2 Mw
2 Jw
Rw
2
0
2 Km Jb L
2
Mb L Mb Rw
R 2 L
2
Mb Mw
Jw
Rw
2
Jb Mb 2 Mw
2 Jw
Rw
2
Rw
angle 0 0 0 1 0
ang_vel 0
2 Ke Km L Mb Mb 2 Mw
2 Jw
Rw
2
Rw
R 2 L
2
Mb Mw
Jw
Rw
2
Jb Mb 2 Mw
2 Jw
Rw
2
Rw
2
g L Mb Mb 2 Mw
2 Jw
Rw
2
2 L
2
Mb Mw
Jw
Rw
2
Jb Mb 2 Mw
2 Jw
Rw
2
0
2 Km L Mb Mb 2 Mw
2 Jw
Rw
2
Rw
R 2 L
2
Mb Mw
Jw
Rw
2
Jb Mb 2 Mw
2 Jw
Rw
2
Rw
vel 0 1 0 0 0
angle 0 0 1 0 0
ang_vel 0 0 0 1 0
In[9]:=
gains StateFeedbackGainsminModel, 10, 5, 1.5
Out[9]= 12.7528, 747.778, 156.231
In[10]:=
rlen L
Figure 8: Code to obtain closed loop system
14
Code added for simulation and visualization
In[11]:= animation initial state response
Manipulate
gains StateFeedbackGainsminModel, p1r, p2r, p3r;
fullstateFB SystemsModelStateFeedbackConnectminModel, gains;
soln StateResponsefullstateFB, 0, start, 0, 0, t;
solvt_ soln1;
solt_ soln2;
soldott_ soln3;
solxt_ xt . DSolvex't solvt, x0 0, xt, t1;
Voltaget_ gains.solvt, solt, soldott;
Withloc solxrun, run solrun,
topx rlen Sinrun;
topz rlen Cosrun;
base Graphics3D
Yellow, Polygon
10, 0.2, 0.2, 10, 10, 0.2, 10, 10, 0.2, 10, .2, 0.2;
rod Graphics3DBlue, Cylinderloc, 0, 0, loc topx, 0, topz, .1;
ball Graphics3DRed, Sphereloc topx, 0, topz, .1;
wheel Graphics3DBlack,
Cylinderloc, .2, 0, loc, .2, 0, .3;
board Graphics3D
Green, Polygonloc 1 Cosrun, .4, Sinrun,
loc 1 Cosrun, .4, Sinrun, loc 1 Cosrun, .4, Sinrun,
loc 1 Cosrun, .4, Sinrun;
Grid
Showbase, rod, ball, board, wheel, PlotRange 8, 8, 0.5, 2, 1, 2,
ImageSize 800, 400, Axes True,
Plotsolxt, t, 0, 10, PlotRange All, PlotLabel "Displacement",
AxesLabel "times", "disp.m", ImageSize 200, 150,
Plotsolvt, t, 0, 10, PlotRange All, PlotLabel "velocity",
AxesLabel "times", "velocity.ms", ImageSize 200, 150,
SpanFromAbove,
Plotsolt, t, 0, 10, PlotRange All, PlotLabel "pitch angle",
AxesLabel "times", "rad", ImageSize 200, 150,
Plotsoldott, t, 0, 10, PlotRange All, PlotLabel "pitch rate",
AxesLabel "times", "'rads", ImageSize 200, 150,
SpanFromAbove,
Plotrlen soldott^2 9.8,
t, 0, 10, PlotRange All, PlotLabel "Centrpetal acc. ",
AxesLabel "times", "acentg", ImageSize 200, 150,
PlotVoltaget, t, 0, 10, PlotRange All, PlotLabel "sup. Voltage",
AxesLabel "times", "Voltage V", ImageSize 200, 150
,
Alignment Top
,
var name,initial val,"label",
min,max,increment size,Appearance"Labeled",
start, 0.1, "angle ", 8, 8, Appearance "Labeled",
p1r, 3.2, "pole1 real part ", 10, 0, .2, Appearance "Labeled",
p1c,.02,"pole1 complex part",1,0,.02,Appearance"Labeled",
p2r, 2, "pole2 real part", 10, 0, .5, Appearance "Labeled",
p2c,2,"pole2 complex part",10,0,.5,Appearance"Labeled",
p3r, 3, "pole3 real", 10, 0, .2, Appearance "Labeled",
run, 0, "release system", 0,
10, .1, ControlType Trigger, AnimationRate 1,
SynchronousUpdating True, SaveDefinitions True,
AutorunSequencing 1, 3, 5, TrackedSymbols True
Figure 9: Code added for simulation and visualization
15
angle q 0.1
pole1 real part -3.2
pole2 real part -2
pole3 real -3
release system
-5
0
5
0
1
2-1
0
1
2
2 4 6 8 10
timeHsL
-2.0
-1.5
-1.0
-0.5
disp.HmL
Displacement
2 4 6 8 10
timeHsL
-1.5
-1.0
-0.5
velocity.HmsL
velocity
2 4 6 8 10
timeHsL
-0.02
0.02
0.04
0.06
0.08
0.10
qHradL
pitch angle
2 4 6 8 10
timeHsL
-0.20
-0.15
-0.10
-0.05
q'HradsL
pitch rate
2 4 6 8 10
timeHsL
0.002
0.004
0.006
0.008
a
cent
HgL
Centrpetal acc.
2 4 6 8 10
timeHsL
10
20
30
VoltageHVL
sup. Voltage
Figure 10: Dynamic simulation
Physical parameters of the system
Mw Mass of the wheels 4
Mb Mass of the pendulum 120
Ke Motor constant 0.083
Km Motor constant 0.069
R Motor armature resistance 1
Rw Radius of wheels 0.2
L Height of the pendulum (person) 1.8
Jb Moment of inertia of the person about their center of mass 60
Jw Moment of inertia of wheels 0.07
g Acceleration due to gravity 9.8
16
7 References
1. Grasser, Felix, et al. JOE: a mobile, inverted pendulum. Industrial Electronics, IEEE
Transactions on 49.1 (2002): 107-114.
2. Thao, Nguyen Gia Minh, Duong Hoai Nghia, and Nguyen Huu Phuc. A PID backstep-
ping controller for two-wheeled self-balancing robot. Strategic Technology (IFOST), 2010
International Forum on. IEEE, 2010.
3. https://www.sparkfun.com/products/10736
4. https://www.sparkfun.com/products/9873
5. http://arduino.cc/en/Main/ArduinoBoardUno
17