REV.0aAN-602APPLICATIONNOTEOneTechnologyWay•P.O.Box9106•Norwood,MA02062-9106•Tel:781/329-4700•Fax:781/326-8703•©AnalogDevices,Inc.,2002UsingtheADXL202inPedometerandPersonalNavigationApplicationsbyHarveyWeinbergINTRODUCTIONiMEMS®accelerometershavesparkedtheinterestofmanydesignerslookingforwaystobuildaccuratepedometers.Thepersonalnavigationsystemisanextensionofthepedometerwithanelectroniccompassintegratedtothepedometertoallowausertodeterminetheirpositionrelativetosomestartingpoint.Thisappli-cationnotewilldiscusstheissuesthatdesignerswillfaceintheseapplicationsanddescribesomestrategiesfortheimplementationofpersonalnavigationsystems.THECLASSICALIMPLEMENTATIONAccelerometershavebeenusedaspositionsensorsininertialnavigationsystemsformanyyears.Inertialnavi-gationsystemsuseacombinationofaccelerometersandgyroscopestodeterminepositionbymeansof“deadreckoning,”wherethedeviationofpositionfromaknownreference(orstartingpoint)isdeterminedbyintegrationofaccelerationineachaxisovertime.Themathisfairlystraightforward:PositionStartingPositionAt=+×22Howeverforlowspeedmovement,theaccuracyofsuchasystemoveranyreasonablelengthoftimeispoorbecausesmalldcerrorsaccumulateandeventuallyamounttoverylargeerrors.Thisismosteasilyillus-tratedwithanexampleofapersonwalkingat5km/h(1.39m/s)overafiveminuteperiod.Theaverageaccel-erationforthe416mtraveledwouldbe:ADisplacementtmsmavg=×===28333000009260944222..gSincethetemperaturecoefficientoftheADXL202isapproximately2mg/°C,atemperaturedeviationofeven0.5°Coverthefiveminuteswouldadd1mgoferror—morethanthedesiredsignalitself!Infact,achangeininclinationoftheaccelerometerofjust0.06°Cwouldbegreaterthan1mg.Tominimizetheerror,wemustknowtheorientationoftheaccelerometerandhavesomemethodof“resetting”theintegratortoknownreferencepositionsfairlyoften.ManysystemsuseGPSreceiversorpositionswitchestoprovidethisperiodicreferencepositioninformation.Ifthisabsolutepositionalinformationwasavailablefairlyoften(sayevery10seconds),wecouldgreatlyreducetheerror.In10seconds,theaverageaccelerationwouldbe28.4mg.Assumingwecouldholdalldcerrorsto1mgover10secondsandfixtheorientationoftheacceler-ometer,wewouldhaveapositionalerrorofapproximately0.5m—muchbetterthanaGPSsystemalonecoulddo.So,usingdeadreckoningasanadjuncttoanexistingpositioningsystemmaybeveryuseful,butitisnotveryaccuratewhenusedalone.Asanexampleofwheredeadreckoningworkswell,consideranelevator.Magneticpositionswitchesareplacedonitstrackeverymeter.However,wewishtocontrolthepositioningoftheelevatorto10mm.Theclassicsolutionistouseanopticalencoderonawheelcoupledtothetrackasa“fineposition”sensor.Sincemechanicalsensorsarepronetowear,wewishtoreplacetheencoderwheelwithanaccelerometertoimprovelongtermreliability.Assumingwecanholdthedcerrorsstableto1mgoverafewsecondsandtheelevatortravelsat1m/s,wecanfindthepositionalerroras:EAtmpos=×=××=221981249msmmg..wellwithinourtarget.PEDOMETERSWhentryingtodeterminehowfarapersonhaswalked,thereisotherinformationavailabletous.Whenpeoplewalk,thereisZ-axis(vertical)movementofthebodywitheachstep.Asimplebutinaccuratewaytomeasuredis-tancewalkedistousethisZ-axismovementtodeterminehowmanystepshavebeentakenandthenmultiplythenumberofstepstakenbytheaveragestridelength.Acommonalgorithmforstepcountingusessomeman-nerofpeakdetection.Generally,samplingisperformed–2–AN-602REV.0at10Hzto20Hzandthenaverageddownto2Hzto3Hztoremovenoise.ThestepdetectionroutinethenlooksforachangeinslopeoftheZ-axisacceleration.Thesechangesinslopeindicateastep.Onlylookingforthechangeinslopeatappropriatetimescanimprovestepcountingaccuracy.Stridefre-quencytendstochangenomorethan±15%perstepduringsteadystatewalking.Lookingforthepeakonlyduringatimewindowaspredictedbythelastfewsteps±15%willresultinmoreaccuratestepcounting.IMPROVINGTHEACCURACYUnfortunately,usingafixedvalueforstridelengthwillalwaysresultinalowaccuracysystem.Stridelength(atagivenwalkingspeed)canvaryasmuchas±40%frompersontopersonanddependslargelyonleglength.Somepedometersasktheusertoprogramtheirstridelengthtoeliminatemostofthiserror.However,eachindividual’sstridelengthwillvarybyupto±50%dependingonhowfastoneiswalking(atlowspeeds,peopletendtotakeshortstepswhileathighspeeds,theirstrideismuchlonger).Knowledgeofleglengthcannoteliminatethiserror.Butbylookingcloselyattheapplication,wecanfindwaystoimprovethesituation.Whilewalking,thekneeisbentonlywhenthefootisofftheground.Thereforewecanlookatthelegasbeingaleveroffixedlengthwhilethefootisontheground.Figure1illustrateshowthehipand,byextension,theupperbodymoveverticallywhenwalking.Bygeometryofsimilaranglesweknowthat:αθ=Sowecanshowthat:StrideBounce≈×2αWhereBounceistheverticaldisplacement(Zaxis)ofthehip(orupperbody).Bounce(Z-axisdisplacement)canbecalculatedasthesecondintegraloftheZ-axisacceleration.isasmallangleandisdifficulttomeasuresincethereisalotofshockpresentinallaxeswhilewalking.Wehavedem-onstratedempiricallythatwecansimplyuseaconstantforwithoutalargeaccuracypenalty.Infact,wecanapproximatedistancetraveledby:Distance≈−××AAnKmaxmin4where:•Aministheminimumaccelerationmeasuredinthe