Beruflich Dokumente
Kultur Dokumente
1.Introduction
Twowheeled coaxial robots, with their outstanding
advantages, such as compact in mechanical structure,
flexibility in motion and portability, have attracted
considerable attentions in the past decades, JOE (Grasser,
DArrigo et al. 2002), nBOT(Anderson. 2007) and many
other similar robots have been reported over worldwide.
Balancecontrolisoneoftheresearchissues,andavariety
of control methods have been proposed for it, such as
59 International Journal of Advanced Robotic Systems, Vol. 8, No. 2. (2011)
Vol. 8, No. 2. (2011), ISSN 1729-8806, pp 59-67
slidingmodel(RongJongandLiJung2006;Huang,Guan
etal.2010), adaptivecontrol(RongJong andLiJung2006)
and state feedback(Shiroma, Matsumoto et al. 1996;
Grasser, DArrigo et al. 2002; Pathak, Franch et al. 2005).
Although balance control is fundamental for the
selfbalancerobots,itisnottheultimateresearchgoal.For
a robot with practical values, balance control is the basis,
anditneedstohavegoodstabilitynomatterdisturbedor
not,especiallyundertheimpactdisturbances.Otherwise,a
tiny impact disturbance may be a fatal unstable resource,
and even directly cause the robot out of balance. When
used as a mobile robot platform, instability caused by the
impact may lead to damages of the airborne equipment;
and conditions may even worse when it is as a personal
transport,forserioussecurityproblemsmayhappenwhen
it suddenly lose its balance. Therefore, studying how to
decay the impacts and realize stability is meaningful and
important. In spite of many studies have been published
concerningthebalancecontrol,butfewattentionsarepaid
to the impact disturbance. In reference (Zhou, Wu et al.
2004), the authors build a disturbance observer for
controlling the robot and give the simulation results, it
shows that the system has better ability to restrain
disturbances and improved motion capabilities. It is
obviously that interference studies can improve system
stability. Different from with the former researches, we
focus on a new systematic way to attenuate the impact
disturbances,whichiseasiertoimplement.
Atthesametime,nomatterwhatkindofcontrolmethod
isused,accurateestimatesofsystemstateinformationis
a fundamental problem. For instance, the simple way of
estimating the absolute angle of the robot is to integrate
theangularvelocityoutfromagyro.However,itwillbe
inadequateoverprolongedperiodsoftime,becausedrift
in the gyro signal will result in a ramping error in the
position measurement. This problem is described in
reference (Ashokaraj, Silson et al. 2002; Chen 2003;
Imamura, Takei et al. 2008), and the authors had to
designaspecialcompensatortodealwith.Inthispaper,
wegetthetiltanglefromdirectmeasurementratherthan
integration; an accelerometer and a gyro compose the
measurement system, the accelerometer measures the
robot tilt angle, and the angular velocity is measured by
the gyroscope. In this way, the accelerometer provides a
good lowfrequencies estimate of its orientation in
gravity, and it can get a better response in the effective
frequency range of the robot. A gyro measures only the
absoluteangularrate.Althoughitcanestimatethestates
value more accurate, a strong filter is more necessary. A
hybrid filter based on RC network and Kalman filter for
sensor signals filtering is designed. Unlike previous
studies (Chen 2003; Imamura, Takei et al. 2008), the
estimation method for the states values we proposed is
compactableandhighlyeffective,anditdosenotneedto
considerthedriftofthesensors.
2.Controllerdesign
Tr
r
fr
Hr
xr
Hl
mg
yp
y
xl
Vl
y
Tl
D/2
Hr
fl
Hl
xp
Tg
Mg
xl
xr
Vr
mg
Figure1.Straightrunningmodelfortherobot
m :Weightofonedrivingwheel
M :Weightofrobotbody
J :Momentofinertiaofthedrivingwheel
J p :Momentofinertiaoftherobotbody
R :Radiusofthewheel
D :Distancebetweenthetwowheels
L :DistancefromsystemCenterofgravitytorotaryaxis
:Tiltangularofrobotbody
:Tiltangularspeedoftherobotbody
xm :Displacementof x direction
Tr , Tl :Torquesofthedrivingwheels
(Tr Tl ) / R
xm (M 2m 2J / R2 ) ( cos 2 sin )ML (1)
2
2
(2)
J P M ( g L sin L cos ) L sin [
x m M ( cos sin ) M L ] L cos (Tr Tl )
www.intechweb.org
www.intechopen.com
K K N 2m NK mU
(3)
T m e
Ra
Ra
Modifying(1)to(3)andthenlinearizingtheresultround
the operating point ( 0, v 0 ) the systems state
spaceequationscanbewritteninmatrixformas:
v 1 0 0v b21 b21
a a 1 0 0 Ul
22 23
U
r
a 42 a43 0
b41 b41
(4)
Where
are constants
voltageofthetwo motors.
Astatesfeedbackcontrollercanbeestablishedaccording
to equation (4), and it only can achieve balance control
and line running. In this controller, the robot velocity
v isselectedasthesystemstatevariable,anditisdefined
byequation(5).
i= 0
Inthisway,thestructureoftheequationsbecomesclear,
where u(n)*p is the motor control voltage in the control
cycle n , e(n) is the velocity error, K *P , K *i and
Theleftcontrolvoltageis:
Robot
UR
v 0.5( v l v r )
Where
vl
and
vr
(5)
de(t)
dt
de(t)
e(t)dt + k rd
dt
(6)
u(t) rp = K rP e(t) + k ri
(7)
UL
(11)
+
+
+
u lp
u rp
vl
u rk
vr
PID
+
u lk
+
remoter
Ki
Figure2.Hybridcontroller
Sofar,ahybridcontrollerwithtwoclosedloopshasbeen
established, the controllers inputs are the control
voltagesofthemotorsandoutputsarethestatevariables.
Although nominally there are two inputs, but from the
equation (5) can be seen walking in the completely line
model, exactly the same input, can be considered a
singleinput system. Different from [4] [5], a PID
closedloop is added, so the new controller can control
the robot in a state of equilibrium while to synchronize
thespeedofthetwowalkingwheelsatthesametime.
Li Chaoquan, Gao Xueshan and Li Kejie: Smooth Control the Coaxial Self-Balance Robot Under Impact Disturbances
61
3.Sensorbasicrelations
q2 = q + q1
(12)
q2 = q + q1
(13)
respecttothegravity,sotherobotsabsolutespeed v can
begotbydifferential.Tobeclear,theabovequationsare
vectorratherthanscalar.
4.Blendfilter
4.1.RCnetworksforlowpassfilter
wc = 1 t
(14)
t = RC
(15)
2
o
(a)
o
(b)
Figure3.Relationshipsbetweentheangles
Figure4.Testingthenaturalfrequency
www.intechweb.org
www.intechopen.com
0.2
sita(rad)
0.1
0
-0.1
-0.2
-0.3
0
10
15
20
25
30
35
40
45
50
time/s
55
Figure5.Oscillationoftherobot
4.2.Kalmanfilterforimpactfilter
(16)
(17)
(18)
(20)
Inallofthefiveequations,(16)and(17)aretheestimated
equations, (18) (19) and (20) are the recursive formulas.
Note that the initial state value and covariance have to
beensetupbeforeitstartstowork.
5.Experimentanddiscussion
Figure6.Selfbalancerobot
5.1.FiltereffectoftheRCnetworks
Withoutthefilter,thesensorsignalshaveobviousspikes,
asshowninFig.7,eveninthestaticstate,thesensorisno
different either, there are obvious fluctuations in the
output. When the robot is attacked, the sensor system
outputappearsadramaticshockandaseriousdeviation
fromactualvalues.Afterfiltering,asshowninFig.8,the
outputsignalglitcheshavebeensignificantlyreduced,
Li Chaoquan, Gao Xueshan and Li Kejie: Smooth Control the Coaxial Self-Balance Robot Under Impact Disturbances
63
Andfortheangularfilteris:
0.5
sita(0 | 0) = 0
(24)
sp(0 | 0) = 0.06
(25)
sr = 0.2,sq = 0.04
(26)
-0.5
-1
0.5
1.5
2
time/s
2.5
3.5
Figure7.SignalswithoutRCfilter
0.6
sita(rad)
omg(rad/s)
0.4
0.2
0
-0.2
-0.4
-0.6
-0.8
0.5
1.5
2
time/s
2.5
3.5
Figure8.SignalsafterRCfiltering
Totallyspeaking,thefirstorderRCfilternetworkshows
satisfactoryperformance.Thevastmajorityoftheimpact
and disturbance signals are filtered, and the filtered
sensorsignalsaresmoothedalot.Signaldistortionisnot
serious,andthephaseangledelayisnotobvious.
initialweight,andtheyareeasytobefixed.
GetthesensordatawhichhasbeenattenuatedbytheRC
network, and load them to the Kalman filter in the
MATLABenvironment.Thenthefilteredsignalcurves,as
showninFig.9andFig.10,canbeaccessed.InFig.9,the
redcurveisthefilteredangularvelocitycurve,whilethe
blueistheinitialone.Inthevicinityof0.5s,asignificant
changeofthecurveisthatthesignalmutationcausedby
theshockdisappears,andthesamephenomenonexistsin
theanglesensorsignalfiltering,asshowninFig.10,this
shows that the designed Kalman filter has played a
filteringeffect,attenuatingtheimpactdisturbance,thisis
whatweexpect.AnotherphenomenonexistsinbothFig.
9 and Fig. 10 is the change of the phase or amplitude in
thefilteredcurve.InFig.9bothhavechangedandsome
morechangesofamplitudeinFig.10,however,thisisnot
a major problem, what we concern is the impact
disturbancecanbefilteredbythefilter,nowouraimhas
been achieved and they can be weaken by adjusting the
valueofcovariancetosolve.
omg
0.2
0
-0.2
-0.4
-0.6
-0.8
0.5
1.5
2
time/s
2.5
3.5
Figure9.Kalmanfiltertestingfortiltanglerate
ItisclearthattheRCnetworkhasanobviouseffectinthe
highfrequency signal attenuation in part A, however,
some impact signals have passed the low pass filter and
they must be filtered. In this section, test for attenuating
the impact signals based the designed Kalman filter will
begiven.Initialvaluesoftheparametersareasfollowing:
Fortheangularvelocityfilter,
omg(0 | 0) = 0.2
(21)
0.2
sitaf
0.1
sita
0
rad
omgf
0.4
5.2.FiltereffectoftheKalmanfilter
0.6
rad/s
-1.5
-0.1
-0.2
op(0 | 0) = 0.06
or = 0.1, oq = 0.02
(22)
(23)
-0.3
0.5
1.5
2
time/s
2.5
3.5
Figure10.Kalmanfiltertestingfortiltangle
www.intechweb.org
www.intechopen.com
1.5
omg(rad/s)
sita(rad)
vlo(m/s)
1
0.5
0
-0.5
-1
-1.5
-2
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5 6 6.5 7 7.5 8 8.5
time/s
Figure11.Nonsmoothcontroller
rad/s
0.5
omg(rad/s)
-0.5
-1
0 0.25 0.5 0.75 1 1.25 1.5 1.75 2 2.25 2.5
time/s
Figure12.Tiltangleratesignalsinthehybridcontroller
0.2
0.1
rad
5.3.Testingofthehybridcontroller
Forthefirsttest,thesinglestatesfeedbackgainsaresetas
1.83forthetiltrate,10.96forthetiltangleand9.63for
the robot speed. They are different from the second test;
the reason is that in a nonsmooth controller, the
overlarge feedback gain is a direct reason of the system
instability.
sita
sita
-0.1
-0.2
0 0.25 0.5 0.75 1 1.25 1.5 1.75 2 2.25 2.5
time/s
Figure13.Tiltanglesignalsinthehybridcontroller
Itisclearthattherobotcanrestoretobalanceinabout2s,
under the impact disturbance from the test; when the
impact signal is applied on the robot at about 0.1s, as
showninFig.13,thetiltanglehasasignificantmutation,
the mutation signal is not really the point of the angle
signal,buttheaccelerationsensorsignalastheimpactof
thedisturbancecausedbytheinterferenceoutput,needs
to be filtered or smoothed. The red curve, as shown in
Fig.13,showsthattheKalmanfilteronasignalthrough
the RC network has a smoothing function so that the
system under the impact of disturbances can realize
smoothstablecontrol.
www.intechweb.org
www.intechopen.com
Li Chaoquan, Gao Xueshan and Li Kejie: Smooth Control the Coaxial Self-Balance Robot Under Impact Disturbances
65
0.6
m/s
0.4
0.2
0
-0.2
0 0.25 0.5 0.75 1 1.25 1.5 1.75 2 2.25 2.5
time/s
Figure14.Twowheelspeedofhybridcontroller
0.08
error
0.06
m/s
0.04
0.02
0
-0.02
-0.04
2.25 2.5
Figure15.Velocityerrorsofthetwowheels
7.Conclusion
establishmentofthestatespacemodeldoesnotconsider
turning movement, the robot can achieve turning
movementbychangingthespeedoftwowheels.
8.Acknowledgment
9.References
[1] Ahmad,S.,M.O.Tokbi,etal.(2009).RejectionofYaw
Disturbance in a TwoWheeled Wheelchair System.
2009 Third Asia International Conference on
Modelling&Simulation,Vols1and2:454459776.
[2] Andary,S.,A.Chemori,etal.(2008).Stablelimitcycle
generation for underactuated mechanical systems,
application: Inertia wheel inverted pendulum.
Intelligent Robots and Systems, 2008. IROS 2008.
IEEE/RSJInternationalConferenceon.
[3] Anderson.,D.P.(2007).nBot.from
http://www.geology.smu.edu/~dpawww/robo/nbot/,
[200771].
[4] Ashokaraj,I.,P.Silson,etal.(2002).Applicationofan
extended Kalman filter to multiple low cost
navigationsensorsinwheeledmobilerobots.Sensors,
2002.ProceedingsofIEEE.
[5] Butler,L.J.andG.Bright(2008).Feedbackcontrolofa
selfbalancing materials handling robot. 2008 10th
International Conference on Control, Automation,
RoboticsandVision(ICARCV2008),1720Dec.2008,
Piscataway,NJ,USA,IEEE.
[6] Chen, X. (2003). Modeling random gyro drift by time
series neural networks and by traditional method.
Neural Networks and Signal Processing, 2003.
Proceedingsofthe2003InternationalConferenceon.
[7] Gans,N.R.andS.A.Hutchinson(2006).VisualServo
Velocity and Pose Control of a Wheeled Inverted
Pendulum through PartialFeedback Linearization.
Intelligent Robots and Systems, 2006 IEEE/RSJ
InternationalConferenceon.
[8] Grasser, F., A.DArrigo, et al. (2002).JOE:A mobile,
invertedpendulum.IEEETransactionsonIndustrial
Electronics49(1):107114.
[9] Huang, J.A.,Z. H. Guan, et al. (2010). SlidingMode
Velocity
Control
of
MobileWheeled
InvertedPendulum Systems. Ieee Transactions on
Robotics26(4):750758.
[10] Imamura, R., T. Takei, et al. (2008). Sensor drift
compensation and control of a wheeled inverted
pendulum mobile robot. Advanced Motion Control,
2008.AMC08.10thIEEEInternationalWorkshopon.
[11] Pathak, K., J. Franch, et al. (2005). Velocity and
positioncontrolofawheeledinvertedpendulumby
www.intechweb.org
www.intechopen.com
www.intechweb.org
www.intechopen.com
Li Chaoquan, Gao Xueshan and Li Kejie: Smooth Control the Coaxial Self-Balance Robot Under Impact Disturbances
67