Вы находитесь на странице: 1из 17

ED 3110 : Product Design Lab.

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

Input coupling matrix:


B =

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

(t) = Ax(t) +Bu(t)


Here,
g Acceleration due to gravity
Jb Moment of inertia of the person about their center of mass
Jw Moment of inertia of wheels
Ke,Km Motor constants
L Height of the pendulum (person)
Mb Mass of the pendulum
Mw Mass of the wheels
5
R Motor armature resistance
Rw Radius of wheels
V(t) Control voltage
6
4 Manufacturing
4.1 layout
Figure 2: layout of components on the board
4.2 Design Parameters
To maintain a low centre of gravity all the components were placed on the bottom
Components should not hit ground as than balancing and therefore controlling would be
dicult plus damages to product
The centre of gravity could not lowered to an extent that there would be diculties placing
the components below.
Figure 3: Our nal CAD model
7
4.3 Initial assembly
The assembly consisted of three major parts - Motor and wheel, axle and platform. The idea was
to check for part availability in the market and than start with actual manufacturing.
1. Wheels used here (g. 4) are electric scooter wheels
2. A safety factor of 1.75 was considered while designing the axles
3. We faced a lot of issues with these mounts and hence we changed them with bushes
Figure 4: Wheel assembly with sprockets
Figure 5: Axle CAD model
Also it was seen that, the weight distribution is uniform
8
Figure 6: Wheel-sprocket mounts
Table 1: Dimensions of components
Parts Symbol Dimensions Weight
Wheels D 25cm 2 kg
Deck L x W x H 80cm x 35cm x 2cm 2.25 kg
Motors d1 10cm 4 kg
Battery L1XW1 15cm X 6cm 2.2 kg
sprocket diameter D2 12.5cm
pitch of the chain p 8mm 0.7 kg
chain length (30) p 24cm NA
distance between tires a 40cm 4.7 kg (axle+sprocket+wheel)
5 Electronics
Electronics part of I-glide consists of basic modules:
1. Sensing module: It consists of following parts: Razor IMU (SEN-10736 RoHS), FTDI Basic
Breakout 3.3V (DEV-09873 RoHS)
2. Actuator module: It consists of following parts: 2X 2500 RPM motor, 2X 12V Lead-acid
batteries, 2X DC motor drivers
3. Processing module: It consists of following parts: Arduino UNO.
4. Electrical assembly: It consists of general electrical components like 10, 15, 20A fuse, 10V
and 24V switches, LEDs, Prototype board.
Circuit Schematic:
9
Figure 7: Circuit
5.1 Code and Algorithm
For the rst implementation PID controller for pitch angle was used. The code is as follows:
#i nc l ude <Sof t war e Se r i al . h>
/ To support s e r i a l communication wi th
2 de vi c e s s i mul t aneous l y /
Sof t war e Se r i al mySeri al ( 12 , 11) ;
/ RX, TX Set the s o f t S e r i a l port /
/ worki ng va r i a bl e s of the pi d /
unsigned long l astTi me =0;
double Input =0, Output=0, Set poi nt =0;
double ITerm=0, l as t I nput =0;
double kp , ki , kd ,KP=0. 005 , KI=0,KD=0;
i nt pwm=0;
const double s l ope =10. 625; / to s c a l e the Output
i n Vol tage to appr opr i at e PWM s i g na l /
const i nt Di rPi n=4;
const i nt M1pwmPin=3,M2pwmPin=9;
i nt SampleTime=250; // . 250 s ec
void SetTuni ngs ( double Kp, double Ki , double Kd)
// Functi on to f i nd gai ns f o r the di s c r e t e system
{
10
double SampleTimeInSec = ( ( double) SampleTime ) /1000;
kp = Kp;
ki = Ki SampleTimeInSec ;
kd = Kd/SampleTimeInSec ;
}
// Functi on to read the pi t ch angl e val ue from IMU
double ReadPitch ( )
{
mySeri al . pr i nt ( #f ) ;
while ( mySeri al . a va i l a bl e () <12){};
byte yaw [ 4 ] ;
byte pi t ch [ 4 ] ;
byte r o l l [ 4 ] ;
f l oat y , p , r ;
i nt i ;
for ( i =0; i <=3; i ++)
{
yaw[ i ]=mySeri al . read ( ) ;
}
for ( i nt i =0; i <=3; i ++)
{
pi t ch [ i ]=mySeri al . read ( ) ;
}
for ( i nt i =0; i <=3; i ++)
{
r o l l [ i ]=mySeri al . read ( ) ;
}
y=( f l oat )&yaw;
p=( f l oat )&pi t ch ;
r =( f l oat )& r o l l ;
return( r ) ;
}
void setup ( ) // Main Setup
{
// Open s e r i a l communi cati ons and wai t f o r port to open :
S e r i a l . begi n ( 9600) ;
// s e t the data r at e f o r the Sof t war e Se r i al port
mySeri al . begi n ( 9600) ;
pinMode ( Di rPi n ,OUTPUT) ; // Decl ar e d i g i t a l output
11
}
void l oop ( ) // Main l oop
{
double e r r or ;
Input= ReadPitch ( ) ;
e r r or= Set poi nt Input ;
while ( er r or <=10|| er r or >=10) // Loop f o r s o f t s t a r t
{ Input= ReadPitch ( ) ;
e r r or= Set poi nt Input ;
}
SetTuni ngs (KP, KI ,KD) ;
l astTi me =0;
pwm=0;
while ( 1) //Main c ont r ol l oop
{
Input= ReadPitch ( ) ;
e r r or= Set poi nt Input ;
unsigned long now = mi l l i s ( ) ; // pr es ent timestamp
double timeChange = ( double ) ( now l astTi me ) ; // ti mechange
i f ( timeChange>=SampleTime )
{
/Compute a l l the worki ng e r r or va r i a bl e s /
/do onl y f o r pi t ch /
ITerm += ( ki e r r or ) ;
double dInput = ( Input l as t I nput ) ;
/Compute PID Output /
Output = kp e r r or + ITerm kd dInput ;
/Remember some va r i a bl e s f o r next ti me /
l as t I nput = Input ;
l astTi me = now;
}
/ Convert the Output i nt o a s i g na l which
can be gi ven to pwm /
i f ( Output>=0)
{
pwm= i nt ( s l ope ( Output ) ) ;
anal ogWri te (M1pwmPin, pwm) ;
anal ogWri te (M2pwmPin, pwm) ;
di gi t al Wr i t e ( DirPin , HIGH) ;
12
}
el se
{
pwm= i nt ( s l ope (Output ) ) ;
anal ogWri te (M1pwmPin, pwm) ;
anal ogWri te (M2pwmPin, pwm) ;
di gi t al Wr i t e ( DirPin ,LOW) ;
}
i f (pwm>100) // s af e t y c ut o f f
{
break ;
}
}
}
The lter and communication code on the controller on the IMU is quite complicated and hence
given in Appendix-1 for the sake of completeness.
5.2 Problems faced
1. Serial communication problem: Razor IMU rmware was designed to give continuous
streaming output, while arduino couldnt handle this continuous stream. For this purpose,
we needed to change the rmware a bit and write a separate module for communication.
Finally everything synced together!
2. Connectors: This is the usual problem of any circuit, connection breaking in between or
loose connection. To solve this, we used sealing gun.
3. Motor Driver: This problem was caused because of high initial current requirement of dc
motor. Even after putting fuse, we lost 4 of our working motor drivers. We couldnt x
this problem. For this purpose, total of 4 types of drivers were tried, but none of them
worked successfully. The best way to overcome this problem would be to build our own
motor driver based on H-bridge circuit.
13
6 Appendix
(A) Mathematica code to obtain closed loop system
In[1]:= subs 2 Mw 2 Jw Rw^2 Mb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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

Data Rw 0.2, Mw 4, Jw 0.07, L 1.8,


Mb 120, Jb 60, g 9.8, Km 0.069, Ke 0.083, R 0.5 6;
In[8]:= minModel SystemsModelDeletemodel, None, None, 1 . Data
Out[8]=
Voltage
vel 0.11275 0.308242 0 0.271686
angle 0 0 1 0
ang_vel 0.0527333 22.5188 0 0.127068
vel 1 0 0 0
angle 0 1 0 0
ang_vel 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

Вам также может понравиться