<<

ProjectNumber:JAO0701

EXPLORING INERTIAL NAVIGATION TECHNIQUES FOR PRECISION PERSONNEL LOCATION AMajorQualifyingProjectReport

SubmittedtotheFaculty

ofthe

WORCESTERPOLYTECHNICINSTITUTE

InPartialFulfillmentoftheRequirementsforthe

DegreeofBachelorofScience

By

______

TiffanyWarrington

And

______

EricWong

Date:April24,2007

Approved:

______ ProfessorJohnA.Orr,MajorAdvisor I Abstract ThisprojectaimedatcharacterizingbothMEMsaccelerometersandgyroscopesfor useinalowcostinertialnavigationunit.Ahardwareandsoftwaresystem,consistingof MEMssensors,A/Dconverters,a200MHzprocessor,compactflashmemory,andC++ codedsoftware,wasintegratedintoatestbedthatcalculatesandoutputstheunit’sfinal positioningafteraccelerationand/orrotationwasapplied.Testingoftheunitprovedthat lowcostsensors,performingatspecificationsareunabletoprovideaccuratepositioning withthecurrentperformanceofMEMstechnology.

II Acknowledgements Wewouldliketothankthefollowingpeoplefortheirhelpthroughoutthisproject: ProfessorJohnA.Orr

ProfessorCosmeFurlong

IreneGouverneur

FredHutson

BradA.Miller

WorcesterPolytechnicInstitute

3 III Table of Contents IAbstract...... 2 IIAcknowledgements ...... 3 IIITableofContents ...... 4 IVListofFigures ...... 5 VListofTables...... 6 1 Introduction...... 7 2 ProblemStatement ...... 8 3 ProjectGoalsandRequirements ...... 8 4 TechnicalBackground...... 9 4.1 GPS...... 9 4.2 DeadReckoning...... 11 4.3 ImpulseUltraWideBand ...... 11 4.4 DirectionFinding ...... 13 4.5 InertialNavigation...... 14 4.5.1 Accelerometers...... 15 4.5.2 Gyroscopes...... 16 4.5.3 SensorError...... 20 4.5.4 MagnetometersandCompasses...... 22 4.6 PotentialSystemBlockDiagram ...... 23 4.7 ProcessingUnit ...... 23 4.8 MemoryStorage...... 24 5 FinalDesign ...... 25 5.1 PhysicalParameters...... 26 5.1.1 Sensors ...... 28 5.1.1.1 2axisAccelerometerADXL203 ...... 28 5.1.1.2 YawRateSensorGyroscopeADXRS150 ...... 31 5.1.2 Processor ...... 33 5.2 Software ...... 35 5.2.1 Step1...... 36 5.2.2 Step2...... 37 5.2.3 Step3...... 37 5.2.4 Step4...... 38 5.2.5 Step5...... 38 5.2.6 SoftwareChangesandAdditions...... 39 5.2.7 SoftwareValidation...... 40 5.3 SystemFunctionality...... 42 5.4 OperationalModes...... 45 6 TestingandResults ...... 45 6.1 TestPlan...... 46 6.2 Stationary ...... 46 6.3 RotaryStageTesting...... 53 6.4 OneDimensional ...... 56 6.5 TwoDimensional...... 59

4 6.6 ErrorAnalysis ...... 63 6.7 SensorSpecificationTesting...... 68 6.7.1 AccelerometerZerogBiasLevel...... 68 6.7.2 AccelerometerTemperatureVariance ...... 69 6.7.3 AccelerometerSensitivity...... 70 6.7.4 GyroscopeZeroRotationNullValue...... 71 6.7.5 GyroscopeSensitivity ...... 71 6.7.6 GyroscopeTemperatureVariance...... 72 6.7.7 GyroscopeSelfTestResponse...... 73 7 Conclusions...... 73 8 References...... 76 IV List of Figures Figure1:GPSTrilateralizationMethods ...... 10 Figure2:CellphoneusingGPSNavigation ...... 10 Figure3BandwidthofSignalTypes ...... 12 Figure4:SolenoidandDirectionalAntenna...... 13 Figure5:Threedimensionalaxis...... 14 Figure6:ASpinningMassGyroscope ...... 17 Figure7:RingLaserGyro ...... 18 Figure8:DiagramExplainingCoriolisEffect ...... 19 Figure9:MEMsGyroandthecorioliseffect ...... 19 Figure11:PotentialSystemBlockDiagram...... 23 Figure12:SystemInterconnectDiagram...... 26 Figure13:IMUPrototype...... 27 Figure14:ADXL2032AxisAccelerometerSchematic ...... 29 Figure15:ADSL203EvaluationBoardLayout ...... 30 Figure16:ADXRS150GyroSchematic...... 32 Figure17:ADXRS150EvaluationBoardLayout ...... 33 Figure18:SoftwareFlowchart...... 36 Figure19:SoftwareValidationMovementinXandYAxesNoRotation ...... 40 Figure20:SoftwareValidationRotationandMovementinYDirection...... 41 Figure21:SoftwareValidationRotationandMovementinXDirection...... 42 Figure22:Step1InitialReferencePosition...... 43 Figure23:Step2RotationofUnit...... 44 Figure24:Step3UnitMovement ...... 44 Figure25:Step5Calculations...... 44 Figure26:StationaryDatainInitialTest...... 47 Figure27:StationaryTestwithThresholdFiltering...... 48 Figure28:Test3YAxisAcceleration ...... 49 Figure29:GyroRawData–Stationary...... 51 Figure30:StationaryTest5XaxisvsTime ...... 52 Figure31:StationaryTest5YaxisvsTime ...... 52 Figure32:StationaryTest5GyroDegreesvsTime...... 53

5 Figure33:SR50SeriesRotaryStage...... 54 Figure34:Test8:90DegreeRotation...... 55 Figure35:Test5:90degreerotation...... 56 Figure36:Test5XAxisMovementseenbyAccelerometer...... 58 Figure37:PositionSeenbyLoggerProSoftwareandVernierEquipment ...... 59 Figure38:SimultaneousXandYaxesmovement...... 60 Figure39:UnitMovementin2DTesting...... 61 Figure40:Square2DTestDataPoints...... 61 Figure41:NoiseSpikeOutsideThresholdRange...... 63 Figure42:BiasCalibration ...... 64 Figure43:FinalPostionwithSoftwareCalculatedBias ...... 64 Figure44:FinalPositionwithAveragedDataSetBias...... 65 Figure45:50pointAveragedTest1Accelerometr...... 66 Figure46:50PointAveragedTest2Accelerometer...... 66 Figure47:50PointAveragedGyroscope...... 67 Figure48:TypicalOutputVarianceduetoTemperature ...... 69 Figure49:MaximumOutputVarianceduetoTemperature...... 70 Figure50:GyroOutputvTemperature...... 72 V List of Tables Table1:ADXL203EvaluationBoardCapacitorValues...... 30 Table2:ADXL203PinConfigurationandDescriptions...... 30 Table3:ADXRS150Eval.BoardCapacitorValues ...... 32 Table4:ADXRS150PinConfigurationandDescriptions ...... 33 Table5:StationaryDataCollectionResults ...... 50 Table6:RateTableOutputSummary...... 54 Table7:1DimensionalTestingResults ...... 57 Table8:2DimensionalTestingResults ...... 62 Table9:Accelerometer1ZeroGBiasLevel ...... 68 Table10:Accelerometer2ZeroGBiasLevel ...... 68 Table11:Accelerometer1,SensitivityTest ...... 70 Table12:Accelerometer2SensitivityTest ...... 71 Table13:GyroscopeSensitivityTesting ...... 72 Table14:GyroscopeSelfTest...... 73

6 1 Introduction In2005,therewere1.6millionfiresthatwerereported.Eachday,firefightersrisk theirlivestopreventlossofcivilianlives.Theygotomajorfiresceneswheretheydonot knowlayoutsofthebuildings.Theyenterthebuildingonlytodiscoverthatthereiszero visibilityduetothegreatamountofsmokeandthattheycannotfindthewayout.This problemresultsinseriousinjuryordeathbecausethefirefighterscannotexitthebuilding fortheirsafety.In2005,115firefighterswerekilledwhileonduty 1. OnDecember3 rd ,1999,therewasaterriblefireattheWorcesterColdStorage Warehouse.Fortyfirefighterswenttothescenetoputoutthefireandafewofthemwent insidetosearchforahomelesscouple.Twofirefighterssentoutadistresscallbecause theywerelostinthewarehouseduetotheheavyblacksmoke.Twosetsoftwoperson rescueteamswentintotheburningwarehousetosearchfortheircrewandthey,too, becamelost.12hourspassedbeforetheblazecouldbecontrolled.Allsixfirefighterslost theirlivesthatdaybecauseitwasimpossibleforthemtofindanexit.Whentheirbodies werefound,eachofthemwaswithin100feetofanexit.Afterthistragicevent,30,000 firefightersfromaroundtheworldwalkedinaprocessionforthebravemenwholost theirlivesintheterriblefire.Thiseventsparkedthemindsofmanypeopleinto developingabetterwaytolocatelostfirefighters.In2003,theNationalInstituteof JusticeOfficeofScienceandTechnologygranted$1Milliontowardsdevelopmentofa system.ProfessorsatWPIteamedupwithacommongoal–todevelopapersonnel locatordevicetopreventanyfuturedisasters.

7 2 Problem Statement

Precisionpersonnellocationinanoutdoorenvironmentcanbeachievedwithcurrent technologiesatalowcostandwithhighaccuracy.Inanindoorenvironmentpositioning becomesamuchmorecumbersometask.Presentresearchhasexploredmultiplemeans ofprovidingprecisionindoorpositioning,butitrequiresapreinstalledsystemforeach building.Currently,lowcostsystemsthatdonotrequirepreinstallationhavebeen researchedanddevelopedbuttheyarenotabletoprovidetheaccuracyneededforsucha task.Thisprojectinvestigatedapossiblesolutionbyintegratinglowcostsensorswith intricatesoftwarealgorithmstocharacterizethesensorsforapositioningsystem.Inour study,weaimedtodetermineifanaccurate,lowcostinertialmeasurementunitcanbe developedwithlowcostsensors.

3 Project Goals and Requirements

ThegoalofthisprojectwastocharacterizethecurrentperformanceofMEMs (MicroElectroMechanicalsystem)technologyingyroscopesandaccelerometers.This includedobservingandcalculatingthedegreeofaccuracyoftheoutputsthatthese sensorsproduceandiffilteringalgorithmscancompensatefortheerrorsseenbythese sensors.Incompletionofthisgoal,thetypesofimprovementsneededforMEMs technologytobereliableenoughtobeusedininertialnavigationsystemswere determined. Theprototypeforthisprojectdoesnothavetobepreinstalled.Thetestbedmust haveaneasysetupandstraightforwardmeanstoruntests.Thesystemwillperformina twodimensionalfield.Afterallthedataiscollected,thefinalpositionwillbedisplayed inaHyperTerminalwindow.SincethetechnologyofMEMsgyroscopesand accelerometersischangingrapidlyandnewsensorscontinuetobedesignedand produced,thedevicewillbenonspecifictothetypeofsensorsthatareconnected. Testingofthesystemwillprovidedataandallowtheteamtocharacterizethe currentperformanceofMEMstechnology.Thisprojectwillallowtheteamtodetermine whattypesofimprovementsinthetechnologyareneededbeforeitcanbeusedina personnellocationdevice.Intheendthisprojectwilldeterminewhetherornotatwo

8 dimensionallocationunitcanbeutilizedforpositioningwhileobtainingacertaindegree ofaccuracyusinglowcostsensors.

4 Technical Background

Intechnology,therearemultiplemeansinwhichtoaccomplishasingletask. Thereareavarietyofmethodsusedtofindpositioningwhennavigating,theseinclude: GlobalPositioningSystems(GPS),inertialnavigationmeans,RadioFrequency Identification,Directionfindinganddeadreckoning.ImpulseUltraWidebandcanbe usedasamethodfortransferringpositioningdataduetoitsdesirablecharacteristics.

4.1 GPS

GPSisthemostcommonlyutilizednavigationsystemtodaywithmillionsof clients 2.CurrentlytherearetwoGPSsystemsinplace,theUSsystemofNAVSTAR (NavigationSignalTimingandRanging)andtheRussiansystemnamedGLONASS (GlobalNavigationSatelliteSystem).TheEuropeanUnioniscurrentlydevelopinga systemoftheirown,Galileo.TheUSsystemconsistsof24satellites(with4additional spares)inatotalof6orbits(eachwith4satellites) 3.OnDecember8,1993itwas declaredthatGPSwouldbefullyoperationalandprovide“continuoustimeandthree dimensionalpositionand.”Upuntilrecently,carnavigationcontainedthe largestconsumermarketinGPSwithover10millionclients. 4NowGPSchips embeddedincellphoneshasconsumedthemarket.

9 GPSworksby calculatingposition(latitude, longitudeandaltitude)based onthetimedelayittakesfor asignaltobereceivedbya receiver.Usingprecise atomicclocks,thetimeit takesforthesignaltoreach thereceiveriscalculated.By multiplyingthetraveltimeby Figure 1: GPS Trilateralization Methods 5 thespeedoflightdistance canbeobtained. Trilateralizationmethodsareutilizedtodetermineaccuratelocation.Thepointof intersectionofthedistancesfromthesatellitesishowGPStriangulationisaccomplished (seeFigure1).Themoresatellitesinrangeofthereceiverthemoreaccurateofaposition canbecalculated. Today,GPSisusedforthemilitary,personallocationbasedservices(incell phonesseeFigure2)andmobilesatellitecommunicationssuchassatelliteTV,tojust nameafew.PresentGPSchipscanupdatepositionasfrequentlyas40timesasecond. 6 AlthoughGPSseemstobeaclear cutsolutiontonavigationissues,GPSis lackingwhenitcomestoapplications thatarenonlineofsight.Satellite signalsarenotincessantlyavailable everywhereonEarth,especiallywhen indoors.Multipath,whenasignaltakes twoormorepathstoreachareceiver, becomesamajorproblemwhentryingto obtainanaccuratereading.This Figure 2: Cell phone using GPS Navigation 7 multipathleadstoinaccurate

10 measurementsintimedelay,whichresultsininaccuratedistances.Signalattenuation fromvegetationisalsoanissue.Onewayinwhichtoaidthissituationiswitha combinationofGPSwithothernavigationmethods,suchasdeadreckoningorother inertialsensors.

4.2 Dead Reckoning

Deadreckoninginvolvescalculatingyourpositionbyknowninitialposition,speed anddirection.Aslongasyouknowyourspeed,courseandtimeyouwillbeableto calculateyourpositioning.Acompassmaybeusedtodeterminethedirectionwhile distancecanbecalculatedbyspeedandtime. Inthe1500sthistypeofdirectionfindingwascommon.Whileonaship,anobject wasthrownoverboard,alsoknownasaDutchman’slog,andbyrecordingthetimeit tookfortheshiptopassbytheobject(theobjectwasconsidered“dead”inthesea)the speedoftheshipcouldbedetermined. 8 Anapparentdownfalltothedeadreckoningsystemfornavigationisthatifthereis anychangeinspeedordriftincourse,withoutanymeanstocorrecttheknowledge,this isnolongeranacceptablesolutionfornavigating.Withnewertechnologycalculating speedandthedirectioncanbemadeeasybutbeforesuchtechnologicaladvancesitwas difficult.Relyinguponknownlandmarks,orfixes,anewstartofpositioningcouldbe established.

4.3 Impulse Ultra-Wide Band

AnUltraWideband(UWB)pulseisapulsethatistransmittedacrossawide rangeoffrequencies.Thesesignalscanbeveryvaluablefornavigationsystemsdueto theirhighprecision.SinceUWBsystemshavehighlyaccuratetiming,thereisadistinct separationbetweenmultipathpropagationandtheactualsignal.Thisisveryhelpfulin buildingswheresignalscanbereflectedbyobjects.Withalargebandwidth,thereismore resolutionwhichprovidesbetteraccuracyofthesystem.Thebandwidthofthesignalisat least20%ofthecenterfrequency.9Forinstance,ifasignalthatiscenteredat4GHz,the bandwidthwouldbeatleast800MHz.

11

Figure 3 - Bandwidth of Signal Types UltraWidebandsignalsareverysmallinduration.Theygenerallyrangefrom50 to1000picosecondsforeachpulse.Eachofthesepulsesrepresentsonebinarystate(a logic0or1).Thepulsewilleitherhaveahighamplitudetorepresentalogic1oralow amplitudetorepresentalogic0.Atransmittersendsoutbillionsofthesepulses,which couldlooklikenothingmorethannoise.Ahighspeedsamplingreceiverisrequiredtobe abletoreadthesesignals.Theseveryshortpulsesonadirectpatharrivetoareceiver fasterthananymultipathsignal,whichcaneliminatemultipatherror.Thereceiver deciphersthesignalbylisteningforarepeatingpulsesequencethatwassentbythe transmitter. TheFederalCommunicationsCommission(FCC)allowscommercialUWB productstooperatebetween3.1to10.6GHz. 10 Theybelievethatthesesignalscould interferewithothertransmissions.However,duetothewidefrequencyspectrum,low ,andveryshortsignalpulses,thesesystemsdonotinterferewithother transmissionsnearlyasmuchasnarrowbandsignals.Alsoduetothecharacteristicsof UWB,thesignalsarealsoresistanttootherelectricalinterferencewithotherwireless devices. Thistechnologyhascaughttheeyeofmanyelectronicscompaniesduetoseveral benefitsoverthenarrowband.Sincethesignalsarebeingtransmittedoverawide spectrumoffrequencies,thereisalotofinformationsentoutineachpulse.Thiscan allowfordatatobesentataveryfastspeed(hundredsofgigabitspersecond). 11 Since

12 UWBsignalisdistributedoverseveralgigahertz,thespectraldensityisverylow.The FCClimitedthepowerofthesignalthatcanbetransmittedto75nanowattsofpowerper megahertzoffrequencybandwidth. 12 Withthislimitationofpower,UWBsignalshave verylowpowerrequirements.Thisalsoleadstoalimitedrangeoftransmission.

4.4 Direction Finding Adirectionfindingdeviceworksbypointingadirectionalantennaindifferent directionstodeterminewherethestrongestsignaliscomingfrom.Originally,direction findingwasusedinWorldWarII.Airplaneswerelookingforboatsthatwere transmittingmessages.Antennaswereattachedtotheairplanesduringthewartolocate thedirectionofthesignal.Oncetheyknewthedirectionofthetransmitter,theplanes wouldtargettheboats.

Figure 4: Solenoid 13 and Directional Antenna 14 Currently,solenoidsarebeingusedinsteadofadirectionalantenna.Asolenoidis madeupofcoilsofwire.Forthesolenoidtobeusedindirectionfinding,itwouldbe spunaroundonamotor.Thesolenoidisusedasanantennatopickupsignals.The systemwouldmonitortheincomingsignalsthroughthesolenoidforreoccurringpeaksin thesignal.Theoppositeapproachistolistenforspotswherethesignalisrepeatedlyat0. Thisoccurswhentheantennaisorthogonaltothesignal.Whenthesignalisorthogonal totheantenna,theantennacannotreceivethesignalfromthetransmitter.Thetransmitter isthenknowntobeinoneofthetwodirectionsorthogonaltotheantennawhenthe signalis0.

13 Homingdevicesrelyonsignalstrengthtodeterminedirectionandlocationofa signal.Thebasicconceptofhomingdevicesisthatthesignalbecomesstrongerwhenthe receiverisgettingclosertothetransmitter.Asthesignalgetsstronger,adirectionofthe transmitterisestablished.ApreviousMajorQualifyingProject(MQP)wasadevice calledthe“ManTenna”isadirectionalRFhomingdevicethatusesfrequenciesbetween 160and190KHz.Atthesefrequencies,itcanpenetratemetalsheetsthatcanbeinwalls. Thecurrentversionofthedevicehasarangeof50feet.

4.5 Inertial Navigation

InertialNavigationis,“Aselfcontained systemwhichcanautomaticallydeterminethe position,velocity,andattitudeofamovingvehicle forthepurposeofdirectingitsfuturecourse”. 15 Thebasicelementindeterminingpositioninan inertialnavigationsystemisacceleration.Inorder todeterminetheaccelerationinallaxes,three accelerometersplacedorthogonallyontheX,Yand Zaxes(accordingtoFigure5)arenecessary.The Figure 5: Three dimensional axis orientationoftheaxesiscrucialforaccurate calculations.Inordertoinitializetheinertialsensors,aknownorientationmustbe specifiedbytheuser.Oncethesystemisinmotion,recalibrationisneededtoensurethe accurateorientationoftheaxis.Somesystemsarerecalibratedeveryfewsecondswhile othersdonotneedtoberecalibratedforweeksormonths.Thiswillvaryfrom applicationtoapplication.Motioninanyofthedirectionswillbedetectedandthen velocityandultimatelypositioncanbedetermined.Thefollowingequationsareusedto determinevelocity,displacementandangularrotation:

14 A(t)=Accelerationfromaccelerometer V(t)=Currentvelocity V0=Previousvelocity P(t)=Currentdisplacement P0=Previousdisplacement R(t)=Currentrotationindegrees R0=previousrotationindegrees InertialnavigationsystemshavebeendevelopingsincetheSecondWorldWar. 16 Theyconsistedofaccelerometersandmechanicalgyroscopes.Thegyroscopeswerenot veryreliableandrequiredalotofpower.Today,newtechnologiesallowforsolidstate solutionsforthesesystems. Inertialnavigationsystemsaremadeupofmultiplesensors.Thesetypically includeacombinationofaccelerometers,tomeasuretheaccelerationofanobject; gyroscopes,tomeasuretheanglesofrotation;andcompassesandmagnetometerstofind truenorthtoaidincalibratingthesystem.Inertialnavigationsystemsareusedinawide varietyofapplications.Theycanbeusedforlocationofcivilianandmilitaryplanes,or guidingmissiles.Forsomeoftheseapplications,accuracyandreliabilityaremajor factors.Tomakeinertialnavigationsystemsaspreciseandreliableaspossible,expensive componentsmustbeused.Asaresult,thecostofthesystemsdrasticallyincreases.They cancostanywherefromhundredsofthousandsofdollarstomillionsofdollars.

4.5.1 Accelerometers

MicroElectroMechanicalSystem(MEMS)accelerometersarecommonin today’sworld.Therearedifferentaccelerometersthatcanmeasureaccelerationinone, two,orthreeaxes.HighGaccelerometersmeasure+/20to250G,whilelowG accelerometersmeasure+/1.7to10G.Therearemultipleapplicationsthattheycanbe usedin,includingmeasuringposition,motion,tilt,shock,and.Asthename suggeststhistechnologymergesbothelectricalandmechanicalcomponents.In capacativesensingaccelerometers,thecapacitancecorrelatestoacceleration.Thereare bothfixedplatesandplatesattachedtopolysiliconsprings.Whenaforceisapplied,the

15 platesattachedtospringsshiftandchangethedistancebetweenthem.Thisinessense changesthecapacitancewhichisproportionaltotheappliedacceleration. MEMSaccelerometershavebecomefairlyinexpensiveovertheyears.Analog DevicesmanufacturesMEMSaccelerometersthatrangefrom$7to$28. 17 Overthepast fewyears,accelerometershavebecomeeasiertouse,morefunctionalandmorereliable. Manyaccelerometersnowhavethecapabilityofsensinglinearaccelerationin3 dimensions(X,Y,andzaxis). MEMsaccelerometersrequireinputvoltagesofaminimumof3voltstoa maximumof6volts,withaquiescentsupplycurrentfrom0.5to0.7mA.The temperaturerangesfrom40to+125degreesCelsius.Forlowgaccelerometers,ranges of±1.2gto±18garetypical.Highgaccelerometershavemuchgreaterrangesfrom± 35gto±250g.Withalowgaccelerometergreatersensitivitiestosmalleraccelerations canbeobtainedallowingforahigherresolutionofitsoutputvoltages.Thelowgallows 1000mVpergsensitivitywhilethehighgonlyallows8mVperg.Theresolutionof thelowgaccelerometerismuchgreaterbecauseitonlyneedstorepresent±1.2gto±18 gover5volts.Thehighgaccelerometersmustalsorepresenttheirrangeover5volts, leadingtoalowerresolution. Ahighermeasurementresolutionwillallowforsmallerdetectableacceleration. Thebandwidthofthesesensorsrangefrom0.5Hzto2.5kHz.Externalcapacitorsmust beusedtosetthebandwidth.Thecombinationoftheexternalcapacitorsandtheinternal resistorscreatelowpassfiltersthatlimitthebandwidthtoprovidenoisereductionand antialiasing. Manycompaniesfocusonpowerconsumptionofaccelerometers.Most accelerometersconsumelessthan1mAofpower.Thereareavailableoptionsthatfocus onobtainingbetterbatterylife.Forexample,thereisapowerdownmodewherethe accelerometerpowersdownandconsumesmuchlesscurrent(around10A)andwill poweronwhenitisinterruptedwithaquickchangeinacceleration.

4.5.2 Gyroscopes

AGyrois“Adevicethatisusedtodefineafixeddirectioninspaceorto determinethechangeinangleortheangularrateofitscarryingvehiclewithrespecttoa

16 referenceframe.” 18 Agyromeasurestherateofchangeinanglesbetweenaxes.Among otherthingsgyrosareusedfornavigation,guidanceandstabilization. 19 Examplesof theseare:tomeasurethedeviationofaguidedmissile;tomeasuretheofacar; andtodeterminethebearingofacraftfordirectionfinding. Oneimportantaspectofthe gyroisthatitsperformanceis measuredindriftrateperunittime, alsoknownasdegreesperhour. 21 Forexample,ifthegyroscope onashipsailingontheseaatthe equatorisexperiencingadriftrateof 0.0167°/hr,acorrespondingdistance canbeevaluatedfromthedefinitions statedbelow: Figure 6: A Spinning Mass Gyroscope 20 1minuteofarc=0.0167° 1minuteofarc=1Nauticalmile Therefore:0.0167°=1Nauticalmile Sincethegyroisexperiencing0.0167°ofdriftperhour,thatcorrespondstoadriftof1 Nauticalmileperhour.Afteronehourthecalculateddisplacementwillbeoffby1 Nauticalmilefromtheactualdisplacement. Othererrorsincludebias,temperature,andacceleration.Temperatureeffectscan causeerrorsuchasthermaldrift.Othersourcesoferrorincludebias,thisoccurswhen thegyrohasanoutputreadingwhenthereisnoinput.Sucherrorscanbecompensatedin thenavigationcomputertosomeextent,butresidualerrorsmayremain. Therearemultipletypesofgyroscopesavailable.Aspinningmassgyro(see Figure6)isolatesthespinningmassinacasesothatitmayremainfixedinspace.The positionofthemasstothecaseisrelativetotheangleofrotation.

17 Theringlasergyro(RLG), inventedinthe1960sisactivelyusedin navigationandtacticalsystems. 23 Alaser beamissplitandthendirectedintotwo oppositedirectionsaroundaclosedpath. Thetimedifferenceinwhichittakesboth ofthebeamstotravelaroundthepathand bedetectedbythedetectorisproportional tothespeedofrotationthatthegyrois experiencing.MostRLGsaresquareor Figure 7: Ring Laser Gyro 22 triangularshaped.Mirrorsplacedateach cornerreflectthelaseraroundtheloop.AdisadvantageoftheRLGisthatiflittle movementisdetectedandthefrequenciesofthemovingbeamsdonothavealarge differentialthenitispossibleforthegyrotohaveazerorotationalreading,thisiscalled lockin.RLGtechnologywasoriginallyexploredforuseforstrapdownapplications becauseithasexceptionalstabilityandlinearityandhasinsignificantsensitivityto acceleration. 24 Theyareliterally“strapped”downtoanobjectsuchasacarandmeasure thecar’sangularratechanges.Anotherplatforminwhichgyrosareplacediscalleda gimbaledplatform.Onagimbaledplatformthegyroscopekeepsitsorientationwhilethe vehiclerotatesaroundit.Amajordisadvantageforusingthistypeofplatformiscostof theprecisemechanicalparts,thatovertimewillandcouldlockthesysteminplace. Forsomeapplications,MEMsgyrosareequivalentlymeetingtheperformanceof othergyros.Theyarenowsmallerinsizeandcostandcanobtainthesimilar performancecharacteristics. 25 MEMstechnologyisveryoftenfoundinautomobilesto measuretiltandskidforbetterhandlingandcontrol. 26 Thesetypesofgyrosmeasure angularratesbyusingtheCorioliseffect.TheCorioliseffecttakesintoaccountthe changeinpositionofthefinaldestinationduetorotation.Forinstancewhenanobject movesinastraightpathonarotatingplatformtheCorioliseffectisexperienced(Figure 8).Althoughanobjectismovinginalinearfashion,ithasanincreasingangularvelocity asitnearstheedgeoftheplatform.Thisvelocityincombinationwiththevelocityat whichtheobjectismovingistheCorioliseffect.Thisphenomenonhappensinairplanes,

18 whentravelingfromonepointtothenext.IftheCorioliseffectwasnotaccountedfor theairplanewouldmissitsfinaldestination. TheCoriolisforceequationisshownbelow: F=2Mv* Where: F=force M=Mass v=velocity(ofthemovingobject) =angularvelocity Forinstanceanobjectplacednearthecenterofarotating circlehasalowerangularvelocitythananobjectplaced attheouteredgeofthecircle.Figure9showsthe Figure 8: Diagram Explaining Coriolis Effect mechanicalstructureofthistypeofgyro.A resonatingmassisattachedtotheinnerframe bysprings.Asthegyroexperiencesmotion abouttheaxiswhichisperpendiculartothe topsurfaceofthegyrothe“coriolissense fingers”measurethedisplacementofthemass byachangeincapacitanceproducedbythe forceofthemassinagivendirection. 28 Figure 9: MEMs Gyro and the coriolis effect 27 Figure9showstheaxisofrotationofaMEMs gyrothatproducesapositiveoutputvoltagewhenexperiencingclockwiserotation. AnalogDevicesproducesMEMsgyrosstartingat$30.Thesegyrosaresingle axisandhavearotationrangeofupto±300 ◦/sec.A temperaturesensorisalreadybuiltinternallytothe device.Thistemperaturereadingcanbeincorporated intoathermaldriftcompensatingalgorithmtoreduce thethermalnoiseofthesensor.AnalogDevicesalso manufactures2and3axisgyros,somewithselftest Figure 10: View of Gyro and axis of 29 modesthatdoublecheckthedeviceisfunctioning. rotation MEMsgyrosrequireaninputvoltageofaminimumof4.75voltstoamaximum of5.25volts,withaquiescentsupplycurrentfrom6to8mA.Theoperatingtemperature

19 rangesfrom40to+85degreesCelsius.Rotationrangeforthesegyrosareanywhere from ±75 ◦/secto ±300 ◦/sec,withasensitivityof15 ±15%to5 ±8%mV/ ◦/sec.The bandwidthofthesesensorsisDCto2000Hzwithanoisedensityrangingfrom0.05to 0.1◦/sec/√Hz.Externalcapacitorscanbeusedtosetthebandwidth,thisisimportant whentryingtoachievethebestbandwidthwithsomenoisetradeoffs.Thiscanbe accomplishedbecausethecombinationoftheexternalcapsandtheinternalresistors createlowpassfiltersthelimitthebandwidth.Amajorityofthesegyroshaveshock ratingsofupto2000g 30 . Itisimportantwhenchoosingagyrotounderstandtherotaryrateofeachsensor. Thequestiontoaskwouldbe“Howfastcanthegyroturnandstilloutputanaccurate signal?”Theoutputsofthegyrocomeinmanyforms,eitherthroughvoltage,currentor frequency.Inagyrothatproducesavoltageoutputforinstance,eachvoltage correspondstoaparticularangularrate.Asthegyroisrotatedtheoutputvoltagewill fluctuateproportionallytotheangularrateatwhichitisturned.Theoutputsofgyros workmuchliketheoutputsoftheaccelerometers.

4.5.3 Sensor Error

Therearevarioussourcesoferrorthatheavilyimpacttheperformanceofthese MEMssensors.Thesearebothinternalandexternalaspectsthatinfluence implementation.Theseerrorsincludedrift,nonlinearity,misalignment,noise, temperaturevariationandcomputationalerrors.Throughextensiveresearchandtesting itispossibleforcomputationalmodelstobedevelopedforsomesourcesoferrorthat couldbecompensatedfor.ThenperhapsMEMsdevicescouldbethesolecomponents usedinanavigationdevice.Howeverthesemodelswouldbeextremelycomplexand requireanindeterminateamountoftimeandexpensiveequipment. Driftoccursinboththeaccelerometerandthegyroscope.Driftisagradualerror thatinevitablymakesoutputreadingsandcalculationsinaccurate.Driftoccurswhenthe outputshowsachangeintimewithastableinput.Driftcanbeduetoachanging sensitivityoroffsetthatmayormaynotrelatetoachangeintemperature,pressureor light 31 .Withcontinualrecalibrationdrifterrorscanbediminished.

20 ThermaldriftisaconcernwithMEMsdevices.Outputspecificationsvary dependingonthetemperature,notonlyambienttemperaturebutmoreimportantlythe temperatureofthedevice.Thespecificationsheetfortheaccelerometerstatesthat thermaldriftcompensationisbuiltintothesensor,thereforetemperaturedriftis extremelylow,rangingaround10mgovertheentireoperatingrange.Howeverexternal temperaturesensorscouldbeusedinconjunctionwiththeaccelerometertokeeptrackof theoperatingtemperatures.Withunderstandinghowtheaccelerometeroutputchanges duetoachangeintemperature,theoutputcanbecompensatedusingasoftwaremodel. Thegyroscopeusedinthisapplicationhasabuiltintemperaturesensorthatcanberead likealltheotheroutputs.Thesensoroutputsavoltagethatisproportionalto temperature,for27°C2.5visseenontheoutput.Usingsomeadvancedcalibration techniquesthistemperaturedriftcanbecompensatedforliketheaccelerometer.Itis possibletousethetemperatureoutputofthegyroasbasisfortheaccelerometer, thereforeeliminatingtheneedforanadditionaltemperaturesensor.Furtherresearch showsthattemperaturedriftdoesreachasteadystatebetween2and12hours.Oneway toreachthissteadystateearlierwouldbetoincreasethetemperatureofthesensorstoits normaloperatingtemperatureshortlyafterstartupthereforeallowingsomelinear assumptionstobemade. Therearetwotypesofalignmenterrors,SensorlevelandSystemlevelerrors. Sensorlevelerrorsoccurwhenthereiserrorbetweentheorthogonalaxes.Forinstance inthedualaxisaccelerometer,althoughmuchcautionistakenduringthefabrication processtoensurethetwoaxesareexactly90degreesapart,therecouldbesome deviationleadingtosomeinaccurateoutputreadings.Systemlevelerrorsresultin mountingerrorsofthesensors.Therecouldbesomemachiningfactorssothesurfaceis notflat,orthePCBhassomeirregularfluctuationsintheboard.Ifthemisalignmentcan becalculatedormeasureditispossiblethatthiserrorcanbecalibratedfor.Current systemsbeingdevelopeduseKalmanfilteringtoaidinthisinaccuracy. MuchofthenoiseoutputbythesensorsiswhiteGaussiannoiseandpower supplynoise.Thenoisefromthepowersupplycanbedecoupledsimplywiththeuseof acapacitor,makingthissourceoferrorthemoststraightforwardandsimplenoisetodeal with.Gaussiannoiseismorecomplex,limitingthebandwidthmayhelpbutsimple

21 filteringorextremelycomplexfilteringsuchasKalmanfilteringcanbeemployedto reducethisnoisefurther. Asmallvariationinoutputvoltagecouldresultinalargepositionerror.Thisis duetothefactthateachaccelerometeroutputisintegratedtwicetofindthedistance, hencetheerrorisalsointegrated.Computationalerrorsalsoarisewhenformulasor decimalsaretruncatedduetocodingandmemorysize.Anadditionalcomputational erroroccurswhenasmallerrorinthesystemisintegratedtofindvelocityandthen position.

4.5.4 Magnetometers and Compasses

Amagnetometerisdeviceusedtomeasurethestrengthofamagneticfield.There aretwotypesofmagnetometers,scalarandvector.Ascalarmagnetometermeasuresthe overallmagneticfieldarounditwhileavectormagnetometerisabletomeasurethe componentofthefieldsinaspecificdirection.Amagnetometercanbeusedtoensure properlocationoftheearth’sMagneticNorthaswellastoensurethegyroscopesare obtainingaccuratemeasurements.TrueNorthisthedirectionofalongitudinalmeridian thatconvergesattheNorthPole.MagneticNorthisthedirectiongivenbyamagnetic compass.Thedifferencebetweenthesetwopolesiscalledmagneticdeclination,which istheangleofdifferencebetweentheendofacompassandTrueNorth.Magnetic declinationvariesfromplacetoplaceandintime.Amagnetometerinconjunctionwitha compasswouldallowtheusertoobtainanaccurateheading,byunderstandingwhere TrueNorthis.

22 4.6 Potential System Block Diagram

Memory

Clock Processor Interface

Temp. Sensor A-D Conv. Angular Rate

Linear Acc. Figure 11: Potential System Block Diagram

Theinitialsystemblockdiagramconsistedofthesensorsgoingintoanalogto digitalconverters,thenfedintotheprocessortoperformthecalculationsandthenoutput theresults.Theprocessorwouldhavememorytostorethedatatakeninbythesensors andaclockfortiming.

4.7 Processing Unit

Thereareseveraldifferenttypesofmicroprocessorsinthemarketatthemoment. CompaniessuchasMicrochipandTexasInstrumentsproduceawidevarietyof microcontrollers.Amicrocontrollerisatypeofmicroprocessorthatisselfsufficient, wherealmosteverythingthatisneededtorun(i.e.memoryandinterfaces,etc)isalready builtin.Ageneralmicroprocessorrequiresadditionalchipstorun.Themicroprocessor thatwouldbestfitthissystemneedstobepowerfulenoughtoperformmanyalgorithms ontheinputsignal.Someimpliedspecificationsofthemicroprocessorareeaseofuse,at leastfourinputstoreceivethedatafromtheA/Dconverter(twoaccelerometersandtwo gyroscopes),andsmallinsize.

23 Microchipproducesmanydifferentlinesofmicroprocessors,calledPIC Microcontrollersthatareeither8bitor16bit.ThePICsuseassemblyasthecoding language.Thememoryinthemicrocontrollercanrangefrom.5KBto256KBandareof differenttypes.Thereareflash,onetimeprogramming,andreadonlymemory.The microcontrollershavespeedsfrom4MHzto64MHz. ThemainprogramminglanguagethatisbeingusedtoprogramthePICis assembly.However,withnewertechnologyanddifferentcompilers,theCprogramming languagecanbeusedinsteadofassembly.Bothlanguagesareabletofullyutilizethe microprocessor. Thesemicrocontrollersarecapableofmanydifferentapplicationslikeinterfacing universalserialbus(USB),communicationthroughEthernetorRFtransmissions,to displayingonLiquidCrystalDisplays(LCDs). AcompanycalledGumstixdesignedverysmallmotherboardsthatcanrunLinux. ByrunningLinuxontheprocessor,C,C++,Java,Perl,orPythonprogramming languagescanbeusedtodoanyprocessing. Theseprocessorscanrunfrom200MHzto400MHz,dependingonwhich motherboardisselected.Theyarearoundthesizeofastickofgum(20mmX80mmX 8mm). 32 Anoptionforthemotherboardistohavea62pinconnectorand/ora92pin connector,whichallowsforexpansionboardstobeattachedforadditionalfunctionality. TocommunicatewithaGumstixprocessor,aserialorEthernetconnectioncanbeused. Someboardsthatcanbeusedforexpansionare802.11b/gwireless,10/100Ethernet, securedigitalorcompactflashreaders,analogaudio,USB,AnalogtoDigital Converters,orserialports.

4.8 Memory Storage

Twoessentialcharacteristicswhendeterminingwhattypeofmemorytochoose forthesystemarethatitishighdensityanditisnonvolatile.Highdensitywillensure thatalloftherawdatacollectedduringatrialcanbestored,withoutthememorystorage becomingcompletelyfull.Anonvolatilesystemisextremelyimportantincaseof batteryloss.Thiswillguaranteethatalloftheinformationwillbesavedwithoutfearof losingitincasepowerisnolongerapplied.Therearemultipletypesofmemory

24 availableonthemarket.Thisincludes:removableUSB,CompactFlash,andSecure Digital(SD)cardstonameafew. RemovableUSBisatypeofflashdrivewithaUSBinterfacethatcomesinsizes of60MBto8GB.Duetothelackofmovingpartsinsuchadevice(solidstate),itis consideredtobemorereliablethantheoncesopopularfloppydisk.Internally,this deviceismadeupofaprintedcircuitboardwhichisencasedinadurableplasticfor protection(itcanbecarriedaroundinapocketwithoutmuchcare).Thesedevicesare poweredbythesourceinwhichtheyareconnectedtosuchasacomputer.USB2.0 allowsrawdataratesof480Mbps(thisismuchfasterthanthe12MbpsofthepriorUSB 1.1).TypicalapplicationsofforUSBincludetransportationofpersonalfilesincluding music,picturesanddocuments;carryaroundanapplicationthatmayberunoffthedrive; anditcancontainrecoveredprogramstorepairacomputerincaseofinfection. CompactFlash(CF)ismostpopularinportabledevices.Itusesnonvolatile Flashmemory(blocksofdatathatcanbeerasedandreprogrammed)tosaveandstore information.CFcomesintypicalstoragesizesrangingfrom2MBto4GB,withwrite speedsupto6Mbps 33 .Commonapplicationsincludedigitalcameras,cellphonesand pagers. 34 SecureDigitalmemoryisalsoanonvolatile,solidstate,flashdrive.Storage sizesrangefrom128MBto2GB.Datatransferrates(readandwrite)forthisdeviceare approximately610Mbps,althoughhighspeedSDisavailableat15Mbps. ApplicationsforthismemorytypeincludeGPSreceivers,digitalcameras,cellphones andPDAs.Ofthethreememorytypesdiscussedhere,SDisthesmallestinsize, approximatelythesizeofapostagestamp.

5 Final Design

Afterreviewingthemajorcomponentsrequiredfortheunitafinaldesignwasput intoplace.Areviewoftheentiresystemanditscapabilitiesisprovided,thenfollowed byadetailedbreakdownofeachcomponent.Thisunitisanintegrationofbothhardware andsoftwarethatintricatelyworktogethertoprovideaninertialmeasurementunit.

25 5.1 Physical Parameters

Thesystemconsistsphysicallyoftheprocessingunit,protoboard,andbattery pack.Intheprocessingunit,thereistheGumstixprocessor,compactflashcardreader, Robostix(A/Dconverter),serialconnector,ACadapter,andnotificationLEDs.The Gumstixprocessorisusedtoprocessthedata.Itisa200MHzmicroprocessorthatruns theLinuxversion2.6operatingsystem.Ithasa62pinconnectorora92pinconnector, whichallowsexpansionboardstobeattachedforadditionalfunctionality.To communicatewithaGumstixprocessor,weusetheserialport.HyperTerminalin WindowsisusedtodisplaytheoutputsontheGumstix.

Figure 12: System Interconnect Diagram

26 Figure 13: IMU Prototype

TheexpansionboardsthatareusedaretheCompactFlashboard,tweener,and Robostix.Thecompactflash(CF)boardisusedasthenonvolatilememoryforthe device.ThetweenergivesusaninterfacetoacomputertocontroltheGumstix.The Robostixcontainstheanalogtodigitalconvertersthatareneededtotakeinthedatafrom theaccelerometerandgyroscope. ThenotificationLEDsarehelpfulwhenthesystemisnotconnectedtoa computertoseewhatsteptheunitiscurrentlyin.TheredLEDstatesthattheGumstixis communicatingtotheRobostix.WhentheblueLEDison,thesystemiscalibratingthe gyroscope.AblinkingyellowLEDsignifiesthatitiscalibratingtheaccelerometers. TheblinkingblueLEDmeansthatthesystemisgatheringdata. Theprotoboardhasa2axisaccelerometerandgyroscopeonit.Thereisalsoa startbuttontotelltheunitwhentobegingatheringdatafromthesensors.Thereisa switchtoturnthebatterypackonandoffthatisattachedtotheplexiglass. Theprototypesisnonsensorspecific.Assumingthesameoutputformat(analog) and5voltinputvoltage,anysensorcanbeplacedontheprotoboardforevaluation.This isusefulwhenwantingtocharacterizenewsensorsperformance.

27 5.1.1 Sensors

Thesensorswereorderedonevaluationboardsduetodifficultpackaging,the accelerometerbeingleadlessandthegyrobeingballgridarray.Thisalsoallowedfor fasterevaluationofsensoroutputsbyeliminatingtheneedforadditionalcircuit assembly.Theevaluationboardswerepackagedsuchthatprototypingonabreadboard wasmadeeasy.Eachsensoralsohasaselftestsuchthatwhen5voltsisappliedan outputof2.5voltsontheselftestpinprovesthesensorisproperlyfunctioning.An explanationofeachofevaluationboardsisincludedbelow.

5.1.1.1 2-axis Accelerometer ADXL203

TheADXL203accelerometerusedinthisprojectisa“highprecision,lowpower, completedualaxisaccelerometerwithsignalconditionedvoltageoutputs,allonasingle, monolithicIC” 35 .Thissensorisapolysiliconsurfacemicromachinedstructurethatis constructedontopofasiliconwafer.Polysiliconspringsholdthestructureoverthe waferandsupplyaresistanceagainstanyaccelerationforce.Anydeviationofthe structureismeasuredwithadifferentialcapacitor.Thistypeofcapacitivesensing accelerometerisknownforitshigheraccuracy,stability,andlownoisecomparedto othersensingtypes.However,duetothehighimpedanceofthesensingnodes,proper packagingmustbeattendedtoinordertoeliminatetheeffectsofelectromagnetic interference.

Figure14showsthefullschematicofthetwoaxisaccelerometerevaluation boardconnectedtotheRobostix.TheADXL203hasafullscalerangeof±1.7G measuringdualaxes.Theboardcontainsafivepinheaderforeasyaccesstopower, groundandtheoutputsignals.Figure15showsthelayoutoftheevaluationboard includingthesensor,headerpins,andcapacitors. Thissensorrequires3vto5vtooperate.Itmustbekeptinmindthatthissensor isratiometric,meaningtheoutputsensitivityisproportionaltothevoltagesupply.AtVs =5vtheoutputhasazeroGDCbiasof2.5v,ifthesupplyvoltagevariessodoesthe outputbiasandmustbecompensatedforwhencompletingcalibrationandanyadditional calculations.Theratioofthesevoltagesisasfollows: Vo(0GDCBias)=.5*Vs

28 Thisaccelerometerisabletomeasurebothpositiveandnegativeaccelerationsinboth axes.ApositiveaccelerationisknownwhenVoutisgreaterthanthe0GDCbiaswhilea negativeaccelerationisknownwhenVoutislessthanthe0GDCbias.Forinstance,if theaccelerometerisoperatingat5voltsourbiasisat2.5v,thenforanyoutputgreater than2.5vispositiveacceleration,anyoutputlessthan2.5visnegativeaccelerationand anyoutputequalto2.5visnotaccelerating. CapacitorC1intheschematicisusedtodecouplethepowersupply.A0.1uF capacitorisusedinmanyapplicationsinordertodecouplethenoisefromthepower supply,thusC1=0.1uF.CapacitorsC2andC3areusedtosetthebandwidth.Theseare neededinordertocreatealowpassfilterthatwillpreventaliasingandreducenoise.The bandwidthofthisaccelerometercanrangefrom0.5Hzto2.5kHz;itcanbeadjustedby theuserforappropriatebandwidthsettings.TheevaluationboardsetsC2andC3to 100nFwhichsetsthebandwidthto50Hz.Thisbandwidthmaybeadjustedbyadding additionalcapacitorstothecircuitry.Thereisabandwidthversusnoisetradeoff however,thehigherthebandwidththehighernoise 36 .

Vs Vs

Robostix

8 1 7 AD0 AD1

2 ADXL203 6

C1 C2 C3

3 5 4

Figure 14: ADXL203 2-Axis Accelerometer Schematic

29 Capacitor Value(uF) C1 .1 C2 .1 C3 .1

Table 1: ADXL203 Evaluation Board Capacitor Values

Figure 15: ADSL203 Evaluation Board Layout 37

Pin Explanation 1ST SelfTest 2–DNC DoNotConnect 3–COM Common 4–DNC DoNotConnect 5DNC DoNotConnect 6Yout YChannelOutput 7Xout XChannelOutput 8Vs 3v–6v

Table 2: ADXL203 Pin Configuration and Descriptions

30 5.1.1.2 Yaw Rate Sensor Gyroscope ADXRS150

TheADXRS150evaluationboardwasobtainedfromProfessorFurlongasafree sample,makingourdecisiononwhichgyrotouseasimpleone.Theboardisa20pin dippackagethatonceagainallowsforeasyprototypingonabreadboard.Figure16 showsthefullschematicofthegyroconnectedtotheRobostix,whileFigure17shows theevaluationboardlayout. Thisangularratesensorrequires4.75vto5.25vtooperate.Unlikethe accelerometeritsoutputisnotratiometric.Howeverithasanullreferenceof2.5vof whichtobaseclockwiseandcounterclockwisemovementsfrom.Theoutputsignalis proportionaltotherotationratearoundtheaxisnormal(zaxis)tothetopplaneofthe sensor.Arotationintheclockwisedirectionwillresultinanoutputvoltagegreaterthan 2.5vwhileanyangularrotationinacounterclockwisedirectionwillresultinanoutput voltagelessthan2.5volts.Inordertoensurethenullvoltageis2.5vwhichwebaseall ofouradditionalcalculationsfromcalibrationsoftwareisprovided. Duetothenatureofoperationofthisgyro,chargepumpcapacitorsareneededin ordertocreatea14v–16vsupply,duetothefactthatonly5varerequiredtopowerthe sensor.Thischargepumppowersanelectrostaticresonatorthatwillproducetheneeded corioliseffectforaproperlyfunctioninggyro.CapacitorsC2andC4eachwith22nF valuesareusedtocreatethechargepump.C1,C5,C6andC7arealldecoupling capacitors.C3isa22nFcapacitorusedtosetthebandwidthto40Hz.Likethe accelerometerthisbandwidthcanalsobeadjustedaccordingtouserspecifications. Table3Error! Reference source not found. liststhecapacitorvaluesthatcomestandard ontheevaluationboard 38 .

31 Vs

C6 C3

Robostix 14 10 11 3 19 2 C2 AD2

20 9 AD3 ADXRS150

18 7 C4 Vs

17 1 13 12 8 4 C1

Vs

C7 C5

Figure 16: ADXRS150 Gyro Schematic

Capacitor Value(nF) C1 100 C2 22 C3 22 C4 22 C5 100 C6 47 C7 100

Table 3: ADXRS150 Eval. Board Capacitor Values

32 Pin Explanation 1AVCC +AnalogSupply 2–RateOut RateSignalOut 3–SUMJ OutputAmpSummingJunction 4CMID HFFilterCap100nF 7–2.5V 2.5vReference 8AGND AnalogSupplyReturn 9TEMP Temp.VoltageOutput 10–ST2 SelfTestSensor2 11–ST1 SelfTestSensor1 12PGND ChargePumpSupplyReturn 13PDD +ChargePumpSupply 14–CP5 HVFilterCap47nF 1720CP4–CP1 ChargePumpFilterCapacitors

Table 4: ADXRS150 Pin Configuration and Descriptions

Figure 17: ADXRS150 Evaluation Board Layout 39

5.1.2 Processor

Gumstixhasprocessingpackagesavailablethatincludeseveraldifferent expansionboards.TheRobostixCF(compactflash)packwaschosentobethe processingunit.Itincludestheprocessorboard(Gumstix),aneightinputexpansion boardwithanalogtodigitalconverters(Robostix),compactflashinterfaceboard,anda serialinterfaceboardtocommunicatewithahostcomputer.Thispackageincludesallof

33 thehardwareneededtobuildthesystem,minusthesensors.Thisisaconvenientsolution fortheneedsofthedesign. Theprocessorcontainsa200MHzIntelXScalePXA2chipwith16MBofFlash memory.Theflashmemoryallowsforprogramtobestoredthereforquickandeasy accessbytheprocessoratbootup.Theboardhasone60pinconnectoranda92pin connectortoattachtheadditionalexpansionboards. TheRobostixhas8setsofheaderpinsforanalogtodigitalconversion.TheA/D converterhasa10bitresolutionandaconversiontimebetween13and260s.The digitaloutputresolutionusingtheADXL203accelerometeris0.9765mVat10bits.For theADXRS300gyro,thedigitaloutputresolutionis4.39mVat10bits.TheA/D convertershaveafreerunningmodewheretheywillconstantlysampleandupdatethe ADCDataRegister.ThisisdonebywritingalogicalonetotheADSCbitinADCSRA registerofthemicrocontrollerontheexpansionboard.However,thefirstconversion mustbestartedbywritingalogicalonetotheADSCoftheADCSRAregister.A programcalledi2cio,givestheGumstixtheabilitytoreadtheRobostix’sA/D conversions.WhentheinputboardisattachedtotheGumstix,registerscanbereadby typingthecommand“i2caddrGetport.pin”,wheretheportisADCandthepinis0 through7.ThiscommandiswrittenintheLinuxterminalandthe10bitvalueisprinted. The10bitvaluewillbetakeninbytheC++programandstoredinthememory. ThedatathatistakenfromtheRobostixisstoredonaCFcardthatisattachedto thecompactflashboard.ItinterfaceswiththeGumstixprocessorviathe92pin connector.Thisprovidesthememoryfordatastorageoftheaccelerometersand gyroscopeoutputsaftertheA/Dconversion.Thecompactflashalsoservesasdata storageforresultsfromadditionalcalculationsthataremade(algorithms,distances). SincetheprocessorisrunningLinux,theCFcardwillbeseenasstoragedevicedrive.In C++,codewaswrittentostorethedataintoafilesuchasatextdocument. TheGumstixboardscanbepoweredbya5voltA/CAdaptororbybatteries.The recommendedvoltageisbetween4to5voltsbecausehighervoltagescauseheating issuesintheprocessor.Wheninterfacingwiththehostcomputertouploadcodetothe Gumstix,the5voltA/CAdaptorcanbeused.Whentheunitisbeingtestedanditis necessarytobemobile,batteriescanbeused.

34 5.2 Software

Aftertheteamhadacomfortablehandleoftheprogramming,positioning softwarealgorithmsweredeveloped.Amajorityofthesealgorithmsusebasicprinciples ofphysicsandcalculus.Forinstance(assumingconstantaccelerationandconstant velocity): position(X)isfoundby: 2 X=x 0+v 0t+.5*a*t

velocity(v)iscalculatedby:

v=v 0+a*t

x0=initialdisplacement

v0=initialvelocity a=acceleration t=time Usingtheseprinciplesatwodimensionalpositionsystemcanbeacquired.Once theteamsuccessfullymodeledtheequationstofindpositioningthesoftwarewas downloadedtotheprocessorandinitialtestingoftheunitwentunderway. Eachstepinthesoftwarehasthreeseparateprogramsthatprocessthedatathatis comingin.Thegyroscope,Xaxis,andYaxisoftheaccelerometereachgothroughtheir ownspecificprograms.Theydonotgetincorporatedtogetheruntilthefinalstepwhere finalpositioningiscalculated. ThecompilerusedtocompiletheC++codeislocatedinthebuildrootforthe Gumstix.ItutilizestheuClibclibrarieswhichcontainsasmallCstandardlibrary.The intendeduseforuClibcisforembeddedLinuxsystemsliketheGumstix.Amakefile, providedbyGumstix,directsthehostcomputertouseuClibctocrosscompiletheC++ codefortheGumstix.

35 Figure 18: Software Flowchart

5.2.1 Step 1

Thefirststepisforthesoftwaretocalibratetheaccelerometerandgyroscope. Thesoftwaretakes50datapointsfromthegyroscopeandaveragesthemtogethertoget theDCbias.Anadditional50datapointsaretakenbythesoftwareforthe accelerometersandtheDCbiasfortheXaxisandYaxis.Theseaveragesarestoredin thefilecalledcal.txt. Scalefactor,alsoknownassensitivity,istheratioofchangeintheoutputdue toachangeintheinput.ScalefactorisexpressedinV/g(voltsperg,gravitational acceleration).Bias,alsoknownaszerooffset,istheaverageoutputofthesensorovera periodoftimewhichismeasuredatspecificoperatingconditionswhichisnotassociated withtheinput.Biasisexpressedinvolts.Bothofthesetwofactorsrelatedtoboth

36 internalandexternalfactors.Scalefactorandbiascanbecalculatedbythefollowing formulas:

ScalefactorSF=(V +g –V g)/2V/g

BiasB=(V +g +V g)/2V V+g isthevoltagewhentheaccelerometerisalignedwithgravity V gisthevoltagewhentheaccelerometeris180°fromgravity Oncethesetwofactorsarecalculatedaccelerationcannowbeexpressedbythefollowing equation: A=(Vo–B)/SFg WhereVoistheoutputvoltage Inessence,thecalibrationthatisappliedisdeterminingthebiasatwhichitbaseall furthercalculationsfrom.

5.2.2 Step 2

Theaccelerometerandgyroscopeoutputvoltagesthatcorrespondtoacceleration andrateofrotationrespectively.Thesoftwaretakesthedataandusesanalogtodigital (AD)converterstoconvertthevoltagesintoadigitalrepresentation.TheADconverters canrepresentupto5voltswith10bits.Thesoftwaretakesthebinarybitsandconvertsit intodecimalform.Therefore,0voltsisequalto0and5voltsisequalto1023.The programsthenstorethedecimalvoltagerepresentationsintotextfilescalledaccelx.txt, accely.txt,andgyro.txt.

5.2.3 Step 3

Thedataisthentakenandconvertedintovoltagesbymultiplyingthedigitally representedvoltagesby.0048876.Thisnumberis5/1023whichgiveshowmanyvolts perdecimalvalue.Oncetheconvertednumberisobtained,thecalibrationdataisused. Thegyroscopeandaccelerometercalibrationvoltagesaresubtractedfromthe correspondingvoltagesgatheredinstep2.Thisremovesthebiasfromthecomponents’ outputandbringsthecentervoltageto0V.Bydoingthis,forwardmovementsare positiveandbackwardmovementsarenegativefortheaccelerometer.Thegyroscope

37 willhavepositivevaluesforclockwisemotionandnegativevaluesforcounterclockwise motion.Thisdataisthenstoredintoaccelxcal.txt,accelycalc.txt,andgyrocal.txt.

5.2.4 Step 4

Inthisstep,thedistancesanddegreesbetweeneachtimeintervalaredetermined. First,thedataisreadintothesoftware.Athresholdisimplementedintheaccelerometer programsbecausethereisalotofnoisecomingfromtheaccelerometers.Therehasbeen randomnoiseupto.2m/s 2.Amajorityofthenoiseseenwasbelow.15m/s 2.Thereforea thresholdof.15m/s 2wasputintopractice.Thislowerstheresolutionofthesystemasa wholebecauseitwillnotdetectanyaccelerationbelow.15m/s 2.However,thesystemis capableofsamplingat6samplespersecond;itisnotenoughresolutiontodistinguishthe differencebetweennoiseandactualacceleration.Whendataistakenthatisbelow.15 m/s 2,itwillbereplacedwith0m/s 2.Thetimeintervaliscalculatedbytakingthecurrent timeofthesampleandsubtractingitfromthetimeofthenextsample. Theaccelerometerdataistakenfromtheaccelxcal.txtandaccelycal.txt.Thisis thenintegratedoncetogetvelocity.Velocityisthenstoredintoavariabletokeeptrack ofthecurrentvelocity.Whenthereisachangeinacceleration,itisintegratedtoget velocityandisthenaddedtothecurrentvelocity.Thecurrentvelocityisthenintegrated tocalculatethedistancetraveledduringthattimeinterval.Thisdataisstoredinto positionx.txtandpositiony.txt. Thegyroscopehasaconversionof12.5mV/°/s.Whenthevoltagefromthe gyroscopeistakenanddividedby12.5mV/°/s,theresultis°/s.Itisthenmultipliedby thetimeintervaltodeterminethedegreesthatthesystemhasmoved.Thecurrentdegree statusisstoredintoavariabletokeeptrackoftherotationoftheunit.Thecurrentdegree rotationisstoredintopositiong.txt.

5.2.5 Step 5

Inthefinalsoftware,allthedistancesintheXaxisandYaxis,andcurrentgyroscope rotationweretakenintoaccount.BytakingtheXaxisdistanceandtheYaxisdistance andusingarctangent,thetacanbedetermined.Whenthetaandthegyroscopedegree rotationareaddedtogether,thisprovidesPhi,thetotalangleofthepositionvectorP.

38 PositionvectorPiscalculatedwithuseofthePythagoreanTheorem,XaxisandYaxis distances.Usingthetrigonometryfunctionssineandcosine,positioning,relativetothe originaldirectionthattheunitwasplacediscalculatedforeachtimeinterval.Aftereach datapoint,itisaddedtothecurrentlocationoftheIMUtoshowthepositionofthe systemateachdatapoint.Thesevaluesarestoredinthefilesxposition.txtand yposition.txt.Attheendoftheprogram,thefinalpositioningisoutputtothescreenin HyperTerminal.

5.2.6 Software Changes and Additions

Oneissueinthesoftwarethattheteamexperiencedwasrecognizingiftheunit wasstationaryormovingatconstantvelocitywhentheaccelerometerswereoutputting zeroacceleration.Theaccelerometersoutputaccelerationwhenitexperiences acceleration,butreturnstotheDCbiaswhenitdoesnotexperienceanyacceleration, howevertheunitmaybemovingataconstantvelocity.Inordertodeterminethecurrent statusofthesystematzeroacceleration,velocitymustbekeptinmemory.Whenthe accelerometersexperienceacceleration,itisintegratedintovelocityandisaddedtothe currentvelocity.Positiveaccelerationleadstoaddingapositivevelocitytothecurrent one.Negativeaccelerationaddsanegativevelocitytothecurrentvelocity.Therefore,if equalbutoppositeaccelerationsarefeltbytheaccelerometersoneaftertheother,the velocitywillgoupandthengobackdownthesameamountandbeatzerovelocitywhen thereisnoacceleration.Iftheaccelerationswerenotequalandopposite,thevelocity willbeataconstantvelocitywhentheaccelerometerisnotexperiencingany acceleration. Softwarewasaddedtoimplementstartandstopbuttons.Thebuttonsare connectedtoADconvertersand5V.Thesoftwarewillwaituntilthestartbuttonis pressedbeforetheprogrambeginscalibration.Whenthestopbuttonispressed,theunit stopsgatheringdataandbeingsprocessingit.Thestopbuttonfunctionalityhasbeen disabledbecausefortestingpurposes,itiseasiertohaveaspecificamountofdatapoints fordifferenttests.

39 5.2.7 Software Validation

Severaldifferenttestsweredonetovalidatetheintegrityofthesoftware. Simulateddatawereputintothetextfilesaccelx.txt,accely.txt,gyro.txt,andtiming.txt. Thisdatawasinputasdigitalvoltagerepresentationindecimalform.Thetiming increasedatintervalsofonesecond.Thevaluesweretakenandthensimulatedinthe programtodetermineifthecorrectoutputswereachievedduringeachstepofthe programs.Thevalueswerealsocalculatedbyhandtovalidatetheproperoutputs.

Figure 19: Software Validation - Movement in X and Y Axes - No Rotation Thesystemwassimulatedtomovealongeachaxistodeterminewhetherthe algorithmswerewrittencorrectlywithoutrotationofthegyroscope.Itwassimulatedto moveforwardandbackwardsalongtheYaxistomakesurethesoftwareworkedinboth cases.ThesamewasdonetotheXaxis.

40 45°Rotation135°Rotation

225°Rotation315°Rotation Figure 20: Software Validation - Rotation and Movement in Y Direction Thedatasimulatedthatthesystemrotatedandthenmovedintoeachofthe quadrantsshowninFigure20.Thiswasdoneinfourdifferentteststoeliminateany errorsthatcouldoccurinprevioussteps.Thiswasimportanttodeterminewhetherornot thesystemwouldbeabletounderstandthetrigonometryfunctionsanddeterminewhich quadrantitiscurrentlylocatedin.Whenusingthetangentfunction,certainnegative signsarelostduetothecharacteristicsofthetangent.Whenusingtangent,thesystem withoutcorrectionsoftwarewouldproducethesameoutputswhenthesystemwentinthe positiveXdirectionandpositiveYdirectionandwhenthesystemwentinthenegativeX andnegativeYdirection.

41 Figure 21: Software Validation - Rotation and Movement in X Direction Inthesesoftwaretestverifications,theunitwasrotatedandthenacceleratedback andforthalongtheaxis.Thiswasusedtovalidatethatthetrigonometrywascorrectly implementedinthesoftware. Aftercompletingthesoftwarevalidation,initialtestingcouldbedonewith confidencethatthesystemisaccuratelyusingtheinputdataandcalculatingpositioning.

5.3 System Functionality

Whentheinertialmeasurementunit(IMU)ispoweredon,theoperatingsystem bootsup.Oncetheoperatingsystemisbooted,itautomaticallybeginsrunningthescript whichcontainsinstructionsonwhichpartoftheprogramtorunatwhattime.Allofthe dataisthenstoredontothecompactflashcard,seeFigure18. Thefirstpartoftheprogramiscalibratingthesensors.Thesystemwaitsuntilthe startbuttonispressedbeforeitbeginscalibration.Calibrationconsistsoftwosteps– calibratingthegyroscope,thencalibratingtheaccelerometers.Duringthegyroscope calibration,theunitiscompletelystill.Thisallowsthesystemtodeterminetheinitial biasbyaveragingseveraldatapoints.Theaccelerometercalibrationisdoneinthesame manner.Thecalibrationdataisstoredintoatextfile. TheIMUbeginsgatheringdataimmediatelyaftercalibrationfinished.Initially, theunitcheckstoseehowmanydatapointstotakebycheckingafilestoredonthe compactflashcard.Thisnumbercanbechangedtomeettestingrequirements.Thedata gatheredbytheA/Dconverterconsistsofthebitrepresentationofvoltagesfromthe accelerometerfortheXandYaxisandfromthegyroscope.Eachtimethesystem

42 gathersdatafortheaccelerometerandgyroscope,ithasacorrespondingtimestamp.All ofthedataisstoredinseparatetextfiles. Immediatelyfollowingthedatacollection,thefilteringisapplied.Thisconsists ofconvertingthebitrepresentationofthevoltagesintovoltagesandremovingtheinitial biasoftheMEMssensors’data.Thesoftwarelooksintothecalibrationtextfileto determinethebias.Itcentersthedataaround0soforwardmotionispositiveand backwardmotionisnegativefortheaccelerometerinitscorrespondingaxis.Thisdatais thenstoredintothreedifferenttextfilesfortheaccelerometerXaxis,accelerometerY axis,andgyroscope. Lastly,thescriptrunsthepositioningsoftware.Thedistanceisdeterminedby integratingtheaccelerationtwice,betweeneachtimeinterval.Tosolvefortherotation oftheunit,thedatafromthegyroscopeistaken,dividedbythesensitivity(12.5mV/°/s), andmultipliedbythetimeinterval.Thisgivesthedegreesofrotationoftheunit.These valuesarestoredintoseparatetextfiles.Fromthere,thepositioningsoftwareuses trigonometrytodeterminethelocationofthedeviceateachtimeinterval.

Figure 22: Step 1 - Initial Reference Position

43

Figure 23: Step 2 Rotation of Unit

Figure 24: Step 3 - Unit Movement Given: X=AccelpositionXaxis Y=AccelpositionYaxis G=Gyrodegree Calculated: θ=tan 1(Y/X) Φ=Θ+G P=√x 2+y 2 Y1=P*sin(Φ) X1=P*cos(Φ) Figure 25: Step 5 - Calculations

44 Whenthesystembeginsthedataacquisition,theinitialreferencepositionistaken andthefinalpositionisrelativetothereference(Figure22).TheunitthenrotatesbyG degrees(Figure23:Step2RotationofUnit).Itthenstaysatthatrotationandmoves alongthebluelineP(Figure24:Step3UnitMovement). TheaccelerationintheXdirectionandYdirectionareknown.Theintegrationof theseparameterswillresultinthepositionvectorsrelativetotherotationoftheunit.The resultswouldbethevariablesXandYinFigure25:Step5Calculations.Usingthe PythagoreanTheorem,thefinalpositioningvectorPcanbefound.θiscalculatedby usingarctangentofY/X.Anotherparameterthatisknownistherotationoftheunit,G. WhenθandGareaddedtogether,thedegreerotationisreferencedtotheoriginal positionoftheunitwhenthedataaquisitionbegan.ByknowingΦ,thetotalrotation relativetotheoriginalposition,andP,X1andY1componentsrelativetotheoriginal positioncanbefound.ThisisdonebyY1=P*sin(Φ)andX1=P*cos(Φ).Ifthesystem isconnectedtoacomputerthroughHyperTerminal,thefinalcoordinatesaredisplayed onthescreeninmeters.Theprocessingofthedatatakesapproximately2secondsto completebeforethedataisdisplayedonthescreen.

5.4 Operational Modes

Theunitworksintwodifferentmodes.Theunitcanworkasastandalone systemorbeconnectedtothePCviaserialcable.Instandalonemode,theunitisbattery poweredandstoresthedataandprocesseddatatothecompactflashcard.TheIMUwill befreeroaming.Thisallowsfortestingtobedonewheremoremotionisrequired.The datacanthenbereceivedusingacompactflashcardreaderandconnectingittoaPC. WhenthesystemisconnectedtoaPC,itcanbepoweredbyeitherbatteryortheAC adapter.Testingislimitedtothelengthoftheserialcable.Thefinalpositioningwillbe shownonthescreen.

6 Testing and Results

Boththeaccelerometersandgyroscopesweretestedindividuallyastheiroutputs needtobeanalyzedseparatelysothatsoftwarecanbewrittentofilteroutnoiseanddrift.

45 Eachsensorwasevaluatedforoneaxisorientation,afteroneaxiswasexploredatwo dimensionalsystemwasobserved.

6.1 Test Plan

Testverificationisveryimportantbecauseitprovidesproofoffunctionalityofthe project.Amethodoftestverificationiscomparingtheidealoutcomeswithactual outcomes.Thiscanonlybedonewhenallthevariablescanbecontrolledandaknown outcomecanbedetermined.Ifthedeviceisfunctioningproperly,theactualoutcome shouldbeveryclosetotheidealoutcome. Afterthesoftwarewasvalidated,testingofthesensorscouldnowcommence. Fivedifferenttypesoftestswerecompletedinordertoensurecompletetestingofthe gyroscopeandtheaccelerometers.Theseincludedstationarytesting,rotarystagetesting, onedimensionaltestingoneachaxis,twodimensionaltesting,andadditionaltestingto comparethesensorstotheirspecifications.Multipletestshadtobetakeninorderto achieveconclusiveresults.Testingwasconsideredcompleteiftheresults,whether accurateornot,couldberepeated.

6.2 Stationary

Stationarytestingisrequiredinordertoanalyzethebiasatwhichthesensors outputwhenatrest.Analysisofthedeviationfromthebiaswouldgivesomedetailed informationonthedriftrateand/ornoiseofthesystem.Theaccelerometersare ratiometric,meaningtheoutputbiaslevelvoltageisaratiooftheinputvoltagetothe sensor.Inthiscasethebiaslevelofthesesensorsishalftheinputsoa5voltinput voltagewouldresultinabiasof2.5volts.Thegyroscopeinnotratiometrichoweverits biasaccordingtothedatasheetshouldbeataconstant2.5volts.Itisimportanttoknow whatthebiaslevelsareinordertoproperlybaseoutputvoltagesfromthem. Thestationarytestingdidnotrequireanyadditionalequipmentinordertorunthe tests.Aflatsurfaceandacomputertointerfacewithwasallthatwasneeded. Approximatelyoneminuteofdatacollection,250datapoints,wastakenforeachtest. Firstcalibrationwascompleted,thenaftertriggeringthestartbuttonthedatawas collected.Aftereachtestwascompletedthedatawasstoredforfurtheranalysis.The

46 initialsetofstationarytestswasrunmultipletimes.Howevertheoutputvalueswere wideinvariation.Attimestheteamwouldseemovementaslowas1meterduringthe oneminutetestandothertimeswewouldsee60metersofmovement.Figure26isan exampleofoneoftheinitialtestsrun.ThefinalpositionwasX=13.11262metersandY =38.8474meters.WhileexpectingX=0andY=0,thisoutputwasclearly experiencingmajornoiseand/ordrift,andwasprooftohowsensitivethesesensorsreally are.

Stationary Test 1

0.00000 -5.00000 -10.00000 -15.00000 -20.00000 -25.00000 -30.00000

Y Position (meters) Position Y -35.00000 -40.00000 -45.00000 -2.00000 0.00000 2.00000 4.00000 6.00000 8.00000 10.00000 12.00000 14.00000 X Position (meters)

Figure 26: Stationary Data in Initial Test Furtheranalysisofthetestresultswasneededinordertomakeaconclusionasto whythesensorswereexperiencingthisamountofmovement.Withvaryingstationary outputssuchasthoseinFigure26andothersthathaveshownmovementinboththe positiveandnegativeinbothaxes,nodistinctevaluationcouldbemadeexceptforthe factthattheoutputwasrandom. Duetothefactthattheunitwasnotmovedphysicallyitwasapparentthatthe outputswerecausedduetosomeerrorinthesystemthatwasunforeseen.Capacitors wereputintoplacetolimitthenoiseontheoutput.Inordertoremedytheadditional

47 noisethatthesensorswereencountering,asoftwarethresholdwasapplied.Analysisof thetestresultsconcludedthatmuchofthenoiseseenwasbetween0and0.015m/s 2.The thresholdwassetto“ignore”anyaccelerationinthisrangesotheoutputswouldnotbe affectedbythissourceoferror.Figure27showstheoutputofthesensorsafterthe thresholdwasapplied.ThefinalpositionofthistestwasX=1.09986metersandY= 1.64457meters,aresultthatwasmoreexpected.Additionaltestsusingthethreshold yieldedresultswithmuchhigheraccuracy,ourhighestaccuracyshowing(0,0)andour lowestaccuracystillshowinglessthan5metersineitheraxis.

Stationary Data With Filtering

1.80000 1.60000 1.40000 1.20000 1.00000 0.80000 0.60000

Y Position (meters) Position Y 0.40000 0.20000 0.00000 0.00000 0.20000 0.40000 0.60000 0.80000 1.00000 1.20000 X Position (meters)

Figure 27: Stationary Test with Threshold Filtering

48 Y axis Raw Data

0.02

0.015

0.01

0.005 Series1 0 0 10 20 30 40 50 60 70

Acceleration (m/s^2) Acceleration -0.005

-0.01

-0.015 Time (Sec)

Figure 28: Test 3 Y-Axis Acceleration Itwasnecessarytoexaminetherawdatafromtheaccelerometersinorderto determinewhetherthedriftthatwasnowseenevenafterfilteringwascausedfrom mechanicaldriftorcalculateddrift.Figure28isagraphoftheYaxistest3ofTable5. Almostallofthedatapointsfellwithinthethreshold,howeverthereweretwopoints duringthetestthatexceededit.Thesetwopointsresultedinthecalculateddriftinthe finalpositionbecausethesoftwareassumeditwasanappliedacceleration.Howeverit wasnotanacceleration,justaspikeinthenoise.Graphssuchasthisprovedthatthe errorseeninthesetestswasduetocalculateddrift,fromthedoubleintegrationofanoise spike.Thisisdiscussedinalatersection. Furtheranalysisrevealedanadditionalsourceoferror.Thesystem,duetoits slowsamplingrate,wasexperiencingaliasingeffects.Meaning,theanalogsignal(from thesensors)isbeingsampledimproperlysowhenitisreconstructedfromdigitalto analogwearelosingsomekeycomponentsoftheoriginalsignal.Inordertoremedythis effectthesamplingrateofthesensorsmustbeatleasttwicethefrequencyinwhichthey areoutputtingdata.Luckilythebandwidthoneachofthesensorscansimplybeadjusted byaddingadditionalcapacitorstocreatelowpassfilters.SincetheA/Dconverter samplesaround6Hzthesensorbandwidthmustbelimitedtoatmost3Hzsothenyquist criterionissatisfied.Abandwidthof1Hzwasdecidedupon.IntheADXL203data sheetatableofbandwidthsisgivenwithcorrespondingcapacitorvalues.Fora1Hz

49 bandwidtha4.7uFcapacitorisneededbetweenboththeXaxisrateoutandtheYaxis rateout.Forthegyroscopesimplecalculationsareneededtofindthecorresponding capacitorvalue.IntheADSRS150datasheetthefollowingequationisprovided:

fOUT = 1/ (2 × π × ROUT × COUT ) WithFout=1andthedatasheetstatesRout=180K thatmakesCout=.88uF.The neededcapacitorswereobtainedandplacedaccordingly. Withthenoisethresholdsetandthealiasingresolvedasetof15stationarydata collectionswascompleted.TheresultsofthesetestsaresummarizedinTable5. XFinal YFinal GyroFinal Test Position Position Degree

1 0.000 0.000 1.71477 2 0.00001 0.000 2.32843 3 0.21626 2.16446 7.51689 4 0.21407 1.89577 9.39405 5 0.02879 0.97474 2.53040 6 0.822340 2.415108 1.743650 7 0.000008 0.000 2.582086 8 0.000027 0.000001 1.669407 9 2.577790 0.157705 7.488987 10 0.000004 0.000 2.797097

11 1.197604 0.007033 5.818635 12 0.028986 4.461288 1.629695 13 4.024572 1.347391 9.156627 14 1.153845 1.583025 6.019371 15 0.000003 0.000 3.997300

Table 5: Stationary Data Collection Results

50 Theresultsconcludethatevenwiththenoisethresholdthesensorsstillseeadditional noise.Itisalsoclearthatthecalculateddriftcanoccurinanydirectiondependingon wherethenoiseexceedsthethreshold.Thusmakingitimpossibletotryandaccountfor calculateddriftpriortotesting.TheaveragecalculateddriftintheXaxisis0.684meters forthe1minutespanofdatacollectionandtheaveragecalculateddriftintheYaxisis 1.0004meters.Thatis0.0114m/sand.01667m/s,respectively. Unliketheaccelerometersthegyroneverexperienceszeromovementaccording tothetestresults.Theaveragecalculateddriftinthegyrois4.4278degreesfortheone minutetestmeaning0.0738degreespersecond.Thisiswithintherangeofthe specificationsforthegyro.Accordingtothedatasheetthegyrowilldriftlessthan.2 degrees/secwithanaccuracyof0.02degrees.Figure29showsrawoutputofthegyro whenstationary.Liketheaccelerometerthereisnoapparentdrift.Howeverduetoa spikeinthenoise,thisleadstoacalculatederrorinthepositioning.

Gyro Raw Data

0.02

0.015

0.01

0.005 Series1 0

Degrees/Sec 0 10 20 30 40 50 60 70 -0.005

-0.01

-0.015 Time (Sec)

Figure 29: Gyro Raw Data – Stationary ThegraphsbelowshowXaxis,Yaxisandgyromovementversustimeduring test5.Thisisjusttogivethereaderavisuallookintothesensoroutputsduring stationarytesting.

51 X-axis Position

0.00500 0.00000 -0.00500 0.0 10.0 20.0 30.0 40.0 50.0 60.0 70.0 -0.01000 -0.01500 Current Position -0.02000 -0.02500 X Position (meters) Position X -0.03000 -0.03500 Time (sec)

Figure 30: Stationary Test 5 X-axis vs Time

Y-axis Position

1.20000 1.00000 0.80000 0.60000 0.40000 0.20000 Y Position (meters) Position Y 0.00000 -0.20000 0.0 10.0 20.0 30.0 40.0 50.0 60.0 70.0 Time (sec)

Figure 31: Stationary Test 5 Y-axis vs Time

52 Gyro Output vs Time

3.00000 2.50000 2.00000 1.50000 1.00000 0.50000 0.00000

Gyro movement (degrees) movement Gyro -0.50000 0.0 10.0 20.0 30.0 40.0 50.0 60.0 70.0 -1.00000 Times (sec) Figure 32: Stationary Test 5 Gyro Degrees vs Time Aportionoftheerrorinfinalpositioningisduetomathematicalroundofferror duringpositioncalculations.Eventhoughtheerrorthatisroundedisminimal,whenitis integratedtwice(fromaccelerationtodisplacement)theseerrorsaccumulateinamuch largerfashion.Understandingsuchconceptsiscrucialwhenconsideringwhat applicationsthisunitmaybeusedfor.

6.3 Rotary Stage Testing

Rotarystagetestingwasneededtoensureproperfunctioningofthegyroscope. AnSR50SeriesCompactHighResolutionRotationStage(seeFigure33),manufactured byNewportCorporation,locatedintheCHSLT(CenterforHolographicStudiesand LasermicromechaTronics)labintheWPIMechanicalEngineeringdepartmentwasused forthistest.Thisstagehasanabsoluteaccuracyof.035degreesandcanrotateuptoa maximumof4degreespersecond.

53

Figure 33: SR50 Series Rotary Stage 40 Forthissetoftestswerotatedtheunitbothpositiveandnegative90degreesata rateof2degreespersecond.Wepresetthestagetomove90degreesautomaticallythen stop.Thedatawasstoredforlateranalysis.Thenthestagewasmovedanegative90 degreesandthatdatawasstored.Bothsetsoftestswereneededtoconfirmthatthegyro wascorrectlysensingpositiveandnegativerotations.InTable6asummaryofthe testingdatacanbefound. ExpectedFinal ActualFinal Test degrees degrees 1 90 88.72871 2 90 100.7575180 3 90 80.44445 4 90 96.1966220 5 90 75.95476 6 90 88.7434840 7 90 93.73247 8 90 84.2346730 9 90 85.71607 10 90 92.9918280

Table 6: Rate Table Output Summary

54 Table6displaysthefinalrotationseenafter300datapointsweretaken.Howeveron multipleteststhefinalrotationdeviatedfromthemaximumrotationexperienced.For instanceintest8thegyrodid“see”90degrees,howeveroncethestagestoppedrotating thegyrostartedtodriftbackdownto88.7degrees.Figure34showshowthegyro outputsbegintodrift.Lookingatthedatamorecloselythegyroisregisteringarotation ofapproximately2degreespersecond,therateatwhichthestageismoving,sothegyro iscorrectlysensingtherotationtowhichitisbeingsubjectedto.

90 Degree Rotation

100.0

80.0

60.0

40.0

20.0 Rotation (degrees) Rotation 0.0 0.0 10.0 20.0 30.0 40.0 50.0 60.0 70.0 -20.0 Times (sec) Figure 34: Test 8: 90 Degree Rotation Thelargestpercenterrorseenwhiletakingtherotationtestswasduringtest5, withanerrorof15.6%.Likethescenarioexplainedearlier,thistestalsodeviatedfrom themaximumdegreeofrotation.Atthetimewhenthestagestoppedthegyrohadseena rotationof81.18071degrees,makingthegyromeasurementduringrotationbewithin thespecifiedaccuracy . Figure35isagraphoftest5,RotationvsTime.Inspiteofthis alloftheotherrotarytestswerewithinthe14%error.Althoughitwouldhavebeen beneficialtoincluderotationsgreaterthan90degrees,thesystemislimitedinthe numberofdatapointsthatcanbecollectedduringasingletest.Duetothefactthatthe softwarelimitsthesizeofthedataarrays,andthespeedatwhichthestagecanrotate, additionaldegreesofrotationwereomitted.Overall,thistestwasconclusiveandweare nowconfidentthattheunitcanproperlydetectpositiveandnegativerotations.

55 -90 Degree Rotation

20.0

0.0 0.0 10.0 20.0 30.0 40.0 50.0 60.0 70.0 -20.0

-40.0

-60.0 Rotation (degrees) Rotation -80.0

-100.0 Time (sec)

Figure 35: Test 5: -90 degree rotation

6.4 One-Dimensional

Onedimensionaltestingwasneededtoensureproperdetectionofmovementon boththeXandYaxesoftheaccelerometer.Inordertocompletesuchtests,equipment fromVernierSoftwareandtechnologywasneeded.Therewerefourmainpiecesof equipmentneeded,amotiondetector,acart,atrackandcorrespondingsoftware. Themotiondetectorusesultrasoundtechnologytomeasuredistancetraveledby thecart.Thedetectorpulsesabeamofultrasound,andthetimeittakesforthepulseto hitthecartandreturntothedeviceisusedtocalculateposition.Withsuchdevices however,thepulsemayreflectoffnearbyobjectsaswell,soitwasimportanttokeep otherobjectsawayfromthetestingarea.TheunitwasplacedontoalowVernier cart.Dependingonwhichaxiswastobetestedtheunitcouldbeplacedaccordingly. ThecartwasthenplacedonaPascoScientifictrackthatmeasured227cm(atape measureonthetrackcouldbeusedforvisualmeasurements).Withthemotiondetector atoneend,thecart(andunit)couldbemovedupanddownthetracktobemeasured. VernierLabPro,LoggerProv.3.4.5softwarewasusedinconjunctionwiththe motiondetectortogivearealtimegraphoftheunitmovingupanddownthetrack. Whilepositionwasgatheredbothvelocityandaccelerationweredifferentiated,however duetotheerrorsinrounding,theaccelerationgivenbythesoftwarewassteadyaround0

56 m/s 2.Howeverthepositionofthecartwastheimportantdatatoberetrievedfromthis test. Testswerecompletedforallfourmovementoptionswiththeunit; ± Xaxis movementand ± Yaxismovement.Theteststookapproximately10seconds,so50data pointswereneededforeachtest.Table7isthecompiledresultsfromtheone dimensionaltesting. ExpectedX ActualXFinal ExpectedY ActualYFinal Test Final Position FinalPosition Position Position

1 1.05918 1.16038 0 0.31213 2 1.061928 0.58839 0 1.11700 3 0.965888 0.51752 0 0.25410 4 1.056715 1.15592 0 0.36282 5 1.171139 1.16119 0 0.13594 6 1.114339 1.14245 0 0.39100 7 1.145071 1.26142 0 0.68877 8 1.041348 1.18705 0 0.02730 9 0 0.68119 .95793 1.02471 10 0 0.24124 .941036 0.22436 11 0 2.23994 .958753 1.00174 12 0 0.60942 1.170828 1.16827 13 0 0.11610 1.280076 3.08291 14 0 1.46459 1.206811 2.17393

Table 7: 1-Dimensional Testing Results AnalysisoftheseresultsyieldsthegreatestpercenterrorintheXaxis(during movement)tobe44%duringtest3andthegreatestpercenterrorintheYaxistobe 141%duringtest13,whichisunacceptable.However,weareabletogetvalueswith only0.8%error.Itispossiblethatduringmovementtherewasvibrationofthecart leadingtosomeoftheerrors.Itisalsopossiblethatsometiltingmayhavebeen

57 experiencedleadingtothesensors“thinking”itwasacceleratingfasterthatitactually was.Theseresultsconcludethatitispossibletogetreasonablepositionwiththesensors. Errorsthatwereseenontheaxisnotundertestcouldbeduetocalculateddriftbecauseit isstationaryoritispossiblethatiftheunitwasnotplacedpreciselytoonlyprovide motiontothecurrentaxisundertestthensomemotionmayhavebeenexperiencedon boththeXandYaxes.Figure36showstheaccelerometeroutputsversustimeand Figure37showstheLoggerProsoftwareoutputs.Figure37showsthestartpositionat X=1.493285metersandthefinalpositionatX=0.322146meterswithatotaldistance movedof1.171139meters.Thetwographsshowthecorrelationbetweentheunits positioningsystemandtheLoggerPro’spositionsoftware.

X-Axis Position

0.20000 0.00000 -0.200000.00000 2.00000 4.00000 6.00000 8.00000 10.0000 12.0000 -0.40000 0 0 -0.60000 Current Position -0.80000

Positon (meters) Positon -1.00000 -1.20000 -1.40000 Time (sec)

Figure 36: Test 5 X-Axis Movement seen by Accelerometer

58

Figure 37: Position Seen by Logger Pro Software and Vernier Equipment

6.5 Two-Dimensional

Twodimensionaltestingwasdonetodeterminehowtheunitfunctionswhen thereismotioninbothaxes.Thiswasdoneusingacartwithwheels.Alaptopandthe unitwereplacedonthecartandwerethenmovedinsetdirectionsanddistances.There wereseveraldifferentteststhatweredoneontheunit. Thefirsttestconsistedofmovingtheunit0.91metersintheXdirectionand0.91 metersintheYaxissimultaneously.Fiftydatapointsweretakenforthistesttohave timebeforeandafterthemovementstoobserveiftherewasanytypeofdriftthat deviatedfromthethreshold.

59 Figure 38: Simultaneous X and Y axes movement Theunit’scalculatedfinalpositioningwas4.15metersintheXdirectionand .714metersintheYdirection.Byobservingthegraphs,theunitstayedstablebeforeany movementwasmade,thenthecomponentssensedmotioninthecorrectdirections.After theunitstoppedmoving,calculateddriftduetonoisebegantotakeover.Viewingthe rawdataaftertheunithadstoppeditwasapparentthatthenoiseexceededthethreshold, creatingfalseaccelerations.ThedrifthadaffectedtheXaxismorethantheYaxis. Beforethedrift,theYaxisobserved0.9metersofmovementwhentheactualmovement was.91meters.However,theXaxisonlyobserved.4metersandthenoisespikespulled theresultstonegativevalues.

60 Anothertestthatwasperformedwasmovingtheunitinasquare.

Figure 39: Unit Movement in 2D Testing Thistestwasdonetoseeiftheunitwouldcalculatethatithadmovedatotal displacementofzerometersinbothoftheaxes.

Figure 40: Square 2D Test Data Points

61 Insection1ofthegraphinFigure40:Square2DTestDataPoints,theunitmovesinthe Yaxisfor.91meters.TheXaxisstaysveryclosetozero.Insection2,theIMUthen movesinthepositiveXdirectionfor.91meters.Inthissection,theYaxisbeginstodrift inthepositivedirection.Insection3,theYaxismovesinthepositivedirection. However,thedriftfromsection2madethecalculationsstartfromroughly0meters insteadof.91meters.TheYaxiscalculationsdidcompute1meterofmovementinthis section.Insection4,theunitthenexperiencedaccelerationinthenegativeXdirection. Theaccelerationdetectedbytheaccelerometerwasnotasaccurateandprovidedgreater accelerationthanthereactuallyamount.Thismadethecalculationshow2.3metersin theXdirectionratherthan.91meters.Aftersection4,thenoisespikessentthe calculationsfurtherintothenegativeXdirectionandpositiveYdirection.Thefinal calculationwas9.2metersintheXdirectionand5.9metersintheYdirection. Expected Expected Actual X Y Actual Y Test X Final Final Final Position Position Final Position Position (Meters) (Meters) (Meters) (Meters) 1 0.91 -2.72564 -0.91 -2.601 2 -0.91 0.967676 0.91 1.56474 3 0.91 -4.14731 -0.91 -0.7138 4 -0.91 0.110045 -91 1.00805 5 0.91 -0.49959 -0.91 -1.0026 6 -0.91 -0.89406 0.91 0.30127 7 1.82 -3.09254 -0.91 0.92499 8 -1.82 -0.34287 0.91 4.97325 9 -0.91 -3.86579 -0.91 0.84072 10 -0.91 2.581777 0.91 -0.5911 11 0 -10.9875 0 1.52258 12 0 -5.89317 0 9.13806 Square 0 13 0 -17.814 0 1.58804 Displacement 14 0 -9.19892 0 5.86668 Table 8: 2-Dimensional Testing Results Analysisofthe2DimensionaltestingresultedinagreatestpercenterrorintheXaxis being356%fromtest3.ThegreatestpercenterrorintheYaxisis446%intest8. However,thegreatestdistancethecalculationswereoffbywasintest13fortheXaxis andtest12fortheYaxis.Thesetestswerethelongesttestrunandhadthemost

62 movement.couldhavebeentheleadingcauseforthesensorstooutput erroneousaccelerations.TheYaxiswasmuchmoreconsistentandstablecomparedto theXaxis.

6.6 Error Analysis

Afteranalyzingtheresultsfromthestationary,1D,2Dandrotarytestingitwas clearthatthereweresomesourcesoferrorcausingtheinaccuraciesofthefinaloutput. Inordertodeterminewheretheseerrorsoriginatedfromadditionalanalysishadtobe completed.Thisbroughttheteambacktothestationarydata.Initiallythethresholding providedmoreaccurateresults,however,itwashidingtheerrorinsteadofcompensating forit.Itwasalsolimitingtheresolutionofthesystem,byignoringanyactual accelerationsoccurringwithinthethresholdrange.

Y axis Raw Data

0.02

0.015

0.01

0.005 Series1 0 0 10 20 30 40 50 60 70

Acceleration (m/s^2) Acceleration -0.005

-0.01

-0.015 Time (Sec)

Figure 41: Noise Spike Outside Threshold Range Figure41isagraphshowingtheredlineswhichrepresentthethresholdboundaries.Itis noticeablethattherearetwopointsofnoisethatexceedthisboundary.Thiscausesthe systemtocalculatepositionusingfalseaccelerations.Thisleadstoinaccuratefinal positioningbecausethetwopointstransfertotwoconstantpositive.Since thresholdingwasnownolongeraviablesolution,itwasremovedfromthesoftware. Thenextpossiblesourceoferrorthatwasinvestigatedwascalibration.Forthe currentsystemsetup,calibrationiscompletedwiththeinitial50datapointstakenduring step1ofthesoftwareprocess.Thisresultsintheinitial0Gbias.Inordertodetermineif

63 thebiaswasaccurate,anewbiaswascalculatedbyaveraginganentiredatasetof stationarydata.Thiscanonlybedonewithstationarydatabecauseitisknownthatthe entiredatashouldbebasesaround0withnoaccelerations.Oncethiswasdonetherewas adifferenceinthebiasesbasedonthetwodifferentmeansofcalculatingthem.

X-axis Raw Data

X-axis Raw Data Software Cal. Calculated Bias

2.465

2.46

2.455

2.45

2.445

2.44

2.435 Output Voltage (volts)

2.43

2.425 0 10 20 30 40 50 60 70 Time (sec)

Figure 42: Bias Calibration InFigure42,thepinklineindicatesthebiascalculatedduringthesoftwareprocedureand theyellowlineindicatesthebiascalculatedbyaveragingtheentiredataset.Although theselineshaveasmalldeviationfromeachother,2.93mV,thisdifferenceleadstoa largedifferenceinfinalposition.

X-Axis Final Position

10

0 0 10 20 30 40 50 60 70 -10

-20

-30 Distance (m)

-40

-50

-60 Time (sec)

Figure 43: Final Postion with Software Calculated Bias

64 X-Axis Final Postion

1.8

1.6

1.4

1.2

1

0.8

0.6 0.4 Distance (meters) Distance 0.2

0 0 10 20 30 40 50 60 70 -0.2

-0.4 Time (sec)

Figure 44: Final Position with Averaged Data Set Bias Figure43hasafinalpositionof53.197metersandFigure44hasafinalpositionof 1.407meters.Thisprovesthataccuratecalibrationisneededinordertoobtainahigher degreeofaccuracyonthefinaloutput.Thedatashowsthatmillivoltsindeviationcause tensofmetersoffinalpositioningerror. Inordertodeterminehowoftenrecalibrationisneededtokeepacertaindegreeof accuracy,250datapointswereaveragedin50pointintervals.Indoingsotheteam hopedtoseeasteadyincreaseordecreasethatwouldallowtheteamtodetermineatwhat pointtorecalibratetobringthebiasbackto0.HoweverFigure45,Figure46andFigure 47showthatthereisnosteadyincreaseordecrease,thebiaslevelsjumpupanddown makingithardtoseeatrend.Asseeninpreviousteststhebiascandeviatefromthe actualbyapproximately3mV.Byrecalibratingevery50datapoints,approximately every8secondstheteamisabletoincreasetheaccuracyofthefinalpositionfromatest from2.31to0.136meters.Inanothertestthefinaloutputchangedfrom5.809to0.358 metersusingthesamemethod.Thisisanotherdrasticincreaseinaccuracyfromtheprior calibrationtechnique.

65 X-Axis 50 Pt Ave Bias

2.487

2.4865

2.486

2.4855

2.485 Output Bias (volts) Bias Output 2.4845

2.484

2.4835 0 1 2 3 4 5 6 Data Set (50 samples per data set)

Figure 45: 50 point Averaged Test 1 Accelerometr

X-Axis 50 Pt Ave Bias

2.484

2.4835

2.483

2.4825 Output Bias (volts) Bias Output

2.482

2.4815 0 1 2 3 4 5 6 Data Set (50 points per data set) Figure 46: 50 Point Averaged Test 2 Accelerometer

66 Gyro 50 pt Ave Bias

2.6015

2.601

2.6005

2.6 Output Bias (Volts) Bias Output

2.5995

2.599 0 1 2 3 4 5 6 Data Set (50 samples per data set) Figure 47: 50 Point Averaged Gyroscope Anothersourceoferrorcouldbethetimingintervalsatwhichthedatawasbeing taken.Theaveragetimeintervalforthesystemwas.165seconds.Thetiminginterval wasoffbyatmost1ms.Occasionally,thereweretimeswhenthesystemwouldtake.26 secondstogatherdata.Noiseinthesystemshouldbecompletelyrandomandessentially canceleachotheroutoverthebiaspoint.However,thisproducederrorswhenthesystem wascomputingtheintegralsfordisplacementandrotationbecausethetimeintervals werenotexactlythesame.Thiscausedsomenoisetolastlongerthanothersandnot canceleachotherout. WhenwritingsoftwareinC++,itisverydifficulttohavesoftwareruncodeat specifictimeintervals.Whenwritingcodeatsuchahighlevel,itiseasiertounderstand. However,thereisalackofcontrolovertheprocessing.Formoreaccuratetiming,a microcontrollerisnecessary,suchasaPIC.Whenwritingcodeinassembly,eachline ofcodecorrespondstoacertainamountofclockcycles.Thiswouldbeveryvaluableto knowbecauseeachclockcyclewillcorrespondtoaspecificamountoftime.C++does nothaveenoughcontrolovertheprocessingtogatherdataatexacttimeintervals.

67 6.7 Sensor Specification Testing

Severaltestswereruntoensurethatthesensorsfellwithinthespecificationsof AnalogDevices.Sincetheactualtestingofthesystemprovedthataccuratefinal positioningcouldnotbedetermined,itwasimportanttoverifythatthesensorswere workingcorrectly.Thisisveryimportanttodoinordertogainabetterunderstandingof thesensorsandtobeabletodetermineifthesensorsareproducingthecorrectoutputs. Besidestestingthesensorswithinthetestbed,theywerealsotestedseparatelyona breadboardusingavoltagesupply,multimeterandoscilloscopetoviewtheoutputs.This wasdonetoeliminateanyadditionalvariablethatmightaffecttheoutputs.

6.7.1 Accelerometer Zero g Bias Level

ThespecificationsoftheaccelerometerstatethattheZerogBiaslevelatasupply voltageof5Vistypically2.5Vandcanhaveamaximumof2.6Vandaminimumof 2.4V.Thistestwascompletedbygathering100samplesofdatafromeachofthe sensors.Twodifferentaccelerometersweretestedtoseethedifferencesandsimilarities betweensensors.Thedatawasthenanalyzedandtheminimum,maximumandaverage biasesweretaken.

Test 1 X-Axis Y-Axis Max 2.527 2.502 Min 2.497 2.468 Ave 2.512 2.483 Table 9: Accelerometer 1 Zero G Bias Level Test 2 X-Axis Y-Axis Max 2.502 2.498 Min 2.473 2.468 Ave 2.488 2.485 Table 10: Accelerometer 2 Zero G Bias Level Thefinalresultsofthetestsprovetheaccelerometers0Gbiaslevelsarewithin thespecifiedrange.

68 6.7.2 Accelerometer Temperature Variance

Typical Output Variance Due to Temperature

15

10

5

0 -80 -60 -40 -20 0 20 40 60 80 100 120 140 Voltage Voltage (mV) -5

-10

-15 Tempreature (°C)

Typical -0.1 mV/°C Typical +0.1 mV/°C Figure 48: Typical Output Variance due to Temperature The0gbiascanvarydependingontemperature.Thereisatypicalvarianceof ±0.1mVperdegreeCentigrade.Thegraphabovedisplaysthetypicalvariancethatcan occurwithintheoperatingrangeof50°Cto+125°C.Thetypicalvariancecanfall anywherebetweenthetwolinesatanygiventemperature.Forinstance,at120°C,there canbeavarianceofanywherebetween10mVand10mVfromtheactualoutput voltagecorrespondingtotheacceleration.However,gettingcloserto25°C(normal operatingtemperature),thevariancebecomesmuchless.

69 Maximum Output Variance Due to Temperature

100

80

60

40

20

0 -80 -60 -40 -20 0 20 40 60 80 100 120 140 -20 Voltage (mV) Voltage -40

-60

-80

-100 Temperature (°C)

Max -0.8 mV/°C Max +0.8 mV/°C Figure 49: Maximum Output Variance due to Temperature Theabovegraphdisplaysthemaximumvarianceduetotemperature.Itis±0.8 mVperdegreeCentigrade.Withoutameanstocontrolthetemperaturesurroundingthe sensors,thisgraphdisplaysthevariancethatcouldbeexperiencedbytheoutputofthe accelerometersduetotemperature.

6.7.3 Accelerometer Sensitivity

Atasupplyvoltageof5V,thespecificationsarethattheaccelerometerwilloutput between960and1040mVpergexperienced.Thetypicalvalueis1000mVperg.This testconsistedoftakingdataforthe0gbias,1gand+1g.Gatheringdataforthe1g and+1gwasaccomplishedbytiltingthesensortoviewitsmaximumandminimum values.Sincethesensorisparallelwithgravity,thesensorwillexperiencetheforceof gravity,or±1g,dependingonwhichsideoftheaxisisdownwards. 1 g Testing Accelerometer 1 X-Axis Y-Axis -1g 3.49 1.46 0g 2.49 2.45 +1g 1.5 3.44 Table 11: Accelerometer 1, Sensitivity Test

70 1 g Testing Accelerometer 2 X-Axis Y-Axis -1g 1.48 1.47 0g 2.48 2.51 +1g 3.48 3.45 Table 12: Accelerometer 2 Sensitivity Test Aftercompletingthetestonbothaccelerometers,alloftheresultsfellwithinthe specificationsofthesensorsexceptfortheYAxisaccelerometerat+1g.Therangeis ±40mVfromthebiasplus1V(1V=+1g).Thissensorwas60mVawayfromthe actualvalue,being3.45V.Thiserrorcouldpossiblybeduetomisalignmentoftheaxis duringmanufacturingortemperatureoffset.

6.7.4 Gyroscope Zero Rotation Null Value

Thenullvalueforthegyroscopeisthevalueatwhichthegyroscopeoutputszero rotation.Thetypicalvalueforthissensoris2.5V.Thesensorthatwasusedforthis systemhadanullvoltageof2.57V.Thisnullvaluecanbeadjustedbyaddingresistors frompin3ofthegyroscopeevaluationboardtogroundorthevoltagesource.When connectingtoground,thenullvoltageincreases.Thevoltagedecreaseswhenconnecting tothevoltagesource.Theresistorvalueneededcanbefoundbyusingthefollowing equation:

RNULL =(2.5×180,000)/(V NULL0 –V NULL1 ) VNULL0 isthezerorotationoutputwithoutanyadjustments.VNULL1 isthedesirednull voltageofthesensor.Typicalvaluesforthenullvoltageresistorfallbetween1Mand

5M.Inorderforthesensorofthesystemtooutput2.5V,acalculatedRNULL valueof 6.1Misrequired.Thiswasdonetothesystemtoproduceazerorotationbiasof2.5V.

6.7.5 Gyroscope Sensitivity

Thesensitivityofthegyroscopeisdescribedbytheamountofmillivoltsthat correspondtoonedegreepersecond.Thissensorhasatypicalsensitivityof12.5 mV/°/s.However,thiscanvarybetween11.25to13.25mV/°/s.Fromthegyroscope

71 testswiththerotarystage,thesensitivitywasdetermined.Therotarystagerotatedata constant2°/s.

1°/s Sensitivity Test Zero Rotation Bias: 2.603519 V -2°/s output: 2.580146 V Difference: .023374 V -1°/s = .023374/2 = 11.687 mV/°/s Table 13: Gyroscope Sensitivity Testing Thesensitivityofthesensorinthesystemis11.687mV/°/s.Thisisslightlylowerthan thetypicalvalue,butitfallswithintherangeofminimumandmaximumvalues.

6.7.6 Gyroscope Temperature Variance

Thezerorotationbiasofthegyroscopecanvarydependingonthetemperatureof thesensor.Thereisatemperatureoutputonthegyroscopethatoutputsvoltagesthat correspondtotemperatures.Itoutputs2.5Vat27°Candhasaproportionalcharacteristic of8.4mV/°C.BelowisachartofatestfromAnalogDevicesthatmonitorstheoutput biasvoltagesatthefullrangeoftemperaturesthatthesensorcanfunctionallyoperatein.

Figure 50: Gyro Output v Temperature 41 Byusinga3pointcalibrationtechniqueonthenullandsensitivitydrift,Analog Devicesstatesthatthesensorcanachieveanoverallaccuracyof300°/hour.However, withahigherdegreeofcalibration,anaccuracyof70°/hourcanbeachieved.

72 6.7.7 Gyroscope Self Test Response

Theselftestpinsassurefunctionalityofthesensor.Therearetwoselftestpinson thegyroscope,ST1andST2.Whenapplyingalogic1toST1,theoutputvoltageofthe sensorshouldtypicallydrop660mV.Itcanrangefrom400to1000mV.When applyingalogic1toST2,thevoltageshouldincreasebythesameamountandhavethe samerange.Alogic1isdefinedasaminimumof3.3Vandalogic0isamaximumof 1.7V.Thefollowingtableshowstheresultsofthistest:

Self Test 1 Logic Low: 2.57 V Logic High: 1.87 V Difference: -.7 V Self Test 2 Logic Low: 2.57 V Logic High: 3.35 V Difference: .78 V Table 14: Gyroscope Self Test Selftest1producedachangeof.7Vandselftest2producedachangeof.78V.Bothof thesevaluesfallwithinthespecificationsofthesensor.

7 Conclusions

Thesetestsconcludethatthesesensorsalthoughtheydoperformaccordingto mostoftheirspecifications,arenotabletoproduceaccurateresultsinaninertial navigationsystem.Amoreaccuratemethodfordeterminingthebiasofthesensorsis needed.Thiswouldleadtomoreaccuratepositioningsincethesystemwouldbeableto determinewhetheraccelerationispositiveornegativebasedonaprecisebias.Amethod fordeterminingwhenthesystemisstationarywouldalsobeextremelyuseful.Withthe highnoisethatiscurrentlybeingmeasureditisdifficultforthesystemtoconcludewhen itisstationary.Onemethodtodeterminezeromovementisthroughuserintervention. Whentheuserknowsthesystemisstationarytheycouldpressabuttonalertingthe systemtorecalibrate. Duringtheone–dimensionaltestingthefinalpositioningvariedfromlessthan 1%errortowellover100%.Itisimpossibletotellwhenitissensingmovement

73 correctlyuntilafterthedataisanalyzed.Fromthereitispossibletodetectwhatisnoise versuswhataccelerationis.Twodimensionaltestingprovidedadditionalinsightwitha combinationofallthesensorsworkingtogether.Resultsfromthe2Dtestingexhibiteda largerrangeoferrorfromthepriortests.Thiscouldbeduetomoreshockandvibrations frommultiplechangesindirection.Thiswouldcausetheaccelerometerandgyroscope tooutputincorrectvalues. Thenoiseinthesignalsisimpossibletocompensateforwithoutlosingresolution inthesensors.Thenoiseiscompletelyrandomitcanbebothpositiveandnegativeand variesinmagnitude.Eachsensorhastheirowncharacteristicswhichmakeitvery difficulttodeterminetrends.TheaccelerometerhaddifferentcharacteristicswithintheX andYaxes.Withthisnoise,calculateddriftisimpossibletoovercomewithoutbeing abletodistinguishbetweennoiseandtheactualsignal.Noisereductionisneededforthe sensorstobemorereliable.Kalmanfilteringisamethodthatcouldbeusedto compensateforthenoiseinasystem.Thistypeoffilteringisverycomplexand constantlyadjuststoprovideaccurateinformationonthepositioningofthesystem. Anothermethodtoaccountfornoiseishavingredundantsensors.Withadditional sensors,ifoneofsensorshasaspikeontheoutput,buttheothersdidnot,thespikecan bedisregarded.Otherfilteringcanincreaseaccuracyinthesystem.Whentheproject firststarted,a4pointmovingaveragerwasimplemented.However,duetothelimited samplingrate,theaveragerwasattenuatingtheappliedaccelerationsmorethanitwas attenuatingthenoise.Thiswastakenoutoftheprogramsequenceforthatreason.With anincreasedsamplingrate,thistypeoffilteringcanbeimplementedwithgreaterbenefits toreducingnoiseinthesystem. WiththecurrenttechnologyinMEMsaccelerometersandgyroscopes,itis impossibletocreateaninertialnavigationunitsolelydependantonthesesensors.The accuracyneededbyafirefighterlocationdeviceismuchsmallerthantheamountthatthe currentsensorscanproduce.Theycanbeusedinconjunctionwithdifferenttechnologies suchasGPSordigitalcompasses. ForfutureanalysisoftheMEMssensors,itwouldrequireaprocessorthatcan gatherdataatafasterrate.Currentlytakingdataat6samplespersecondisnotfast enoughtodomuchfilteringtodistinguishbetweennoiseandactualsensorinformation.

74 The10bitresolutionoftheanalogtodigitalconverterswasalimitingfactorbecauseit didnotprovideenoughresolutiontoseesmallamountsofdrift.Withahigherbit resolution,therewillbelessroundofferrorwhenconvertingtheanalogsignalintoa digitalform.SincethedatawasbeingstoredinanarrayinC++,therewasalimittohow manydatapointscouldbesampled.Inordertomonitordrift,thesystemneedstobeable togatherdataforatleast15minutestoseetheoverallcharacteristicsofdrift. Acurrentmethodofreducingtheeffectsofdriftistorecalibrateoften.Thisisa difficulttechniquetoimplementbecausethesystemmustbestationarytorecalibrate.It isnotpossibletorelyonthesystemtoknowwhenitisstationary.Althoughtheideais simple,theimplementationisnot.Thermaldriftinthegyroscopecanbediminishedif outputsfromthetemperaturesensorareused.Withatemperaturesensoralready installedonthegyroscope,themeanstodetecttemperaturefluctuationsisalready possible.However,asnotedearlierbyrecalibratingafterapproximately8secondsa higheraccuracyoffinalpositioniscalculated. ThisprojectprovidedagreatintroductiontotheuseoflowcostMEMs technologyininertialnavigation.Thefinaldeliverablesincludeaninertialmeasurement unitthatusesatwoaxisaccelerometerandagyroscope.Thesystemiscapableofstoring thedatafromthesensorsandprocessingittocalculatethefinalpositioning.Itwasalso designedtobecompatiblewithanyaccelerometerandgyroscopewithananalogoutput. Althoughtheaccuracywaslessthanidealduetoreasonsexplainedearlier,thisproject wasbeneficialtogaininsightintothedevelopingMEMstechnology.

75 8 References

1U.S.FireAdministrationhttp://www.usfa.dhs.gov/statistics/quickstats/ 2" navigation ."EncyclopediaBritannica2006.EncyclopediaBritannicaOnline.17Sep.2006 http://search.eb.com/eb/article61195 3AndrewsSpaceandTechnology. http://www.spaceandtech.com/spacedata/constellations/navstar gps_consum.shtml 20Sep.2006 4Stansell,ThomasA.Jr.“GPSModernization”inAccessScience@McGrawHill, http://www.accessscience.com ,18Sep.2006 5Shuurman,Nadine.GIScienceatSFU. http://www.sfu.ca/gis/bguide/icons/Fig3_1_GPS.gif 21Sep.2006 6" navigation."EncyclopediaBritannica2006.EncyclopediaBritannicaOnline.17Sep.2006 http://search.eb.com/eb/article61195 http://search.eb.com/eb/article61165 7Kallahar“ResourcesforGPSGuidedRobots,”Gpsbots.com1Oct.2006 8Moody,AltonB.“DeadReckoning”inAccessScience@McGrawHill, http://www.accessscience.com ,18 Sep.2006 9IntelCorporationhttp://www.intel.com/technology/comms/uwb/ 10 Heller,Arnie.“ExploringtheUltraWideband” http://www.llnl.gov/str/September04/Azevedo.html 11 Heller,Arnie“ExploringtheUltraWideband” http://www.llnl.gov/str/September04/Azevedo.html 12 Nekoogar,Faranak“IntroductiontoUltraWidebandCommunication” http://www.phptr.com/articles/article.asp?p=433381&seqNum=5&rl=1 13 Solenoidhttp://resources.schoolscience.co.uk/CDA/1114/physics/copch33pg2.html 14 DirectionalAntennahttp://en.wikipedia.org/wiki/Directional_antenna 15 Howell,WilliamE.“InertialGuidanceSystem”inAccessScience@McGrawHill, http://www.accessscience.com ,18Sep.2006 16 Luethi,Peter.ThomasMoser“LowCostInertialNavigationSystem” http://www.electronic engineering.ch/study/ins/ins.html 17Sep.2006 17 AnalogDevices. http://www.analog.com/en/subCat/0,2879,764%255F800%255F0%255F%255F0%255F,00.html 18Sep 2006 18 “Gyroscope”( http://www.answers.com/topic/gyroscope )19Sep.2006 19 Barbour,Neil.“Gyroscope””inAccessScience@McGrawHill, http://www.accessscience.com ,18Sep. 2006 20 http://hyperphysics.phyastr.gsu.edu/HBASE/imgmec/gyro.gif 23Sep.2006 21 Barbour,Neil.“Gyroscope””inAccessScience@McGrawHill, http://www.accessscience.com ,18Sep. 2006 22 Barbour,Neil.“Gyroscope”inAccessScience@McGrawHill, http://www.accessscience.com ,18Sep. 2006 23 Barbour,Neil.“Gyroscope”inAccessScience@McGrawHill, http://www.accessscience.com ,18Sep. 2006 24 Barbour,Neil.“Gyroscope”inAccessScience@McGrawHill, http://www.accessscience.com ,18Sep. 2006 25 “ MEMSGyroscopesMakingStridesinReplacingEntrenchedTechnologies” http://www.instat.com/press.asp?ID=827&sku=IN030884EA 25Sep.2006 26 Mclellan,J.Mac.“LowCostSolidStateGyroApproved” http://www.flyingmag.com/article.asp?section_id=17&article_id=265 23Sep.2006 27 Green,John,DavidKrakauer.“NewiMEMsAngularRateSensingGyroscope” http://www.analog.com/library/analogdialogue/archives/3703/gyro.html 20Sep.2006 28 Green,John,DavidKrakauer.“NewiMEMsAngularRateSensingGyroscope” http://www.analog.com/library/analogdialogue/archives/3703/gyro.html 20Sep.2006 http://www.analog.com/library/analogdialogue/archives/3703/gyro.html 29 “ADXRS150” http://www.analog.com/UploadedFiles/Data_Sheets/ADXRS150.pdf

76 30 “iMEMSGyroscopes” http://www.analog.com/en/subCat/0,2879,764%255F801%255F0%255F%255F0%255F,00.html 27Sep. 2006 31 Korvink,JanG&OliverPaul.“MEMS–apracticalguidetodesign,analysisandapplications.”William AndrewInc.2006.Pg.17 32 http://www.Gumstix.com/about.html 33 Swett,Sam.“DigitalCameralMemoryCards” http://plex.us/outbursts/dc_memory.html 1Oct.2006 34 “NotSureWhichMemoryYouNeed?” http://www.crucial.com/index.asp 1Oct.2006 35 “ADXL103/ADXL203”http://www.analog.com/UploadedFiles/Data_Sheets/ADXL103_203.pdf 36 “ADXL103/ADXL203”http://www.analog.com/UploadedFiles/Data_Sheets/ADXL103_203.pdf 37 “ADXL203EB” http://www.analog.com/UploadedFiles/Evaluation_Boards_Tools/535395787ADXL203EB_0.pdf 38 “ADXRS150” http://www.analog.com/UploadedFiles/Data_Sheets/ADXRS150.pdf 39 “ADXRS150EB” http://www.analog.com/UploadedFiles/Evaluation_Boards/Tools/9303074ADXRS150EB_0.pdf 40 “SR50SeriesCompactHighResolutionRotationStages” http://www.newport.com/store/genproduct.aspx?id=140164&lang=1033&Section=Spec 14Feb.2007 41 http://www.analog.com/UploadedFiles/Data_Sheets/ADXRS150.pdf 16April.2007

77 Appendix A: ADXRS150 Specifications

78 Appendix B: ADXL203 Specifications

79