Você está na página 1de 87

Realtimeanalysisofultrasonicrodent vocalizationsonwearablesensornodes

Diplomarbeit derFakulttfrBiologie

derEberhard

Karls Universitt Tbingen

vorgelegtvon

Schwedhelm,Philipp
Tbingen,April2010

Erklrung: Hiermiterklreich,dassichdieseArbeitselbstverfasstundkeineanderenals dieangegebenenQuellenundHilfsmittelbenutzthabe.

Tbingen,den29.April2010

FrmeineEltern

Zusammenfassung
Die Freilandbeobachtung von Tieren erfordert Observationstechniken, die das zu beobachtende Tier weder im eigenen, noch im gruppendynamischen Verhalten beeinflussen. Im Fall von kleinen oder schwer zu erreichenden Tieren wird eine BeobachtungdesVerhaltenszustzlichdadurcherschwert,dassnurwenigeoderkeine etabliertenTechnikenfrsolcheObservationenzurVerfgungstehen.Trotzdemistesin vielenFllenangebracht,ErgebnisseausLaborstudiendurchBeobachtungenimFreiland zubesttigen. In dieser Arbeit geht es um den Bau eines Sensors, der Ultraschallvokalisationen aufnimmt, auswertet und klassifiziert. Das System dient dazu, unterirdisch lebende Nagetiere in ihrer natrlichen Umgebung zu beobachten, ohne einen mageblichen EinflussaufdasnatrlicheVerhaltenderTiereauszuben.HierfrwirdjedesTiermit einemeigenen,tragbarenSensorausgestattetwerden. Diese Arbeit ist Teil des Ratpack Projekts, welches auf die Konstruktion eines SensornetzwerkesausautonomenSensorknotenzurObservationvonRattenundanderen Nagernabzielt.AuerdenVokalisationenwerdenauchandereVerhaltensparameter,wie Bewegung, soziale Interaktion und diverse Krperfunktionen aufgenommen, die eine mglichstlckenloseberwachungderTiereermglichen.MittelssolcherDatenknnten unter Anderem etablierte Theorien ber das bereits sehr gut untersuchte und in der ForschungumfassendgenutzteLabortier Rattusnorvegicus berprftwerden,etwasdas mitdenkonventionellenTechnikenbishernichtmglichwar. Der Ansatz zur Beobachtung von Tieren mittels kleiner, tragbarer Sensoren ist aber keinesfallsaufdenEinsatzbeiunterirdischlebendenNagetierenbeschrnkt.Vielmehrist eineErweiterungfrandereArtenvonterrestrischenLebewesen,undsogarluftlebenden odermarinenArtendurchausdenkbar. Im Verlauf dieser Arbeit werde ich anhand dem Modellorganismus Ratte erlutern, welcheSchwierigkeitenundHerausforderungenhinsichtlichdesDesignseinestragbaren SensorsdurchdieLebensweisederTiereentstehen.IchwerdeeineneuartigeTechnikzur Vokalisationsanalyseprsentieren,diedengegebenenAnforderungenentsprichtunddiein einemPrototypdesSensorsrealisiertwurde.NachdemderAufbaudiesesPrototypsgenau beschriebenwurde,wirddurcheinExperimentgezeigt,dassdastragbareSystemineiner LaborumgebungfunktioniertundvielversprechendeErgebnisseerzeugt.

TableofContents
1Introduction
1.1TheRatpackproject.................................................................................2 1.2Wildratbehavior....................................................................................4 1.2.1BurrowSystemsandHomerangeSize.............................................4 1.2.2ColonyOrganization........................................................................6 1.2.3Reproduction....................................................................................7 1.3Vocalizationsofthelaboratoryrat..........................................................9 1.3.1Vocalizationsinamatingcontext...................................................11

2Designofthesensor
2.1Introduction...........................................................................................13 2.2Zerocrossinganalysis...........................................................................15 2.2.1StochasticResonance.....................................................................16 2.3Hardware...............................................................................................18 2.3.1MicrophoneandAnalogFilter.......................................................18 2.3.2Digitalprocessingcircuit...............................................................21 2.3.3MicrocontrollerandPowerSupply................................................25 2.4Software................................................................................................27 2.4.1TheMicrocontrollerSoftware........................................................27 2.4.2StorageandTransmissionofdatasets.............................................31 2.4.3TheReceiverSoftware...................................................................32 2.5Fasteningjacketforrats........................................................................33

3Experiment
3.1Introduction...........................................................................................35 3.2MaterialandMethods...........................................................................36 3.2.1Subjects..........................................................................................36 3.2.2Apparatus......................................................................................36 3.2.3Procedure.......................................................................................37 3.2.4Dataanalysis..................................................................................38 3.3Results..................................................................................................40 3.3.1LongCall.......................................................................................41 3.3.2ShortCall.......................................................................................42
ii

3.3.3Scream...........................................................................................44 3.3.430kHzCall...................................................................................45 3.3.5StepCall........................................................................................46 3.3.6HighFrequencyCall......................................................................47 3.3.7Classificationofthereferencerecordings......................................48 3.3.8Classificationofthesensorrecordings...........................................51 3.4Discussion.............................................................................................54 3.4.1Recordedvocalizations..................................................................54 3.4.2Jacket.............................................................................................55 3.4.3Sensorperformance.......................................................................56

4GeneralDiscussion
4.1Adaptabilityofthesystemtonaturalenvironments..............................59 4.2Thelaststeptowardsanautonomoussensornode.................................61 4.3Conclusion............................................................................................62

5References 6Acknowledgments 7Supplement


7.1CDwithprogramcode..........................................................................70 7.2KnowlesFG23329C05frequencyresponsecurve...............................71 7.3Developmentoftheanalogfilter...........................................................72

iii

Chapter1.Introduction

1 Introduction

AspartofthelargerprojectRatpack,thenovelmethoddescribedinthisthesisextends the telemetryapproachofRatpackbythepossibilitytoobservevocalizationbehavior usingaveryenergyefficient,yetpowerfultechnique.Theenvisionedsensornodesare designedforrodentswhosesubterraneanhabitataggravatesanynoninvasiveobservation toaverylargeextent.Thereforestandardproceduresofvocalizationanalysis,inparticular theuseofFFT1,hadtobealteredinordertosucceedinthetaskoftaggingasmalland freelymovinganimalwithatinysensor.Theproposedsolutioncouldnotonlybeusedto monitor the vocalization behavior of subterranean rodents, but also of other small animals,includingthosewithaerialormarinehabitats. Thiswork'ssensorisoptimizedforusewithrats(Rattusnorvegicus)whosevocalization behaviorwasalreadystudiedinnumerouslaboratoryexperiments.Nonetheless,littleis actuallyknownaboutthebehaviorofthesesanimalsinthewild,particularlywheninside theirburrowsystem.Furthermore,thegenus Rattus hasatleast53differentmembers (WilsonandReeder,1993),soitremainsunclearifthefindingsfromRattusnorvegicus canbegeneralizedtorelatedspecies.Onepossibleapplicationforthemethoddescribed herewouldthusbeacomparativestudyofspeciesinRattus.However,whenIrefertothe ratinthefollowing,thedomesticatedlaboratorystrainsofRattusnorvegicusaremeant, ifnotstatedotherwise. Inthiswork,Iwilllinkthebehaviorofwildratslivingintheirnaturalhabitattothe challengesthatarisebyconstructingamobilesensorthatobstructsthetaggedanimalas littleaspossible.Iwillprovidereasonsandsolutionsforthedesignconstraintsofthe mentioned system as well as a comprehensive discussion of the built sensor node. Moreover,anexperimentconductedwithratswilldemonstratethatthesystemworksina laboratoryenvironmentandproducespromisingresults.

1 FastFourierTransform

Realtimeanalysisofultrasonicrodentvocalizationsonwearablesensornodes

1.1 TheRatpackproject
The Ratpack project aims at constructing a dynamic, wireless sensor network for observationofsubterraneanlivingrodents.ItisacollaborativeworkoftheUniversityof TbingenDepartmentofZoologyandtheRheinischWestflischeTechnischeHochschule Aachen (RWTH),DistributedSystems Group.Workis dividedintofoursubprojects: burrowreconstructionthroughstepdetectionanddeadreckoning(Zei,2009;Fabritius, 2009;Schulte,2010),realtimevocalizationanalysis(thiswork),hardwaredevelopment (Bretgeld,2010;Bitschet.al.2010;thiswork)andnetworkdesignfordatatransmission (Viol,2009;Baum2009;Wu,2010;Thieleet.al.,inprint).

Figure 1.1 : Earlyversionofaratpacksensornode mountedonaNorwayRat(Osechaset.al.,2008)

Aswillbedescribedinchapter1.2.1and1.2.2,wildratsliveinlargesubterraneanburrow systems,ascenariothatwassofarinaccessibleforstandarddataloggingortelemetry setups. Previous studies about layout and function of rat burrows always included excavationoftheratburrow(Calhoun,1963;Boice,1977),makingitaveryinvasive techniqueforratobservation.Conclusionsaboutthebehavioroftheburrowoccupying animalswasdrawnbyanalyzingdefecationspots,fooddistribution,andnesttypesofthe excavatedburrows.Itisclearthatthisproceduralmethoddoesnotprovidethepossibility foranindepthanalysisofwildratbehaviorasitoccursinsideaburrowsystem.Yet,it seemscruciallyimportanttoconfirmthenumerouslaboratorystudiesaboutthebehavior oftheNorwayRatbyconductingfieldinvestigationsofwildratbehavior.This,however, hasnotbeenpossiblesofar. Standard techniques for wireless animal observations do not often allow for behavior analysis,astheysolelyrecordthepositionofthetag.Classicradiotelemetrylocatesthe

Chapter1.Introduction

taggedanimalbygeometrictrilaterationofanactivelysendingradiotagwhosesignalis pickedupbyseveralreceiverssimultaneously.Inthecaseoffreelymovinganimalsthe useofmobilereceiversiscomplicatedbecauseitcarriesalonggreatpersonalcosts(Kays and Wikelski,2007).Furthermore,theobservationofsubterraneananimalsrequiresa very powerful, andthereforelarge and heavy,sender,something that seems generally incompatiblewithsmallrodents. Another wayoflocatingtaggedanimals is theuseofRadio FrequencyIdentification (RFID).RFIDdoesnotuseactivetransmitters,butverysmall,passivemodules,whoseID canbereadoutbybasestations,whenevertheanimalisinrange(Thiele,2006).Evenif operatingdistancesaresmall,thistechniquecouldbeusedtorecordtheanimals'passage ofspecificlocations,forexampleaburrowentrance.However,widerknowledgeaboutthe behaviorofanimalsinsideaburrowsystemcanhardlybeobtainedusingthismethod. Adataloggercollectssamplesoveraspecifictimeandstoresthemlocallyuntilitis retrievedbytheexperimenter.Normally,thereisnodatatransmissionofanykindand samplesarenotavailableforanalysisuntilthedeviceisfoundafterithasfallenoffthe tagged animal (Johnson et. al. 2003). For animals living in a subterranean habitat, problemsarisingthroughtheretrievalofthedataloggerareevenmoresevere,because neithersatellitedata(Weimerskirchet.al.,2002)northemobilephonenetworkscanbe expectedtoworkreliablyunderground. TheRatpackprojecttriestoestablishanewframeworkofdataaggregation,combining ideasoftelemetryandloggingsystems.Thesystemshouldbeabletorecordandstore dataofvariouskinds,likeadatalogger,butshouldalsotransmitpreprocessedsamples throughawirelesssensornetwork.Asalreadystatedabove,insideaburrowsystemno constantnetworkconnectivitycanbeexpected,thusnecessitatinganovelwayofdata transmission.Weusedelaytolerantnetworkswheresinglesensornodesmayhavesparse networkconnectivity(Thieleet.al.,inpress).Datacanthenberoutedoverseveralsensor nodesuntilitreachesastationaryaccesspoint.Ifnorouteisfound,samplescanalsobe storedforalimitedtime. Uponcompletion,wehopethat,forthefirsttime,alldevelopedtechniquesoftheRatpack projectwillenableustononinvasivelyobservewildratbehaviorinsidetheirburrow system.

Realtimeanalysisofultrasonicrodentvocalizationsonwearablesensornodes

1.2 Wildratbehavior
1.2.1 BurrowSystemsandHomerangeSize
Most group members of a rat colony, with the exception of old males, engage in burrowing.Thereisnosexdifference,butBoice(1977)foundthatratsofabout90110 daysofagedigwiththemostvigor.Apartfromthat,pregnancyappearstobelinkedto burrowing,sinceCalhoun(1963)describedhighlevelsofburrowingbehaviorinpregnant rats.Thesameanimalsalsopluggedtheentrancewaystotheirburrowsoncetheirlitters wereborn.Ifaburrowisconstructed,itisnormallydugbyasingleanimalorasmall groupofindividuals.Overtimesingleburrowscanbeinterconnectedorextended,thus forming much larger systems with many entrances, chambers, and tunnels (Calhoun, 1963).Theycanthenbesharedbyuptosixreceptivefemales.Furthermore,diggingnever stopsandaburrowconstantlychangesbecausenewtunnelsaredugwhileotherparts collapse.TheinitialsegmentsofburrowsexcavatedbyBoice(1977)hadameandepthof 35.5cm,atotaltunnellengthofaround3m,wheretunnelshadameandiameterof7.3 cm.Atypicalinitialburrowcanbeseeninfigure1.2.Theseprototypeburrowsareoften dugbypregnantfemalestonesttheiroffspringin12nestchamberspersystem.Some burrowsshowagreatdealofsophisticationbyhavingmultiplelevelswithmanychambers andcircularconnectionsbetweenthem. Thetunnelsofaburrowarenarrowcomparedtothesizeofarat.Whendug,thenewly constructedtunnel'sdiameterislinkedtothesizeofthediggingrat,notallowingforeasy passageofamuchbiggerconspecific.Ifanimalsmeetinsideatunnel,nopassageof eitherapproacherispossibleunlessonegoesbackwards.Itisthereforebelievedthatthere must be a great deal of communication between individual animals to coordinate movementswhenmanyanimalslivetogetherinthesameburrowsystem.Togetherwith thewhiskersystemthatgivesratsprecisetactilesensations,theirultrasoniccallscould roundoffthesolutiontowardsaneffectivecommunication. Boice(1977)raisedbothwildandalbinoratsinacontrolledoutdoorenvironmenttostudy theirburrowingandreproductivebehavior.Hefoundthatdomesticatedratsandwildrats build similar burrow systems in the controlled setup, suggesting that the behavior of burrowconstructionhasastronggeneticbasis.Calhoun(1962a,1962b,1963)studiedonly coloniesofwildratsanditwasunclearwhetherhisfindingscouldbegeneralizedtothose strainsthatlivedinlaboratorycagesforhundredsofgenerations.

Chapter1.Introduction

Ratsareterritorialanimals,buttherelationshipofterritorywithhomerangecanonlybe hypothesized. A good and simple definition of territory was given by Noble (1939): territoryisanydefendedarea.Territories,whichshouldnotbeconfusedwithhome range,arethusoccupiedbyindividualsandthendefendedbyanymeansnecessary.For femaleratstheterritoryisprobablylimitedtothenestortheburrow,formaleratsthe question about territory range remains unanswered, since they only show territorial behaviorwhenlivinginrelativelysmallpopulations(Calhoun,1962a).Thehomerange, theareatraversedbytheindividualinitsnormalactivitiesoffoodgathering,mating,and caringforyoung(Burt,1943),canbemeasuredthroughrepeatedcaptureofindividual animals,orbythedistributionofcoloreddungwhenadyedbaitisfed(Davisetal.,1948). Becausemovementofratsisprimarilyduetoforagingbehaviorthatis:gettingfood, waterornestmaterialhomerangesdependonthehabitatandthustheavailabilityof thoseitems.HartleyandBishop(1979)reportedahomerangeradiusbetween54.8and 66.1m(ca.943413727m2)inruralpopulationsontwofarmsinMidWales,while Stroud(1982)measuredahomerangesizeofonly0.24ha(2400m2)inanoncommensal populationlivinginariparianhabitat.

Figure 1.2 : Layoutofatypicalburrowsystemasdescribedby Boice(1977).Itwasconstructedintendaysbyasingle individual.Fmeansfoodwasstoredinthatspot,defecationis notedbytheletterd.

Realtimeanalysisofultrasonicrodentvocalizationsonwearablesensornodes

1.2.2 ColonyOrganization
WildNorwayRatsexistinlargeanddenselycrowdedpopulations,wherepopulationsize islimitedbytheavailabilityoffoodandwater,lackofshelter,predators,pathogens,and negative social interactions. Colony sizes grow in a logistic fashion, meaning that breedingcanbeataveryhighrateuntilitslowlydecreasesandthencomestoanend whenthemaximumpopulationsizeisreached(Whishaw&Kolb,2005).Thenumberof animalsbelongingtoonecolonycanreachfromafewtoseveralhundredindividuals, dependingonthehabitat.Calhoun(1962a)hypothesizedasocialpathologyinratswhen livingintoodenselycrowdedpopulations.Hispopulationofratslivinginacontrolled outdoorenclosurestabilizedataround0.15individualspersquaremeter.Inatruenatural environment,populationdensitieswouldbemuchlower. Relationships between members of a colony are mediated by social interactions of conspecifics.Ratshaveastronghierarchicalordertoeachother,wheretypicallyAlpha, BetaandOmegagroupsaredescribedformales.Alphamalesaretypicallythebiggest, strongestandmostdominantanimalswhileBetamalesarestillbigandstrongbutalways givewaytotheAlphamales.Omegamalesaremostweakandtheycanevendieof starvationwhenthereisnotenoughfoodleftoverfrommembersofothergroups(Barnett, 1963). Females and members of a hierarchical group set up further hierarchies by engagingindominancefights.Fightingbehavioroftenbeginswithboxing,whereboth fightinganimalsfaceeachotherwhilestandingontheirbacklimbs.Eventhoughthis postureoccursduringclashes,itisanonviolentthreat(Barnett,1963).Onlywhenthe conflictisnotsolvedbyanescapeorsubmissionofeithercompetitorsdotheyengagein fighting,whichisdefinedbytheoccurrenceofanattackbite.Afightcanalsoinclude comprisingpursuit,sidewaysthreatandaggressivepostures,whichareloopedbehavioral elementsofanaggressivebout(Whishaw&Kolb,2005). Fighting and other behavioral patterns are most often accompanied by ultrasonic vocalizations(Sales1972a),whichalsoinfluencethebehaviortoalargedegree(Sales, 1972b; Lore et. al., 1976; Barfield and Thomas, 1986). To which extent this communicationinfluencescolonystabilizationandsocialinteractionsbetweenmembers ofalargegroupofratshasyettobeinvestigatedindepth.

Chapter1.Introduction

1.2.3 Reproduction
During its 4to5dayestrous cycle, the female rat secretes progesterone among other hormones, determining the interval that the female is in heat. During this time copulatorybehaviorbetweenmaleandfemalecanbeobservedandisoftendescribedin termsofmountbouts.Amountboutisacloselyspacedclusterofthemalesattemptto mountthefemale,separatedbyperiodsfreeofmountingattempts.Itoftenstartswiththe femaletryingtogetthemaletopursuither.Shedoesthisbywigglingherears,hopping, dartingandrunningawayfromthemale(Erskine,1989).Inlargecoloniesitcanalsobe observed that females try to disturb pursuing males when a competing female is in pursuit. Calhoun (1963) described a change from a polyandric mating system to a polygyandricsystemwhenpopulationdensitiesbecomelarge.Hehypothesizedthatthis seeminglystressfulsituationforfemalesresultsinadecreaseoffertilizationrate,thusa stabilizationofpopulationsizethroughlessoffspring. In a pairofanimals,however,thetemporalpatterningofmountboutsissurprisingly regularandseeminglyindependentofthenumberofintromissions,ejaculationoreven successinmounting(SachsandBarfield,1970).Whenamalemountsafemalehedoes thisfromtherear,claspingandpalpatingherflankswithhisforepaws(Whishaw&Kolb, 2005).Inareceptivefemale,thistendstotriggerthereflexivelordosis,aposturewhere thefemalearchesherbackanddorsiflexeshertail.Duringsomeofthesuccessfulmounts, themalerapidlyinsertsandwithdrawshispenisfromthevagina(intromission)butonly onthefinalinsertionofthisseries,spermandaseminalcoagulate,thevaginalplugis inserted(Adler,1969).Itisnotunlikelythatamountboutgoeswithoutintromissionsor ejaculation. Afteramountboutthemaleengagesingenitalautogrooming,abehavioralpatternwhere theanimalrapidlygroomshisowngenitalarea.Aftersuchprolongedgroomingboutsthe maletypicallyavoidsthefemaleandentersarefractoryperiodafterwhichheoften reinitiatessexualbehavior. Ifintromissionshappenduringasuccessfulmounttheynormallyoccurintrainsofmany insertions.Wilsonetal.(1965)measuredthechanceforpregnancyofthefemale,taking intoaccountthenumberofintromissionsthatwerenecessarytotriggerthesubsequent fertilization.Hefoundthataftersixormoreintromissionsbeforeejaculationthechance forpregnancyraisesabove90%.

Realtimeanalysisofultrasonicrodentvocalizationsonwearablesensornodes

Literature offers two hypotheses for the number of intromissions that seem to be necessaryforasuccessfulfertilization.Thefirstisthatintromissionsseemtofacilitate passageofspermthroughthecervix.Blandau(1945)showedthatduringheat,therat's cervixistightlyclosedandthatspermwouldpassintotheuterusonlyifavaginalplug was depositedwiththeejaculate.Eventhoughhispostulationaboutafemaleorgasm seems implausible, Adler (1969) could show that at least two intromissions must accompanyejaculationforspermtransportandsubsequentfertilizationtooccur.Without atleastoneextraintromissionbeforeejaculation,thespermdidnotpassfromthevagina intotheuterus.Apossibleexplanationwouldbeamechanicalmediationfortherat's cervixtoopenupforspermpassageafterrepeatedintromissions.Theaveragenumberof copulationsbeforeejaculationisseventimesinalaboratoryenvironmentwithfemales thatwerebroughtintoheatbyinjectionofestrogen(BeachandJordan,1956). Thesecondwaythemale'scopulatorybehaviormayfacilitatepregnancyisbyinitiatinga neuroendocrinereflexwhichresultsinthesecretionofgestationalhormonesinamounts sufficienttopermitimplantationoftheeggandsubsequentpregnancy(Adler,1969). Itismostlikelyamixtureofbothexplanationsthatdefinefertilizationprobabilityand mediatetheoverallcopulationbehaviorofmaleandfemalerats.

Chapter1.Introduction

1.3 Vocalizationsofthelaboratoryrat
The first person to describe that rats vocalize in the ultrasonic frequency range was Anderson (1954). Today, at least three fundamental types of vocalizations can be distinguished(Wohret.al.,2005). The firstcalltypethatwas discoveredistheinfantcall(Noirot,1968).Thesehighly variable calls are only emitted by infant or juvenile rats and differ in fundamental frequenciesbetween10kHzand120kHz,inbandwidthsbetween5kHzand110kHzas wellasindurationsof10msto450ms(SalesandSmith,1978;Brudzynskietal.,1999). Femaleratscaringfortheirlitterstypicallyreacttothesecallsbysearchingfortheirpups inordertoretrievethemtothenest(AllinandBanks,1972).Itwashypothesizedthat variabilityincallparametersbetweenlittersallowsforthemothertodistinguishbetween theirownandunrelatedratpups(Brudzynskietal.,1999). Thesecondcalltypeisthesocalled50kHzcall,orShortCall,thathasafundamental frequency between 35 kHz and 70 kHz with a bandwidth of 1 kHz to 6 kHz and a durationbetween20msand80ms(Knutsonetal.,2002).Sales(1972a)showedthat Short Calls occurred predominantly in conjunction with aggressive behavior between males,buthisconclusionabouttheaggressoremittingthecallswaslaterdisprovenby Thomasetal.(1983)whotesteddevocalizedratsinaResidentIntruderparadigm.They found that the Short Calls are solely produced by the intruder rat in an aggressive encounterand concluded that 50kHzcalls couldhaveacalmativeeffectonthe more aggressiveresidentastheyindicatesubmission. Giventhevariationandcomplexityintheshapeofthesecalls,itseemsplausiblethat thereareatleasttwosubcategoriesfortheclassof50kHzvocalizations.Theflat50kHz calls are constant in frequency, whereas the frequency modulated (FM) calls contain either a trill and/or step component. Flat 50kHz calls were found to be emitted by animals to establish or maintain contact, such as they may have a primarily social coordinatingfunction(Whretal.,2008).Furtherevidenceforthehypothesisthat50kHz callsgenerallyreflectapositiveemotionalstate(Knutsonetal.,2002),couldbegivenby BurgdorfandPanksepp(2001;2005)whofound50kHzcallstoaccompanybothsocial andnonsocialrewards.

Realtimeanalysisofultrasonicrodentvocalizationsonwearablesensornodes

Thethirdclassofultrasonicvocalizationsinratsisthe22kHzcall,orLongCall.The fundamentalfrequencyofthesecallsliesintherangeof18kHzto32kHz,andtheyhave ameanbandwidthofonly3.3kHz.Theymostlyoccurinsequencesofshorter,similar segmentswithadurationof20msto300ms,whileasequencedurationcanbebetween 310msand2000ms(Brudzynskietal.,1993).Thefrequencydomainofthelongcalls most often contains downsweep modulation in the initial segments and upsweep modulationintheterminal.Themidpartismostlyconstantinfrequencyandshowsno overtones, but is generally modulated in amplitude. However, call shapes and thus frequencymodulationseemtostronglydependonthebehavioralcontext.Itwastherefore proposedthatatleast2typesoflongultrasoniccallsexist,onemonotonous,theother modulated(VanderPoelandMiczek,1991). Sewell (1967)was thefirsttolink the LongCalls tothe alsolongexhalationofthe huddled, submissive rat in an aggressive encounter between two males. It was hypothesizedthat22kHzcalls,liketheShortCalls,haveacalmativeeffectonthemore aggressiveconspecific,thusreduceaggressivebehavior.Thisassumptioncouldbeproven byresidentintrudertests(Loreetal.,1976; Inagakietal.,2005),butalsodisproven (Thomasetal.,1983;TakeuchiandKawashima,1986).Since22kHzcallsoccurina variety of aversive contexts like the presence of a predator (Blanchard et al., 1991), generalstress(Sanchez,2003)orisolation(Francis,1977),itcouldbeconcludedthatthey generallyreflectanegativeemotionalstate. However, because 22kHz calls are also frequently emitted while animals mate, the questionaboutthefunctionofthesecallsremainsadispute.

10

Chapter1.Introduction

1.3.1 Vocalizationsinamatingcontext
Theprinciplefunctionofthemaleproducedultrasoundsduringmatingistofacilitateand orientthesolicitationbehaviorofthefemale.However,vocalizationsseemtohavelittle effectinattractingthefemaletothephysicalproximityofthemale,butdirectdarting behaviorofthefemale(Thomasetal.,1982). Females,ontheotherhand,emitultrasonicvocalizationsduringsolicitationbehaviorthat arethoughttoattractthemalewhenheisintheimmediatevicinityofthefemale(White andBarfield,1987).Thecallsaremostlikelyaresponsetotactileorodorcuesofthe male,butnottotheultrasoundsproducedbyhim. Referring tothecallclassificationofSales (1972b),VanderPoel(1991)described a postejaculatorysong,emittedbymaleratsaftercopulation.Thissongconsistsofcall bouts,containinganaverageof2.520.25LongCallsinthe2030kHzregionbutcould alsobecomposedofover25calls.Themeannumberofboutsperminutewas14.7 0.9. Calls within a bout are separated by short intervals which have only little variation betweensubjectsinintervallength.Itseemsplausiblethatanintervalreflectsthetime neededforoneperformedinhalation,whichwouldexplainthelittlevariation.Insome rarecasesLongCallswerealsoemittedbeforeejaculation(Aniskoetal.,1978;Adlerand Anisko,1979). InadditiontotheLongCallsthatareexhibitedmostexclusivelybythemaleratduring copulation,bothmalesandfemalesproduce50kHzultrasonicvocalizations,whichare generallyassumedtoreflectapositiveemotionalstate(Knutsonetal.,2002).However, onlytheFMsubtypeof50kHzcallsisrelatedtopositiveappetitivebehaviorduring mating and mayreflect apositive affectivestate (Burgdorf et al., 2008). Although it remainsunclearwhatspecificfunctionflat50kHzultrasonicvocalizationsmayhavein regulatingmatingbehavior,itissuggestedthattheymayindexsocialambivalence,asthey occurmorefrequentlyinaggressivesituations.

11

Realtimeanalysisofultrasonicrodentvocalizationsonwearablesensornodes

12

Chapter2.Designofthesensor

2 Designofthesensor
2.1 Introduction
Theprimaryaimedusageofthesensoristorecordultrasonicrodentvocalizationsinthe contextofawild,freelymovinganimalthattypicallyhousesinanundergroundburrow. Thisdesireduseforthesystem,whichalsohastobewearablebytheanimals,resultedin thefollowingdesignconstraints: 1. allcomponentsshouldbeassmallandlightweightaspossible 2. theoverallpowerconsumptionshouldbeminimaltoachievethehighestpossible batterylifetime 3. obtaineddatahastobestoreduntilanetworkconnectivitycanbeestablished 4. preprocessingofthemeasurementsisneededtoreducetheamountofdatathathas tobestoredandtransmitted Tocontroltheradiounit,storethedata,andcontrolthepowermanagementofthesystem, theusageofamicroprocessorwasmandatory.However,theprocessoralsounderliesthe previously mentioned design constraints and was thus chosen to be small, energy efficient,butslowcomparedtootheravailablemodels.Mostmicroprocessorsalsofeature abuiltinanalogdigitalconverter(ADC)thatcanbeusedtoconvertanalogsignals,such asonefromamicrophone,tobeprocessablebydigitallogicbasedcomponents.Rate requirementsfortheADCaregivenbytheNyquistsamplingtheorem 2,withwhichthe minimalrequiredsamplingratefortheconversionoftherecordingcanbecalculated(Fs> 160kHz3).Asamplingrateinthisorderofmagnitudeisnotfeaturedbymicroprocessors

2 TheNyquisttheoremstates,thatananalog,bandlimitedsignalwithamaximumfrequencyoffmax hastobesampledwithafrequencyofatleast2fmaxtohavethetheoreticpossibilitytoreconstructthe originalsignalfromthesoobtaineddiscretevalues(Nyquist,1928) 3 ThemaximumexpectedfrequencyofaratcallisF=80kHz.(Anderson,1954)

13

Realtimeanalysisofultrasonicrodentvocalizationsonwearablesensornodes

thatsuittheprojectrequirementsregardingsizeandenergyefficiency.Thereforeitwas necessary touse adifferentproceduralmethodtodigitallyprocess the analogsignal, namelyamodifiedformofZeroCrossingAnalysis(ZCA). ZCAdoesnotprocessanyamplitudeinformationbutfeaturesafairlyhighsamplerate and is furthermore not fully dependent on the processor speed, because it can be implemented using simpler electronic components. We modified the standard ZCA approach into a onesided levelcrossing detector with a twosided hysteresis partly followingFriedman(1994).Usingahysteresisdrasticallyreducestheamountofnoisethat isconverted,butintroducesthephenomenonofStochasticResonance(SR)whichcallsfor aprecisesystemcalibrationinordertocontroltheinfluenceofthiseffect.

14

Chapter2.Designofthesensor

2.2 Zerocrossinganalysis
Inmathematicalterms,azerocrossingisapointwherethesignofafunctionchanges.In alternating current signals, like those from microphones, a zerocrossing is the point wherenovoltageispresentandtheamplitudechangesinsign.Duringawaveperiodthis typicallyhappenstwice.Logan(1977)emphasizesthat,undercertainconditions,theinput signalisidentifiablebymeansofitszerocrossings,evenifitsdirectreconstructionisnear toimpossible. Thedominantfrequencyprinciple(Kedem,1986)showsthatwhenacertainfrequency bandcarriesmorepowerthanotherbands,itattractsthenormalizedexpectednumberof zerocrossingsofthecontinuoussignal.Thisalsomeansthatthetimesbetweenzero crossingsfollowastatisticaldistributionleadingtothenumberofcrossingsperunittime. Inthecaseofasinusoidalsignalpluswhitenoisethemeantimebetweenzerocrossings wouldresemblethefrequencyofthesignal,whilethevariabilityinphasedurationholds some information about the signal to noise ratio (Friedman, 1994). Calculating the fundamental frequency of the input signal by means of times between crossings is somewhat opposed to Kedem's (1986) approach to sample the signal into a binary representationofdiscretetimeforthecalculationofhigherordercrossings. Inthiswork,Imeasureintervalsbetweenthecrossingsofthecontinuoussignalinterms ofsampleclockpulses.Becausezerocrossingsarenotusedtotriggerameasurement,but crossingsofdistinctlevels,namelyhysteresisthresholdsofaSchmittTrigger,Icallthisa LevelCrossingDetector(LCD).Thisdetectorconceptsharescommongroundwithideas oftheLevelCrossingSamplingforadaptiveADCs4 basedonLevelCrossingDetectors (exemplary:Qaisaret.al.,2009),butshouldnotbeseenassimilar. Thedetectorproposedinthisworkthusmeasuresthediscretetimebetweenthecrossings oftwoconstant,yetdifferent,levels.Thisaccountsforthestatisticalhalfofthecontinuous signalwhiletheotherhalfisomitted.Thishappensunderthestrictassumptionthatthe input signal shows great periodicity, the missing information therefore being mostly redundant.However,asalsooutlinedbySadlerandCasey(2000),asufficientsignalto noiseratiooftheinputsignalisnecessaryforasuccessfulestimationofthefundamental frequency.

4 AnalogDigitalConverter

15

Realtimeanalysisofultrasonicrodentvocalizationsonwearablesensornodes

2.2.1 StochasticResonance
Arandomsignalindiscretetimeisgenerallyreferredtoasastochasticorrandomprocess. This noise,as itcarries noinformation,shouldbeomittedintheanalysis procedure. ThereforeIuseaSchmittTriggerandamplifythemicrophonesignaltosuchanextent, that the noise component remains just below the triggerthresholds. If no meaningful signalispresent,thresholdsareexceededbynoisealonewithasmallprobability,dueto therandomnessofnoise.However,thishasaneglectableeffectonsignalconversionwhen thesignaltonoiseratio(SNR)ishigh.ForsmallvaluesofSNR,ontheotherhand,the phenomenon of Stochastic Resonance (SR) largely effects the outcome of signal conversion. For signal intensities below threshold, a plot of signaltonoise ratio as a functionofnoiseintensityshowsaninvertedushape(Gammaitoni,1995).Thismeans thatanoptimalnoisevalueexistswheretheaverageoutputresponsecharacteristicstill showsthesubthresholdsignal.Inparticular,inthecaseofabistablesystem,likethe SchmittTrigger I use in this work, the thresholdnoiseratio determines the detection characteristicsthroughzerocrossingsforweaksignals(figure2.1).

Figure 2.1 : SimulationdataforthedetectionofasinusoidalsignalplusGaussiannoise bymeansofalevelcrossingdetectorasdescribedearlierinthischapter.Relative Frequenciesarefrom1(highfrequency)to20(lowfrequency).Signalintensitiesvaried, whilethethresholdnoiseratio(TNR)wasconstant.A:TNR=0(arealzerocrossing detector),B:TNR=0.5(optimal),C:TNR=0.7;Colorswereplottedrowwiseand rangefromblue(nodetection)tored(mostfrequentdetection).

16

Chapter2.Designofthesensor

Tosumup,onecansaythatSRdescribesthephenomenonofthecorrectdetectionofa signalthatistooweaktodetect,whenacertainamountofwhitenoiseisaddedtoit.This meansthattheSNRoftheoutputsignalofaSchmittTriggercaninfactbemuchbetter thantheSNRoftheinputsignal.Thiscounterintuitiveeffectcanbestbedescribedasa cooperation between the stochastic and the periodic component of the signal. If the periodiccomponentistooweaktoexceedthethreshold,itmightstillbestrongenoughto modulatethenoiseinsuchawaythatthecombinedsignalstriggerthesystemwiththe frequencyoftheperiodiccomponent. Thephenomenonofstochasticresonancewasoriginallyproposedasanexplanationofthe periodicrecurrencesoftheEarth'siceages(forreviewseeWiesenfeldandMoss,1995) andcouldbedemonstratedforthefirsttimeusingaSchmittTrigger(FauveandHeslot, 1983).SincethenSRwasfoundtoplayaroleinvarioustechnicalandbiologicalsystems, oneofthemostinterestingbeingthefiringmechanismofneurons. TherehasbeenmuchspeculationabouttheimplicationsofSRinbiologicalsystems,but sinceBulsaraetal.(1993)couldshowthatevenmuchsimplersystems,namelythosewith asinglethresholdorintegrateandfiredynamics,alsoshowSRlikeproperties,itseems almostevidentthatthenervoussystemisaffectedbythis.SincethentheeffectofSR could bemeasuredinthesensorysystemofthecrayfish(Douglassetal.,1993),and afterwards confirmed in many electrophysiological, psychophysical, and even brain imagingexperiments.Foracomprehensivereviewonthetopicthereaderisadvisedto refertoMossetal.(2003). Theadjustmenttotheoptimalratiobetweenthreshold,noiseandsignalisnotaneasy process, as can be demonstrated by figure 2.1.Presumably, this is the reason for the missingapplicationoftechniquesthatbenefitfromSRintechnicalchallenges,likelong rangesignaltransmission.Howexactlybiologicalsystemsregulatethisisaninteresting questionforfurtherinvestigationsinthisfield.

17

Realtimeanalysisofultrasonicrodentvocalizationsonwearablesensornodes

2.3 Hardware
2.3.1 MicrophoneandAnalogFilter
For a microphone I used the condenser microphone type FG23329C05 (Knowles Electronics, U.S.A.), which features a fairly good response curve in the ultrasonic frequencyrange(seepage74).Theanalogoutputofthemicrophoneisfilteredthrougha sixstageactiveanalogfilter,whichissupposedtosmooththefrequencyresponse.All circuitrydesignswerecomposedwithEagle5.6.0LightforLinux(CadSoftComputer GmbH, Germany) and simulated with 5Spice Analysis 1.60 for Windows (Andresen Software, Germany). Circuits were assembled using breadboard cards and tested for desired functionality. Altogether eight revisions of the circuit were built, but only revisions2and68wereminiaturized.Thiswasdonebydesigningacustomboardlayout foreachrevisionwhichwasthenmanufacturedbyanexternalcompany.Customboards couldbeassembledusingmuchsmallerpartsinSMD(SurfaceMountedDevice)design. Thetestingapparatusforthecircuitsconsistedofafrequencygenerator(Voltcraft7207, Korea),thesignalsofwhichwereamplifiedusingapoweramplifierwithanearlylinear frequencyresponseintheultrasonicfrequencyrange(WPA600PRO,Taiwan).Sounds wereproducedthrougharibbonloudspeaker(PioneerPTR13A)thatcouldberecorded bythesensor.Outputsofeachfilterstagecouldthenbedischargedandanalyzedbya 60MHzoscilloscope(TektronixTDS2002B,U.S.A.). OnlyRevision8completedallstagesofthedevelopmentprocessandwasthustestedinan animalexperiment.Itshouldbenotedthateveryfurtherexplanationaboutcircuitryand designofthesensorisaimedatRevision8ofthesensorboard.Foramorecomplete understandingofthedevelopmentalprocessandothercomprehensiveexplanationsplease refertopage75.

18

Chapter2.Designofthesensor

Figure 2.2 : Circuitdiagram Revision8oftheanalog activefilterwithitssixstages (numbered16).Current sourcesarenotdisplayedfor thesakeofsimplification.

19

Realtimeanalysisofultrasonicrodentvocalizationsonwearablesensornodes

Sixoperationalamplifiers(OAs)intwoquadrupleOpAmps(TLV274)wereused,leaving twoOAsunconnected.Filterstage1aswellasstages46areinvertingamplifiers,each withanamplificationcoefficientof10.ThisisdefinedthroughtheresistorsR16andR2 instage1,R8andR7instage4,R15andR18instage5andR19andR20instage6.The resistorcapacitorpairs(RC)C1andR1,aswellasC3andR17arepassivehighpass filters,whereonlyC1andR1effectivelyfilterthesignal.C3andR17correctsomeoffset biaswhichemergeswhencascadingtheamplifierstages.Twofilterstages(2and3)are activehighpassfilterswhichmostlyaccountfortheoverallfrequencyresponseofthe system.BecausethecircuitryoperatesonasinglesupplyvoltageofVS=3V,thesignal hastobefilteredaroundaDCoffsetwhichisapproximatelyVREF= VS.Theactual requiredvalueforVREFdependsonthecharacteristicsoftheinputofthedigitalpartand hastobefinelyadjusted.ThisiswhythevoltagedividerconsistingofR11,R12andR14 isslightlymorecomplicatedthanonewouldexpect.R12canthusbeusedtoalterthe referencevoltageandwouldthereforebedifferentineverybuiltcircuit,dependingonthe componenttolerancesoftheOAs,theSchmittTriggersofthecircuit(nextchapter),and theotherresistors.

Figure 2.3 : Frequencyresponseoftheoverallfiltercircuit(5Spicesimulation); TPv1TPv3(leftyaxis):readingpointafterstages13,TPv4(rightyaxis):output tothedigitalpart(readingpointafterstage6)

20

Chapter2.Designofthesensor

Thesimulatedfilterinputwasdefinedtobeasinewavewithanamplitudeof1mVanda frequencyof10110kHz.Thecircuitwaspoweredbyasinglesupplyvoltageof3V, thereforeVREFwasdefinedto1.5V.Figure2.3showshowthesteepnessofthefrequency responsecurveincreasesduetothecascadedfilterstages.Theresultingcharacteristicsof thefiltercompensatethenonlinearityofthemicrophones'frequencyresponseinamanner thatisneededforthesubsequentdigitalprocessing.

Figure 2.4 :

Topviewoftheabovementioned analogpartRevision8.Itwas builtonaPCBboardandepoxy coatedafterassembly.The microphoneislocatedatthebottom andthereforenotvisible.

2.3.2 Digitalprocessingcircuit
Thefirststepofazerocrossinganalysis(ZCA)istoconvert5 theanalogsignalintoa squarewaveform(ADconversion).Afterthat,timeintervalsbetweentransitionevents canbemeasuredusingafastsampleclock.IuseaSchmittTriggergateforADconversion wherethehysteresisofthisdeviceisthoughttoresultinanoisereductionforthesystem. Theunderlyingassumptionforthisnoisereductionisthatthesearchedsignalisalways significantlystrongerthanthebackgroundnoise,mostlyduetothepositioningofthe microphoneataconstantpositionontheanimal.

5 Acomparatorcomparestwoinputs,inthiscaseaninputvoltageandavoltagethreshold,andchangesits outputaccordingtotheratioofthesetwoinputstooneoftwostates.

21

Realtimeanalysisofultrasonicrodentvocalizationsonwearablesensornodes

Thecircuitisdesignedtocountthenumberofsampleclockpulsesbetweeneveryhigher threshold overshoot and the next lower threshold undershoot. This accounts for the durationofeverypositivehalfwaveoftheinputsignal.Resettingandregistercontrolof the used counterisdoneautomatically,sothatthecountresultcanbereadfromthe counterregisteruntilthenextcountingprocessiscomplete.

Figure 2.5 : TheprinciplefunctionofthedescribedmethodusinganoninvertingSchmitt TriggerforADconversion.Thebluelineistheinputsignal,theredlinetheoutputsignal. Circlesmarkahigherthresholdovershoot(leftcircle)andalowerthresholdundershoot (rightcircle).

ForaSchmitttriggerthecomponent74HC14Dwasused.ItfeaturessixinvertingSchmitt triggers,fiveofwhichareusedinthecircuit.Theinvertingversionofthecomponentwas chosenforreasonsofenergyefficiency.Theinversionhasnoobviouseffectontheresults oftheLCDmethodduetothesimilarityofbothhalfwavesofacontinuoussignal.Fora counter the component 74HC590M6 was used, which features an output of the result througharegisterthatcanbecontrolledindependently.

6 Onfigure2.6wronglydepictedas74HC590D

22

Chapter2.Designofthesensor

Figure 2.6 : Circuitdiagramofthedigitalpart.Currentsourcesarenotdisplayedforthe sakeofsimplification.Signaleingang=signalinput;InterruptAusgang=interrupt outputline;8bitAusgang=8bitportoutput

Aspreviouslyshown,theinputsignalforthiscircuit,comingfromtheanalogfilter,is firstcomparedandinvertedthroughIC3A.Thesignalthenreachesthecounterthrough theSchottkybarrierD1andstartsameasurementaswellasablockingofthecounter register through a signal transition from On to Off. A contrary transition stops the countingandtriggerstheregistertoupdatetothenewcounterresult,whereitcanberead bythemicrocontroller.ConcurrentlyIC3Bresetsthecounterandthusenablesitforanew countingcycle.Resultsofthecounterreflectthenumberofcyclesofanoscillatorcircuit thatiscomposedofIC3D,IC3E,C9andR9andhasafrequencyof2.62.7MHz, dependingoncomponenttolerances. IC3Cpreventsanoverflowofthecounterbystoppingitwheneverthemaximalpossible countresultoccurs.R10isapulldownresistorwhichisusedtodischargetheconnecting signallineinaveryrapidmanner.ThisisnecessaryforD1tofunctionproperly.

23

Realtimeanalysisofultrasonicrodentvocalizationsonwearablesensornodes

Figure 2.7 : Topviewofthepreviously mentioneddigitalpart.Itwasbuiltona PCBboardandepoxycoatedafter assembly.Themicroprocessorislocated atthebottomandthereforenotvisible.It isconnectedtotheanalogpartthrough a3wirecable.

Thefrequencyoftheoscillator fosc determinesthelowestmeasurabletimebetweentwo thresholdcrossings.Takingintoaccountthemaximalpossiblecountervaluecmax=255of thebinarycounter,thelowestmeasurablefrequencycanbecalculated: f min = f osc 2c max

Theexacttimethefirstclockpulseoftheoscillatoroccursafterameasurementwas startedisnotdefinableandcanthereforeonlybeestimatedwiththerandomvariable whichcontainsthelikelihoodofthefirstclockpulsetooccurdirectlyafterstartingofthe countingprocess.Foreverycountingprocess hasadifferentvalue. Foreveryperiodofasinewavewithafrequency f andasufficientamplitudetotrigger thedigitalprocessingcircuit,theresultingcountervalue y canbecalculatedwith: y = f osc forall f f min with 0 1 2 f

y =c max forall f f min

24

Chapter2.Designofthesensor

2.3.3 MicrocontrollerandPowerSupply

Figure 2.8 : Wiringofthemicrocontroller(left),powersupplycontrol(midfield)and externalconnectorsofthesensor(right)

Foramicrocontroller,themoduleRC2301(Radiocrafts,Norway)wasused.Thismodule featurestheZigBee radiostackCC2431(TexasInstruments),whichisbasedonan enhanced8051CPU7.TheRC2301modulefurthermoreincludesaradiounitwithantenna aswellasanEEPROMwithasizeof4kB. Toprogramthemodule,theevaluationboardD210R1(Sensinode,Finland)wasused.The softwarewasbuildontopoftheNanoStack1.1.0GPLframeworkprovidedbythesame manufacturer.NanoStackisbasedonthefreeoperatingsystemFreeRTOSwhichwas specificallydesignedfortheuseinsmallscalesystemslikesensornodes.Itwasmostly writtenintheprogramminglanguageCandthereforeallowsforthedevelopmentinCfor everycustommaderoutinebasedonit.

7 Originallyfromthe8bitprocessorfamilyMCS51,introducedbyIntelintheyear1980

25

Realtimeanalysisofultrasonicrodentvocalizationsonwearablesensornodes

FactoryprovidedwiringsuggestionsoftheRC2301modulewereextendedbyaddingthe voltageregulatorcircuitLP2980,whichallowsforacuttingofsupplyvoltageforthe wholesystemwheneveritfallsunderacertainthreshold.Thiswasdonetoprotectthe usedLithiumPolymerBattery(LiPo)againstdepthdischarge.Theusedbatteryisa270 mAhsinglecellLiPo(model1C,LipoPower,Germany),whichisconnectedtothesensor circuitthroughanexternalconnector. Thevoltageregulatoralsosuppliesthedigitalandanalogcircuitsthatweredescribed earlierwheneveracontrolvoltageisapplied.Thisisprovidedbythemicrocontrolleras long as the supply voltage is high enough, which is periodically checked by the controller'sADC.Initiallythesystemhastobestartedmanuallybyshortcircuitingtwo wires(depictedasOnSwitchonfigure2.8)untilthemicroprocessorisreadytoprovide thecontrolsignal.

26

Chapter2.Designofthesensor

2.4 Software
2.4.1 TheMicrocontrollerSoftware
The purpose of the software I developed for the RC2301 module is to register all measurements provided by the previously described sensor extension, to count their occurrence,clustertheresults,storethem,andtolatertransmitthemviaradio.Adataset ascompiledbythesoftwaredepictsatimewindowofconstantwidth,containingthe resultsfromthehardwarecounterin20measurementclusters.Ameasurementcluster enclosesarangeofhardwareprovidedcounterresultsthatreflectaspecificfrequency range of a hypothetical sine wave signal (please refer to table 2.1 on page 29). All measurementsbelongingtooneclusterarecountedonoccurrenceandthusconstitutethe valueofthecluster. One pinofthemicrocontrolleris directlyconnectedtotheoutputofthecomparator, whichisessentiallythesamesignalthatisusedtotriggerthehardwarecounteronthe sensorextension.Thesoftwarethuswaitsforacountingcycletoend8,andthenreadsthe 8bitvalueprovidedbythecounterregister.Toreducetheamountofdatathathastobe stored,valuesprovidedbythehardwarecounterfunctiononlyasincrementpointersand areafterwardsdiscarded.Theresultisanarraythatcontainsinformationabouthowoften everypossiblevaluehasoccurredduringtheoverallreadtime. static void vRead_ISR() { bufpoint[P1]++; } Thissimpleinterruptserviceroutinebecomesactivewhenevertheassignedinterrupt,the triggersignal,becomesactive. bufpoint[] isapointertoareservedmemoryregion wheretheresultscanbestored.Itisrenewedbyacontrolroutineevery20ms,whichisthe maximumtemporalresolutionIfoundtobereasonable.P1isthevalueofthe8bitport thatreadsthevaluefromthehardwarecounter'sregister. Resources of the RC2301 allow for five memory regions for data storage, which are thereforeaddressedinaringbufferprinciple.Readingisdonebytheanalysisroutine which,uponcompletion,freesthememoryregionandallowsagainforwritingbythe interruptserviceroutine.

8 Thatisaoffontransition

27

Realtimeanalysisofultrasonicrodentvocalizationsonwearablesensornodes

Figure 2.9 : FlowchartofthesoftwareIwrotefortheRC2301module.Theunderlyinglarge coloredareasordertheflowchartinfourdistinctblocksthathavedifferentpurposes:Red: Readingandstorageofsensorvalues,Green:Updatingthereadbufferandtriggeringthe analysis,Yellow:Analysiswithdatastorageandtransmission,Blue:Thresholdcontrolfor dataclustering. 28

Chapter2.Designofthesensor

Whenever a dataset is read for analysis, it is first reduced to the 20 value clusters, reflectingfrequencyrangesofapproximatelythesamelengthwithasmalloverlap to adjacentclusters.Allsensorvaluesbelongingtooneclusterarethensummeduptoa singleclustervaluewhichisusedforfurtherprocessing.

Cluster 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

StartValue 13 14 15 16 17 18 19 20 21 23 25 28 31 34 39 45 54 67 87 126

EndValue 14 15 16 17 18 19 20 21 23 25 28 31 35 40 46 55 68 90 132 254

StartFrequency EndFrequency 101.923 94.643 88.333 82.812 77.941 73.611 69.736 66.250 63.095 57.608 53.000 47.321 42.741 38.970 33.974 29.444 24.537 19.776 15.229 10.515 91.379 85.484 80.303 75.714 71.622 67.949 64.634 61.628 56.383 51.961 46.491 42.063 37.324 32.716 28.495 23.874 19.343 14.640 10.000 5.206

Table 2.1 : Definitionofvalueclusterswiththecorrespondingsinefrequencies calculatedwiththeequationsofchapter2.3.2,=0forstartfrequencyand=1forend frequency.FrequenciesareinkHz.

29

Realtimeanalysisofultrasonicrodentvocalizationsonwearablesensornodes

Afterclusteringofthevalues,everyclusteristhencomparedtoitscorrespondingcluster threshold.Ifthedatasetexceedsaclusterthresholdinatleastonecase,itisjudgedas meaningful,otherwiseitisdiscardedasnoise.Meaningfuldataisstoredontheinbuilt flashstorageofthemicrocontrolleraslongasthereisenoughspaceleft.Ifnofurtherdata canbestored,recordingandanalyzingstopsandallvaluesaretransmittedviaradio. Furthermore,informationaboutthresholdovershootsisstoredinadedicatedmemoryarea forevaluationthroughathresholdupdateroutine.Everyfivesecondsthispartofthe softwareupdatesallthresholdsdependingonhowoftentheywereexceeded.Thisisdone inastepwisemannerwherestepsizesincreasewhenathresholdiscorrectedseveraltimes inthesamedirection.Theupdatemechanismwasbuilttoresembleamedianestimation algorithm in many ways, therefore the threshold value should always be close to the medianoftheactivationfrequencyforthecorrespondingcluster.

Figure 2.10 : Simulationdataofthethresholdupdateroutineforthreeindependent clusters(colors)withinitiallyrandomthresholdestimates.Narrowlinesarerandom activationpatternsofclustersthatoccurwhenwhitenoiseisrecorded,broadlinesare thethresholdestimatesfortheseclusters.

Becausethereisalwaysspontaneousactivityoneverycluster,thresholdestimateswere definedtobenotlowerthantwo.Theactualthresholdeachclusteristestedagainstequals fourtimesthethresholdestimateoftheupdateroutine.Thismeansthatinordertoraise

30

Chapter2.Designofthesensor

an otherwisesilentclustertothelevelofactivation,itneedsatleasteightassociated sensorvaluesina20mstimeintervaltobecomeactive.Furthermore,thresholdsadaptto contextchangeswithacertaininertiathatisdefinedthroughthetimeoutvalueofthe updateroutine.Asettingoffivesecondsproducedsatisfyingresultsinnearlyeverycase. Atshorterintervalsvariationofthethresholdswasmuchbiggerwhilelongerintervals resultedingreaterinertiawhenthefrequencyofoccurrencechangedrapidlyovertime.

2.4.2 StorageandTransmissionofdatasets
Asalreadymentionedinthepreviouschapteranddisplayedonfigure 2.9,meaningful judged datasets have to be stored on the inbuilt flash memory of the RC2301 microcontroller.Thisisdonethroughaflashwritingroutine,whichwaspartlywrittenin Assembly9becausetherewasnobuiltinwayfordoingthiswiththesoftwareprovidedby Radiocrafts. Flashwriting is done through a DMAChannel10 which allows for the processorcoretostayidlewhileflashwritingisinprogress.Theroutinealwayswrites fourbytesatatimewhichfirsthavetobestoredinadedicatedmemoryarea.Writingis thenrepeateduntilthewholedatasethasbeensavedonflash.Extracarehadtobetaken topreventoverwritingofthemicrocontrollers'programcode,whichalsoresidesinthe flashmemoryspace. Aslongasthereisenoughspaceleftontheflashstorage,allotherprogramscontinueto runandthememoryfromwhichthemeaningfuldatasetwasreadisreturnedforfurther dataacquisition.However,iftheflashmemoryisfull,allotherprogramsarestopped immediatelyandthemicrocontrollerstartstobroadcastallstoreddatasetsviaradio.For thispurposedatasetsarefirstreadfromflashandthenconvertedintotworadiopackets, whicharethentransmittedasfastaspossible.Theprocessrepeatsuntilalldatasetshave beentransmittedandcanbeerasedfromtheflashmemory.Afterthisisdonethewhole systemisresetandbeginstorecordandstorenewdatasetsagain. The available flash memory is big enough to store up to 1380 datasets with the correspondingtimestamps.Sofar,nocompressionwasappliedtothedatasoitshouldbe
9 Assemblyaprogramminglanguagespecifictotheprocessor 10 DMADirectMemoryAccessisamethodtowritetomemoryregionswhilekeepingtherequired processoroverheadminimal.

31

Realtimeanalysisofultrasonicrodentvocalizationsonwearablesensornodes

notedthatthereisstillroomforextensiveenhancementsintermsofdatastorage.The latterisalsotrueforthedatatransmissionviaradio.Bitschetal.(2009)andThieleetal. (inprint)areworkingonwaystotransmitdatathroughahighlydynamicroutingstructure even if there is no access point in direct range of the sending node. Of course, compression algorithms could also reduce the required transmission bandwidth and furthermore reduce the time totransmit a setof data. Currentlyit takes around56.7 secondstotransmitthecontentsofafullyoccupiedflashspacewithits1380datasets, matching27.6secondsofmeaningfulacousticevents.

2.4.3 TheReceiverSoftware
TheSensinodeN601R1isaUSBReceiverfortheRadiocraftsZigBeeradioprotocol.It canalsosendpacketsforcommunicationwithotherbasestationsorsensors. The module is controlled through the program nRouted, which is included in the NanoStackFramework.'nRouted'isasimplebridgeprogram,thatcanbeuserconfigured bysendingcontrolpackagestotheprogram.ItthenconfigurestheUSBmoduleinthe desiredmanner,withouttheuserhavingtoconsiderhardwarecontrol. AprogramwaspersonallywrittentoreadallpackagesfromthemoduleN601R1using nRoutedandsavesthemintoafile.Sincethesensorwassendinguncompresseddata,the onlyprocessingstepnecessarywascombiningtworadiopacketsthatcompriseawhole dataset.Noerrorcorrectionwasdoneandnosuccessionfeedbackwasgiventothesender, sincethesignalstrengthwasalwaysgoodduetothelowspatialdistancebetweensender andreceiver. Another program was written in order to log the behavior of the animal. Upon key presses, both animals could be separately assigned to a specific behavior. Behavioral changeswerethenloggedwithacorrespondingtimestampforlateranalysis.Thisevent recorderwasusedthroughouttheexperimentwhichwillbedescribedlater,butproduced noresultsduetothegreatlatencyofmanualkeypresses.Thedatawasusednonetheless toidentifyunwantedbehavior,forexampleproblemswiththejacket.

32

Chapter2.Designofthesensor

2.5 Fasteningjacketforrats
Tofixthesensorontoanindividualrat,aleatherjacketwastailored.Inordertoholdthe twosensorpartsaswellastheexternalLiPoBattery,thejacketfeaturesthreepockets,one oneverydorsolateralsideoftheanimalandonedorsaloftheneck,endingbetweenthe ears. The third pocket has an opening facing headwards for the microphone. The microphoneisthuslocatedattheneckoftheanimal,facingforward. Furthermore,thejackethastwoholesfortheforelegsandisfastenedaroundthetorso withVelcrofasteners.

Figure 2.11 : Fasteningjacketforrats;A:Analog partofthesensor;B:Digitalpartand microcontroller;C:Batterypack

33

Realtimeanalysisofultrasonicrodentvocalizationsonwearablesensornodes

34

Chapter3.Experiment

3 Experiment
3.1 Introduction
Thepurposeoftheexperimentwastotestthesensorinalaboratoryenvironmentwith realanimals.Sincethesensorwasbuilttorecord,analyzeandclassifyratvocalizations, anexperimentalparadigmwaschosenwheretheoccurrenceofvocalizationbehaviorin ratswasmostprobable.Inamatingcontext,bothmaleandfemaleratsvocalizeona regularbasis,usingmostpartsoftheirvocalrepertoire. Totestthezerocrossinganalysismethodusedinthiswork,Ihadtoshownthatallthe informationinaratcallthatiscrucialforclassificationcouldbeextractedfromthesensor data.Theexperimentwouldthusbesuccessfulifthesamevocalizationtypescouldbe identified either through a reference recording or with help of the sensorobtained datasets.Whichparametersarenecessaryforeitherclassificationapproachisofminor importanceaslongasbothmethodsgivecongruentresults. Thisexperimentalsotriestogiveananswertothequestionofwhetherthecustomtailored sensorjacketinterfereswiththenaturalbehaviorofthewearingrat.Itwashypothesized thatifnocopulationoccurredduringthewholetimeoftheexperiment,thejackethada strongobstructiveinfluenceontheanimals.

35

Realtimeanalysisofultrasonicrodentvocalizationsonwearablesensornodes

3.2 MaterialandMethods
3.2.1 Subjects
Thesubjectswere8maleand2femaleratsofthe SpragueDawleystrain,bredinthe coloniesmaintainedbytheUniversityofTbingen,DepartmentofZoology.Theirages rangedfrom76to111daysonthefirstdayoftheexperiment.Subjectswerehousedin twogroupsoffourindividualsforthemalesandinonegroupoftwoanimalsforthe females,usingstandardlaboratorycages('EurostandardIV',595x380x200mm).All subjects were sexually mature but had neither conducted in mating nor in any other experimentalcondition. Housingconditionsincludeda12/12light/darkcycle,anambientroomtemperatureof20 degreesCelsiusandarelativeairhumidityof50%. Beforetesting,allratswerehandledbytheexperimenteronthreeconsecutivedaysfor10 minuteseach.Ondayfourtosixthemaleratsweretrainedtowearthesensorjacketfor10 minuteseachdaywhilefemaleratswerehandledagain..

3.2.2 Apparatus
Thematingchamberconsistedofa47x47x44cmPlexiglascompartmentwithagray plasticfloorandnocover.Itwasilluminatedonlybylowambientroomilluminationand waswipedcleananddisinfectedaftereachtrial. SoundrecordingsweredoneusingaBrel&Kjr1/8''condensermicrophonetype4138 suspended 44 cm above the center of the test chamber, facing downwards. It was connectedthroughtheadapterUA0036totheflexibleextensionrodUA0196,whichin turnconnectedtoanImpulsePrecisionSoundLevelMeterType2204(allpartsBrel& Kjr,Denmark).ThePrecisionSoundLevelMeterwasusedtoamplifythemicrophone signalandwasattachedwithaselfmadeexternalfirstorderhighpassfilterthathada cutofffrequencyof5kHz.SignalswerethenrecordedusingaTraceAlphasoundcard (Marian,Germany)atasamplerateof190890Hzand16bitresolutiononapersonal computer(IntelP43GHz,1GBRAM)usingWindowsXPProfessional.Recordingswere

36

Chapter3.Experiment

storedinindividualfilesofapproximately90secondsinlengthusingMathworksMatlab R2009a. Asecondpersonalcomputer(AMDXP1800,1GBRAM)runningSUSELinux9.3was attached with the Radiocrafts module N601R1 and acted as receiver for the ratborn sensornode.Itexecutedtheselfmadeprogramsthatwerefurtherdescribedinchapter 2.4.3. Computerclocksweresynchronizedevery16secondsusingtheNetworkTimeProtocol (NTP).

3.2.3 Procedure
Malesubjectsweresuitedwiththesensorjacketandthenplacedinthematingchamber. Theyweregivena10minutehabituationphaseinwhichtheycouldexplorethecageand getusedtothejacket.Afterhabituationonefemaleratwasplacedinthechamberand bothanimalsweregiventhechancetointeractwithoutrestrictionsfor10minutes. Soundrecordingsweretakenfromtheentiretimeofthetrial,includingthehabituation phase.However,whenunexpectedbehaviorintheratsoccurred(i.e.problemswiththe jacket) sound recordings were marked as invalid for the duration of the unnatural behavior. Alleightmalesubjectsweretestedsubsequentlywiththefemalestakingturnsandthus participatinginfourtrialsperdaywith30minutesofrestingtimebetweentrials. Measurementsweretakenouton9daysinthelast5hoursofthesubject'slightcycle. Mountboutswererecordedbyhand. Ifonetries tomeasurecopulatorybehavior,itisofcrucialimportancetocontrolthe estrouscycleofthefemalerattomakeitreceptiveforthemale.Normallythisisdoneby injecting estrogen and progesterone to induce the heat in the female. In this work, however,itwasofminorimportanceifcopulationorfertilizationoccurred,sinceforemost the produced vocalizations were of interest for this study. Therefore no invasive techniqueswereusedtoobtainthedata.

37

Realtimeanalysisofultrasonicrodentvocalizationsonwearablesensornodes

3.2.4 Dataanalysis
Foreverysoundrecordingwithalengthofapproximately90secondsaspectrogramwas calculated and plotted together with the temporal corresponding sensor data. Spectrograms were compiled using a Fast Fourier Transform (FFT) with Hamming window,1024pixelresolutionandawindowoverlapof87.5%.Withtheusedsamplerate of190890Hz,thisresultsinatemporalresolutionaround0.67ms. Ultrasonicvocalizationswerethenidentifiedbyhandandassignedtothecorresponding sensordata.Foreveryidentifiedratcallthefrequencypointswiththehighestamplitude pertimeunitwereusedforfurtheranalysis.Withthisdata,thefrequencyandtimeofthe highestamplitude,minimalandmaximalfrequencies,bandwidthanddurationofthecall werecalculated.Inadditiontothis,callswereclassifiedbyhandusingthecategories LongCall,50kHzShortCall,FMShortCall,StepCall,andHighFrequencyCall.These categories camefrom theexpected vocalizationbehavior inamating context, as was outlinedinchapter 1.3.Furthervocalizationsthatoccurredduringtheexperimentwere classifiedintotheselfdefinedcategories30kHzLongCall,Screams,andUndefined. Onlycallswithcorrespondingsensordatawereanalyzed. Thesensordatathatresultedfromacallconsistedofatleastonevaliddatasetofthe20 frequencyclusterswithatleastoneclusterbeingabovethesensorevaluatedthreshold (please refertochapter 2.4.1 forexplanation).Withthis data,theclusternumberand corresponding time of the highest cluster value, the mean active cluster, and the bandwidthoveractiveclusternumberswerecalculated. ResultswerethentestedwithaDiscriminantanalysisandanaiveBayes11 classification method for explanatory power regarding the call category. In addition to this, nonparametricdecisiontreeswerecalculatedthatclassifycalldatasetsintotheircategory usingtheavailablevariables.Allclassificationattemptswerecarriedoutseparatelyfor sensorandreferencerecordings,andwereevaluatedusingan8foldcrossvalidationfor eachmethod.
11 ABayesclassifierisbasedsolelyonsimpleBayesianreasoning(Bayes,1763).Itiscalledanave classifierbecauseitoperatesonthestrictassumptionthatthefeaturesofclassesarefullyindependent, thereforeclasseshavingnostatisticalrelationtoeachother.Eventhoughthismightseemtobeanover simplification,naveBayesclassifierscompeteverywellwithmuchmoresophisticatedclassification methods(Rish,2001),whilebeingmoreintuitivetounderstandfrommypointofview.Furthermore,the distributionoffeaturescanbespecified(e.g.Gaussian)orthekernelcanbeestimatedbyBayesianrules aswell.InthisworkItestedandcomparedeitherapproaches.

38

Chapter3.Experiment

For data analysis andplotting ofthe figures showingdatasets andresults Mathworks MatlabR2009lnx64forLinuxwasused.Forthementionedclassificationmethodsthe statisticaltoolboxofMatlabwasused.Itsonlinehandbook(Mathworks,2010)statesthat methodsofMitchell(1997),Vangelisetal.(2006),andJohn&Langley(1995)wereused fortheNaiveBayesclassandthatitmakesuseofthemethodsdescribedinBreimanetal. (1984)fordecisiontreecalculation. Minimalandmaximalfrequencies,bandwidth,anddurationofthecallsidentifiedonthe referencerecordingswerecalculatedusinga15dBcriterion.Thismeansthatacallwas defined to consist only of those points whose amplitude shall be in the range of A A max 15 dB . Forsensorrecordings,a1/3criterionwasdefined.Thismeansthatthebandwidthsover activeclusterswerecalculatedusingthoseclusterswhosevaluesshallbeintherangeof C C max C max .Sincetheminimalvalue,aclustermusthavetobecomeactiveisfour 3

times the clusterthreshold(please refertochapter 2.4.1),all calls whicharetrue for C max 4 wereexcludedfromanalysis. 3

39

Realtimeanalysisofultrasonicrodentvocalizationsonwearablesensornodes

3.3 Results
Intotal,146120sensorsampleswerecollectedthroughouttheexperiment.39742ofthem hadnocorrespondingreferencerecording,6881hadafaultyreferencerecordingand8420 wereexcludedduetounnaturallyjudgedbehavioroftherats (e.g.problems withthe jacket). Thisleaves91077sensorsamplesthatwerecomparedtothereferencerecordingsandthus analyzedforratcalls. 1246 calls could be identified on the reference recordings and assigned to their correspondingsensorsamples.However,only700ofthesecallswerefurtheranalyzeddue totheissuethatnotalldesiredparameterscouldbeextractedfromthesensordata. BecausecallsfromthecategoriesScream,StepCallandHighFrequencyCallwererarely recorded,theyweremergedwiththecategory'Undefined'forstatisticalanalysis. Ontwoconsecutivedays,twomalesubjectsrepeatedlymountedtheirfemale.Oneofthe femaleswassuccessfullyfertilizedandgavebirthto8pupsthereupon. InthefollowingsubsectionsIwillfirstgiveanoverviewoverthedifferentcalltypesthat wererecorded.Aprototypeforeachcalltypewillbepresentedinasonagramthatwas calculatedbytheFFTanalysisandadensityplotofthedatasetsproducedbythesensor thatrepresentthesamecall.Afterthat,theresultsoftheclassificationproceduresapplied tothereferencerecordingsandthesensorrecordingswillbepresentedinthelasttwo subsections.

40

Chapter3.Experiment

3.3.1 LongCall

Figure 3.1 : ExtractfromaLongCallrecording.Top:Referencemicrophone(FFT); Bottom:Sensorrecordings Intotal,148ofthesecallswereanalyzed.Someofthemconsistedofseveralconsecutive callfragments,sometimesfrequencymodulatedatthebeginningofeachfragmentwhere thefirstfragmentwasmostfrequencymodulated.Figure3.1showsafragmentthatisonly slightlymodulatedinfrequency,somethingthatisnotvisibleinthesensordataduetothe coarsefrequencyclustering.Spectrogramandsensordataalsoshowthehighamplitude modulationthatistypicalforthiscalltype. Thiscalltyperangesfrom18to34kHzbuthasameanamplitudepeakfrequencyof23.5 kHzandameanbandwidthof3kHz.Thedurationhasamedianof1.54seconds,butcall trainswithalengthofupto9.4secondswerealsofound.Onefragmentcallscouldbeas shortas150ms.

Figure 3.2 : HistogramofthedurationsofallrecordedLongCalls 41

Realtimeanalysisofultrasonicrodentvocalizationsonwearablesensornodes

3.3.2 ShortCall

Figure 3.3 : Atypicalexampleforarecordingofashortcall.Top:Referencemicrophone (FFT);Bottom:Sensorrecordings

Figure 3.4 : Atypicalexampleforarecordingofashortcall,FMsubtype.Top: Referencemicrophone(FFT);Bottom:Sensorrecordings

42

Chapter3.Experiment

Intotal,534callsofthistypewereanalyzed.Theycouldbeeitherconstantinfrequency (Figure3.3)orslightlyfrequencymodulated(Figure3.4). Themeanamplitudepeakfrequencywas54.1kHzwithameanbandwidthof4.4kHz. Thefrequencyrangeforthiscalltypebeginsat36.9kHzandendsat69.5kHz.The durationofasinglepulsevariedbetween5msand443mswithamedianof37.2ms. Thechangeoverbetweenconstantfrequencyandfrequencymodulatedsubtypesofthe shortcallcouldnotclearlybedeterminedintermsoffrequency,bandwidthorduration. Becauseofthissmoothtransition,itwasnotpossiblefortheunexperiencedexperimenter todistinguishbetweenthetwotypes.Thereforenodifferencewasmadeandallshortcalls wereclassifiedintothesuperordinatecategoryonly.

Figure 3.5 : HistogramofthedurationsofallrecordedShortCalls

43

Realtimeanalysisofultrasonicrodentvocalizationsonwearablesensornodes

3.3.3 Scream

Figure 3.6 : RecordingsofaScream.Top:Referencemicrophone(FFT);Bottom:Sensor recordings DuringthisexperimenttheScreamcalltypewasrecordedtwice.Thefrequencyranged from1.7kHzto3.2kHzand1.9kHzto4.1kHzrespectively.Thiscalltypeisrelatively constantinfrequencyandamplitudeandisasignalofmultipleharmonicswiththefirst harmonic below2kHz.Thedurationwasonly7ms forrecording1and170msfor recording2(Figure3.6).

44

Chapter3.Experiment

3.3.4 30kHzCall

Figure 3.7 : Atypicalexampleforarecordingofa30kHzcall.Top:Reference microphone(FFT);Bottom:Sensorrecordings Intotal,8recordingsofthiscalltypecouldbeobtainedinthecauseofthisexperiment. Thissignalsvariesbetween28.7to40.3kHzandhasitsmeanamplitudepeakfrequency at34.1kHzwithonly0.25kHzofmeanbandwidth.Thesignaldurationliesbetween20 msand280mswithanaverageof113ms. Itisasignalofveryconstantfrequencywithamoderatemodulationinamplitude.Itis verysimilartoaLongCall,butliesinanotherfrequencybandanddoesnotappearto occur in trains of signal components. There was also no evidence of a frequency modulatedstartofthesignal.

45

Realtimeanalysisofultrasonicrodentvocalizationsonwearablesensornodes

3.3.5 StepCall

Figure 3.8 : AnexampleforarecordingofaStepCall.Top:Referencemicrophone(FFT); Bottom:Sensorrecordings Four calls of this type could be recorded and analyzed. The Step Call features two components,oneshortpulseatafrequencyaround50kHzandalongersignalbetween30 kHzand40kHz.Theshortpulsecanleadorfollowthelongersignal,butnocasewas observedwheretwoshortpulsesoccurredtogetherwithonelongersignal.Threeofthe fourcallsoccurredincloseproximitytoeachotherasatrainofsignalswiththeshort pulsebeforethelongersignal.Thefourthrecordingoccurredasanisolatedsignalandhad theshortpulsetailingthelongersignal. Thelongersignalslieinthepropertyrangeofthe30kHzcalltypedescribedinthe previouschapterwithexceptionofthefourthrecordingwhichhadaslightlyfrequencyup modulatedtailinthelowfrequencycomponent.

46

Chapter3.Experiment

3.3.6 HighFrequencyCall

Figure 3.9 : SectionofaHighFrequencyCallrecording.Top:Referencemicrophone (FFT);Bottom:Sensorrecordings Intotal,3callsofthistypecouldbeanalyzed.Allrecordingsarerelativelyshortwith durationsbetween34msand61msbutdifferinfrequencymodulation.Thebandwidth thusvariesbetween0.58kHzand2.65kHz.Theamplitudepeakfrequencyofthesignals liesbetween74.8kHzand85.8kHz.Allthreesignalsareeitherhighlymodulatedin amplitudeorcompiledofveryshortsinglepulsesthatoccurintrains.Figure 3.9 only showsasectionofaHighFrequencySignal,sinceallthreeassociatedsensorrecordings wereincomplete.

47

Realtimeanalysisofultrasonicrodentvocalizationsonwearablesensornodes

3.3.7 Classificationofthereferencerecordings
Afteracarefulevaluationoftheobtainabledata,twovariables,peakamplitudefrequency andbandwidth,werechosenforclassificationofthedifferentcalltypes.Allcategories clusternicelyusingonlythesetwoexplanatoryvariables.Forreasonsexplainedinchapter 3.2.4,allcalltypesbutthemajorcategoriesofLongCall,ShortCalland30kHzwere mergedinthecategoryUndefined.

Figure 3.10 : Clusterdiagramofthefourremainingcallcategories Cross validation for a linear discriminant analysis yielded an error probability of p LDA= 0.0457 Foraquadraticdiscriminantanalysistheerrorprobabilityis pQDA= 0.03 A naive Bayes classifier with a Gaussian kernel distribution reaches the level of pnbGAU =0.0114

48

Chapter3.Experiment

Undertheassumptionthatthevariablesfromeachclassdonothaveamultivariatenormal distribution,anaiveBayesclassifierwithakerneldensityestimationwasadditionaly calculated.Itresultedinthelowesterrorprobabilityof pnbKDE= 0.0029 . Figure3.11showstheregionsofexplanatoryvariablesthatleadtoclassestimations,and table3.1theconfusionmatrixoftheclassifier.

Actual\Predicted LongCall Undefined 30kHzCall ShortCall

LongCall 148 0 0 0

Undefined 0 9 0 0

30kHzCall 0 0 8 0

ShortCall 0 1 0 534

Table 3.1 : ConfusionmatrixofthenaiveBayes(KD)classifier:Resubstitutionresults

Figure 3.11 : ClassestimationofthenaiveBayesclassifierwith kerneldensityestimation. pnbKDE= 0.0029 Calculationofanonparametricdecisiontreeforclassestimationresultedinatreewith7 terminalnodesandacrossvalidationerrorprobabilityof p DT =0.01 .

49

Realtimeanalysisofultrasonicrodentvocalizationsonwearablesensornodes

Totestwhetherthegeneratedtreeoverfitsthetrainingset,theratioofcrossvalidation error and minimal resubstitution error probability was calculated for every possible numberofnodes.Thesimplesttreewhosecrossvalidationerrorprobabilitywaswithin onestandarderroroftheminimumwaschosentobethepreferred.Thissimpleruleagain resultedin7terminalnodesfortheoptimaldecisiontreewhichcanbeseeninfigure3.12 andhasthecorrespondingconfusionmatrixintable3.2.

Figure 3.12 : DecisionTreeforclassestimationwithacrossvalidationerrorprobability of p DT =0.01 ;F=peakamplitudefrequency[kHz];B=bandwidth[kHz]

Actual\Predicted LongCall Undefined 30kHzCall ShortCall

LongCall 148 0 0 0

Undefined 0 10 0 0

30kHzCall 0 0 8 0

ShortCall 0 0 0 534

Table 3.2 : ConfusionmatrixoftheDecisionTreeclassifier:Resubstitutionresults

50

Chapter3.Experiment

3.3.8 Classificationofthesensorrecordings
Foreverycallidentifiedwiththehelpofthereferencerecording,thereexistsasensor recordingthatcanbeusedtoachievethesameclassificationresult. After a comparison by hand of the obtainable variables calculated from the sensor recordings,twowerechosentobestclusterthedifferentcalltypes.TheMeanBestCluster istheaveragefrequencyclusterofthewholesensorrecordingthatdescribesthecall, where the average was calculated over the most active cluster from every temporal window. The second variable is the Cluster Bandwidth whichwas defined in section 3.2.4.

Figure 3.13 : Clusteringofcalltypesusingsensordata

Cross validation for a linear discriminant analysis yielded an error probability of p LDA= 0.1443 A quadratic discriminant analysis works less well with an error probability of pQDA= 0.2529

51

Realtimeanalysisofultrasonicrodentvocalizationsonwearablesensornodes

A naive Bayes classifier with a Gaussian kernel distribution reaches the level of pnbGAU =0.0286 Undertheassumptionthatthevariablesfromeachclassdonothaveamultivariatenormal distribution,anaiveBayesclassifierwithakerneldensityestimationwasadditionally calculated.Itresultedinthelowesterrorprobabilityof pnbKDE= 0.0257 . Figure3.14showstheregionsofexplanatoryvariablesthatleadtoclassestimationsand table3.3theconfusionmatrixoftheclassifier.

Actual\Predicted LongCall LongCall Undefined 30kHzCall ShortCall 147 2 0 0

Undefined 0 2 0 1

30kHzCall 1 0 5 0

ShortCall 0 6 3 533

Table 3.3 : ConfusionmatrixofthenaiveBayes(KD)classifier:Resubstitutionresults

Figure 3.14 : ClassestimationofthenaiveBayesclassifierwith kerneldensityestimation. pnbKDE= 0.0257

52

Chapter3.Experiment

Calculationofanonparametricdecisiontreeforclassestimationresultedinatreewith14 terminalnodesandacrossvalidationerrorprobabilityof p DT =0.0314 . This treewasalsotestedforoverfittingofthetrainingsetasitwasdescribedinthe previouschapter.Thetestresultedintopruningthetreebacktoonlythreeterminalnodes. Itthuslosttheabilitytodiscriminateallcallcategories,butthecrossvalidationerror nonethelessdecreasedto p DT2=0.0257 . Theresultingdecisiontreeisdepictedinfigure3.15andhasthecorrespondingconfusion matrixintable3.4.

Figure 3.15 : DecisionTreeforclassestimationwithacrossvalidationerrorprobability of p DT2=0.0257 ;F=MeanBestCluster

Actual\Predicted LongCall Undefined 30kHzCall ShortCall

LongCall 148 3 1 0

Undefined 0 0 0 0

30kHzCall 0 2 4 0

ShortCall 0 5 3 534

Table 3.4 : ConfusionmatrixoftheDecisionTreeclassifier:Resubstitutionresults

53

Realtimeanalysisofultrasonicrodentvocalizationsonwearablesensornodes

3.4 Discussion
3.4.1 Recordedvocalizations
Themajorityoftherecordedvocalizationswereexpectedinthisexperimentalsetup.In chapter 1.3.1,apostejaculatorysongthatmainlyconsistsof22kHzvocalizationswas described.Furthermore,itwasnotedthatbothmaleandfemaleratsfrequentlyemit50 kHzvocalizationstoattractthesexualcounterpart.Itisthereforenotasurprisingresult, thatmostlyLongandShortCallscouldbeidentifiedontherecordings.Thenumberof Short Calls, however, is much bigger than that of Long Calls, which can easily be explainedbyconsiderationoftheoccurrenceofmountbouts.Asoutlinedinchapter3.3, mounting and thus possible ejaculation occurred only on two consecutive days, thus reducingthetime22kHzsignalswereexpected. WhilethenumberofShortandLongCallsfallwellintotherangeofexpectation,the30 kHzCallsdonot.Thiscalltypecannotbeexplainedthroughliterature,whileitisclearly distinguishablefromtheothercalltypes.Itispossiblebutunlikelythatalleightrecorded 30kHzcallsareactuallyfragmentsofStepcallsthatlosttheirhighfrequencypartdueto anincompleteordefectiverecording.Stepcalls,ontheotherhand,werenotexpectedina matingparadigmeither.Giventheverysmallnumberofsamples,itseemsplausiblethat somethingelsecausedtheproductionofthesesignals,notthematingbehavior.Theexact reasonoftheoccurrencesofthiscalltypeisofminorimportanceforthisstudy,therefore thisquestionremainsunaddressed. The last calltype,whichoccurredrarelyandwas thereforemergedintothecategory 'Undefined'fordataanalysis,istheHighFrequencyCall.Thiscalltyperesemblesthe previously(chapter1.3)describedInfantCalltoalargeextentandwouldthusnormallybe interpreted as a pup's vocalization. However, no rat pups were present during the experiment, although subjects were generally young. At start of the experiment, the youngest subject was 76 days of age, close to the border of maturity. It is therefore possible,thatatleastoneoftheanimalswas,infact,notmaturewhenexperimentsbegun. Whetherornotthisinfluencedthefertilizationrateisofminorimportance,sincethe experiment mainly tried to excite vocalization emittance. From this point of view, recording some infant calls in a veryhigh frequency rangewas of advantage forthe conclusionofthisstudy,sinceawiderrangeofdiscriminablesignalscouldberecorded andanalyzed.

54

Chapter3.Experiment

3.4.2 Jacket
Itseemsobviousthatajacketofanytypeconstrainsthewearinganimal'smovementsand thereforeitsbehavioralpatterninginsomeways.However,itwasbelievedthatwitha small, lightweight sensor fixation the resulting interference to the animals behavior wouldbeminimal. Inthisstudy,animalsweregivenatotalhabituationtimeof20minutesdistributedover twosessionstogetusedtothejacketbeforeexperimentsbegan.Thisveryshorttime seemed to be sufficient for the rats to adapt to the new situation as they resumed explorationbehaviorveryquickly.Mostofthesubjectsshowedverylittle,ornoresistance againstthevestingorthejacketwhenalreadyvested,supportingtheconclusionthatthe experienceofwearingthesensorfixationwasnotentirelyunpleasantforthesubjects. Someanimals,however,eventuallytriedtostripoffthevestduringtheexperimentwhich resultedinseriouscomplicationsthatrenderedpartsoftherecordingsinvalid.Onesubject repeatedly entangled itself with its claws caught up in the soft part of the Velcro fasteners.Ithadtobefreedbytheexperimentersincetheposethesubjectwascaughtin immobilizedtheanimalcompletely.Intwoothercasesthisissueoccurredwhilevesting the animals. It is therefore proposed that further developments of the sensor fixation shouldbeconstructedwithouttheuseofVelcrofasteners. Whendismountingthefemale,vestedmalesoftenfelloverbackwards,landingontheir backduetotheweightofthejacketandthelackofflexibility.Eventhoughnoobvious disorientationorotherimpairmentoftheanimalsbehaviorcouldbeobserved,itshouldbe emphasizedthatsuchconstraintsresultingfromthesensorfastingcouldbedrastically reducedthroughenhancementsintermsofweightandsizeofthejacket. Still,sincetheexperimentresultedinasuccessfullyfertilizedfemale,eventhoughno hormonesweregiventoincreasethechanceofperception,itcanbeconcludedthatthe current sensor jacket obstructed the subjects only to a small degree in their natural behavior.Itisthereforebelievedthatbehavioralexperimentsandlargescaleobservations ofvestedratsarepossible,butdoalsoraisemorequestionsthatwillbediscussedin chapter4.1.

55

Realtimeanalysisofultrasonicrodentvocalizationsonwearablesensornodes

3.4.3 Sensorperformance
Theresultsoftheconductedexperimentsclearlyshowthatadiscriminationofatleastthe twomajorcallcategories,ShortCallandLongCall,ispossiblewhensolelyusingsensor data.Theperformancesoftheclassifiersbasedonsensordataareonlyslightlyworsethan thosebasedonthereferencerecordings.Ofthe700recordedvocalizations,only14(2%) weremisclassifiedusingtheastonishingsimplenonparametricdecisiontree(figure3.15). Eventhoughuntilnowonlythreeclassesofvocalizationcouldbetested,thissupportsthe conclusion that it is indeed possible to classify rat vocalizations using the method describedinthiswork. However,someissueshaveyettoberesolvedbeforeanautonomousclassifyingsensor nodecanbeconstructed. 1. Theparametersusedforclassificationseemtobenonoptimalsincenotallcall types can clearly be differentiated from each other. There are two possible explanationsforthis,thefirstbeinganoverlyextensivedatareductionduringdata acquisitionthroughthemethoddescribedinthiswork.Itispossiblethatnecessary informationtoclassifythedifferentcalltypeswaslostduringprocessinganditis thereforeimpossibletodiscriminatethetypesofcalls,justasitisimpossibleto reconstructtheoriginalsignalfromthesensorrecordings.Thisisduetothepresent ADconversionconductedinthepresentzerocrossingapproachwhichdisregards theamplitudeinformationoftheoriginalsignal.Theseeminglyrigorousapproach towardsamassivedatareductionisduetothedesignconstraintsforthesensor systemthatwereexplicitlyoutlinedinchapter2anditssubsections.Ontheother hand,thesignalsthathavetobeprocessedinthisworkarefairlysimplecompared tootheracousticalsignalslikebirdsongsorhumanspeech,whichfeaturenotonly massivefrequencyandamplitudemodulation,butalsoenormousvariability.Itis thereforeemphasizedthattheconsiderabledatareductionofthiswork'sapproach still conserves enough information for a classifier to discriminate between the differentcalltypesofratsorotheranimalsthatproducefairlysimplesounds.Atthe same time this would mean that better parameters that are necessary for a successfulclassificationbasedonsensordatahaveyettobeidentified. 2. Inthedesignofthepresentprocessingapproachitwasacrucialprerequisitethatall recordedvocalizationshaveanamplitudesignificantlyabovenoiselevelinorderto prevent the phenomenon of stochastic resonance to have an influence on the

56

Chapter3.Experiment

recordings.Furthermore,callsrecordedbythesensorshouldbeassignabletoone specificanimal.Itisevidentthatasensorsuspendedbetweentheearsofthetagged animalrecordsnotonlysoundsemittedbythecarryingsubject,butalsoreceives signals from every conspecific and every vocalizing creature in range. This, however, would render most of the recordings collected in an uncontrolled environmentunusablewithoutthepossibilitytodifferentiatebetweengoodandbad samples. A possible solution to this dilemma would be to solely analyze bone soundsofthetaggedanimal.Thiswouldinsulatetherecordingsystemfromthe outerenvironmentwhileitstillcouldrecordsignalsemittedbythetaggedanimal, possiblywithevengreateraccuracythananexternalsensor.Apartfromthefactthat thiswouldbeaninvasivemethodtotagtheanimals,itwouldsimultaneouslysolve someissuesarisingthroughthevestingoftheanimalsasthewholesensorcouldbe implemented.However,furtherinvestigationsinthefieldofbonesoundrecordings hadtobemadetoclarifythequestionsofweatherandhowultrasoniccallscouldbe classifiedthroughsuchrecordings. 3. Anotherissueoccurswhentwosignalsoverlap,becausethezerocrossinganalysis onlygivesanestimationofthefundamentalfrequencyoftheunderlyingsignal. Thatistosay,whenevertherearesignalswithmorethanonehighenergyfrequency component, the result given by the analysis method depends on the amplitude relationofthedifferentcomponents.Sincetheamplitudeinformationisnotstored inanyway,itisunclearifoverlappingfrequencycomponentscouldbeidentified afterprocessingsolelythroughthezerocrossingvaluethatisbasedonthem.This meansthatcomplexsignalsarenotonlydifficulttoprocess,butfurthermoregive resultsthataresohardtopredict,thatthey,totheknowledgeoftheauthor,would render all usual classification attempts unfeasible. Again, using bone sound recordings could solve this issue as long as the assumption is correct that an ultrasonic call recorded through bone sound differs substantially from all other types ofsoundtheanimal's bodywouldproduce.Thenitwouldbepossibleto extractthedesiredsignalfrombackgroundnoiseusinganalogfilters,asitisalready doneinthepresentsystem. 4. Eventhoughtherewasnoobviousobstructionoftheanimals'behaviorrelatedto thesizeandweightofthesensor,itshouldbenotedthatextensiveenhancementsof thehardwarearepossible.Ifitweren'tfortheproblemofoscillationofthecircuitry, thehandmadesensorcouldhavebeenhalfthesizethanitwasdescribedinthis work.Furthermore,muchsmallercomponentsforacircuitassemblyexist,butare

57

Realtimeanalysisofultrasonicrodentvocalizationsonwearablesensornodes

nothandsolderable.Themostelaboratewayofbuildingsuchasensorwouldbeto designcustomchipsthatdothejob.Withthistechnique,sizeandweightofthe systemcouldbereducedinsomeorderofmagnitudeswhilekeepingthedesired functionality the same. However, in the current state of the project, the advancementsresultingthroughsuchminiaturizationattemptswouldnotbefully worththeeffortnecessarytocreatethem.

58

Chapter4.GeneralDiscussion

4 GeneralDiscussion
4.1 Adaptabilityofthesystemtonaturalenvironments
Itwasshowninthisworkthatthedevelopedsystemhasahighpotentialforauseasa mobileandautonomous working sensorthatcandetectandclassifyratvocalizations. Furtherconstraintsthanthosediscussedinthepreviouschaptersarisewhenwildanimals areobservedusingthistechnique.Apartfromthequestionofhowtoattachawildanimal withasensorsuchasdescribedinthiswork,morechallengesariseinanuncontrolled outdoorenvironmentforasensornetworktofunctionproperly. 1. ReliabilityoftheHardware Evenifataggedanimalisnotabletostripoffthesensorbyitself,itisstillpossible that other conspecifics can do so. Rats have sharp teeth and claws that could damagethehardwareveryeasily.Thesensorfixationisanevenbiggertargetfor disentanglementmaneuverswhileitisamorefragiletargetaswell.Thecurrent jacketwastailoredoutofsoftleather,amaterialthatgivesgreatstabilitywithgood endurance, yetit canbe easilydisintegrated byrodent teeth. Thereforeabetter materialmustbefoundthatpersistslonger,orthesensorfixationhastobereplaced byimplantationofthesystem. 2. LongTermwearabilityofthesystem Itshouldbenotedthattheprimaryaimofanobservationinanaturalenvironment wouldbealongitudinalstudywhichcouldlastyearsinextremecases.Therewith originatesthenecessitytotagindividualanimalsforthewholelengthofsuchan experiment.Avestorjacketthatholdsthesensorcomponentsmustnotonlylastthe wholetime,itmustprimarilynotharmthewearinganimal.Atleastonekindof behavior,groomingthecoatedbodypartsthatis,canneitherbeexecutedbythe vestedanimalnorbyconspecifics.Ifpartsofthebodycannotbegroomed,they cannotbecleanedandbecomeanexcellentmediumforbacteriaorfungiovertime, nottomentionthediscomfortfortheanimalthatariseswhenpartsoftheskinand

59

Realtimeanalysisofultrasonicrodentvocalizationsonwearablesensornodes

furareinaccessibleforittoclean.Thisgivesagainrisetotheconclusionthatan implantedsensorhas,apartfromtheinvasivenessofsuchanimplantation,many advantagesoverasensorjackettovesttheanimals. 3. InfluenceonBehavior The previouslydiscussed points imply a general assumption about a certain discomfortananimalhasbywearingthesensor.Itisaconclusionofcommonsense thatthesensor,especiallybyitsfixation,obstructsthewearinganimalinacertain way.Thatthisbringsalongsomeimplicationsontheanimals'behaviorisalmost certain.Foranobservationofbehaviorinanaturalenvironment,itisofcrucial importance that no behavioraltering techniques are used that would render the wholeobservationpointless.Eventhoughnoheavyobstructiveeffectonmating behaviorcouldbemeasuredinthiswork'sstudy,itisstillpossiblethatthesensor systemhasaneffectontheanimalsbehavior,forexamplewhenitmovesinsideits burrowsystem.Itwillnotbepossibletoeliminatethisobjectioncompletely,but everythingshouldbedonetopreventapossibleinfluenceofthemethodonthe variablesthathavetobemeasured.Thisincludesfurtherminiaturizationofthe system and moreover does not prefer a sensor jacket over other techniques for sensorfixation. 4. Powermanagement Eventhoughthesystemdescribedinthisworkwasespeciallydesignedtoconsume aslittlecurrentaspossible,powerresourceswouldeventuallyrunoutinalongterm observation.Thereforewaysmustbefoundthatenabletheresearchertorecharge the sensorbatteries,preferablywithoutinterference inthe wildbehavior ofthe wearinganimal.Thiscouldbedonebysettinguparechargestation,forexampleat afeederthatisfrequentlyvisitedbytheanimals.Inalargecolony,however,some animalswouldnevervisitsuchastation,astheyaresuppliedbyotherconspecifics. Thereforefurtherworkisneededtofindasolutionforthischallenge. 5. RadioTransmissionandRouting Thesensordescribedinthisworkbroadcastsallavailabledatawithoutcheckingfor an available receiver whenever the internal flash space is fully occupied. This approach for radio transmission of data works well in a controlled laboratory

60

Chapter4.GeneralDiscussion

environmentwithonlyonetransmitterandareceiverthatisalwaysinrange.Itisof course not feasible for a natural environment, where network connectivity is expectedtobehighlyinfrequentandmultiplesensorstrytosendatonce.Therefore ahighlyvariableroutingstructuremustbefound,whichenablessensornodesto transmittheirdataeveniftheyarenotindirectrangeofanaccesspoint.Apossible solutionforsuchasparse,dynamicnetworkarchitecturewasalreadyproposedby one of my colleagues (Viol, 2009). However, this induces a great amount of transmission overhead as the individual nodes have to constantly maintain the routingstructureandeachindividualnodehastoreceiveandtransmitdataona regularbasis.Becauseradiotransmissionconsumesmoreenergythananyother process the sensor node has to fulfill, power management issues are even aggravatedbyintroducingaworkingradioprotocolfordatarouting.

61

Realtimeanalysisofultrasonicrodentvocalizationsonwearablesensornodes

4.2 Thelaststeptowardsanautonomoussensornode
Intheexperimentconductedthroughoutthisstudy,aclassifierwastrainedtodiscriminate betweendifferentvocalizationtypes.Thetrainingdatawasobtainedbyidentifyingthe meaningfulsamplesbyhand,clusteringthemintodatasetsthataccountforaspecificcall. Thedatathatwasactuallyusedtotraintheclassifierresemblesafractionoftheoverall datathatwasrecordedbythesensorthroughoutthewholeexperiment.Afirstglimpseat thesamplesthatwereexcludedfromthetrainingsetrevealedonlyweakactivityinmost clusters.Itisthereforebelievedthatitispossibletodistinguishbetweenmeaningfuldata andnoisebasedonsomeactivationpattern. However,noattemptsweremadeinthisstudytoachievethisbymeansofanalgorithm thatcouldreplacetheworkthatwassofardonebyhand.Thereareavarietyofmethods foridentifyingmeaningfuldatainacontinuousdatastream,evenifpatternsthatdescribe thedesignatedregionswereunknownduringtrainingoftheclassifier.Thisdetectiontask ofagoodclassifieriscallednoveltydetectionanditgenerallyenablesanautonomous systemtoadapttonewandthereforeunknownsettings.Astraightforwardapproachto achieve the detection of novel samples is the statistical one, that is, to compute the statistical distance between any sample and the distribution of known classes. In a practical application this task becomes more complicated with multiple classes, high dimensionalityandnoisyfeatures.Furthermoretherehastobeelaborateknowledgeabout the statistical distribution ofclasses toidentify thebeststatistical method fornovelty detectionofunknownsamples(foracomprehensivereviewseeMarkou2003a). Another way of identifying meaningful data and detecting unknown classes is the application of neural networkbased approaches. These artificial neural networks have beenwidelyusedinnoveltydetectionandaregenerallymoreadaptivewhilerequiringless knowledgeaboutthetruecharacteristicsofthemeaningfuldata.However,someissuesfor noveltydetectionaremorecriticaltoneuralnetworkssuchastheircomputationalexpense intrainingandfurtherexpenseinretraining.Therearealsomanytypesofartificialneural networksthathavetobeevaluatedontheirperformancefordifferenttypesofdata(for reviewseeMarkou2003b). Insummary,giventhevarietyofmethodsthatcanbeusedtobuildanautonomousand selflearningclassifier,itcanbeconcludedthatitisindeedpossibletodosoforthe presentwork.Someissues,however,haveyettobesolvedtosucceedinthistask,thatis,

62

Chapter4.GeneralDiscussion

minimizationofthecomputationalexpensethemeetthedesignconstraintsofthesystem describedinthisworkwhileprovidingareasonablygooddetectionandclassification performance.Furtherworkisneededtogiveanswerstothemanyquestionsarisinghere andtodothislastimportantsteptowardsarealautonomoussensornode.

4.3 Conclusion
Thepresentstudyshowsthatitispossibletoclassifythemostfrequentlyoccurringrat vocalizationswithdataobtainedbyasensorthatanalyzestheultrasoniccallswithmeans ofzerocrossingdata. However,thesystemdescribedinthisworkrequiresextensiveenhancementsbeforeitcan be deployed to an outdoor scenario. These enhancements include refinements of the parameterchoiceforclassification,revisionofthecircuitrytopreventoscillationand enable for further miniaturization, reconsideration of the bonding technique used for sensorfixationandmuchmoretestinginordertotrainamorereliableclassifier. Eventhoughmuchworkmuststillbedoneinordertocompletethetaskofestablishinga tinysensorforultrasonicvocalizationanalysis,thefundamentaltechniqueofzerocrossing analysisasapowerfulyethighlyenergyefficientwayofanalyzingsimplesoundswas proventowork.Itisthereforehopedthatthisworkstimulatesfurtherinvestigationsinthis field.

63

Realtimeanalysisofultrasonicrodentvocalizationsonwearablesensornodes

5 References
Adler,N.T.,(1969)Effectsofthemales'scopulatorybehavioronsuccessfulpregnancyof thefemalerat,JournalofComparativeandPhysiologicalPsychology,Vol.69(4), p.613622. AdlerN.T.,AniskoJ.J.,(1979)Thebehaviorofcommunicating:ananalysisofthe22kHz callofrats(Rattusnorvegicus).SexualBehavior,Vol.19,p.493508. AllinJ.T.,BanksE.M.,(1972)Functionalaspectsofultrasoundproductionbyinfant albinorats(Rattusnorvegicus).AnimalBehaviour,Vol.20,p.175185. AndersonJ.W.,(1954)Theproductionofultrasonicsoundsbylaboratoryratsandother mammals.Science,Vol.119,p.808809. AniskoJ.J.,SuerS.F.,McClintockM.K.,AdlerN.T.,(1978)Relationbetween22kHz ultrasonicsignalsandsociosexualbehaviorinrats.JournalofComparativeand PhysiologicalPsychology,Vol.92,p.821829. Barfield,R.J.,Thomas,A.,(1986)Theroleofultrasonicvocalizationsintheregulationof reproductioninrats.AnnalsoftheNewYorkAcademyofSciences,Vol.474,p.33 43. Barnett,S.A.,(1963)TheRat:AStudyinBehavior.TheUniversityofChicagoPress, London,revised1975bytheUniversityofChicago. Baum,P.,(2009)StreamDataMininginWirelessSensorNetworks,Diplomarbeit, DistributedSystemsGroup,RWTHAachen. Bayes,T.,(1763)Anessaytowardssolvingaprobleminthedoctrineofchances. PhilosophicalTransactionsoftheRoyalSociety,Vol.53,p.370418. Beach,F.A.,Jordan,L.,(1956)EffectsofsexualReinforcementupontheperformanceof maleratsinastraightrunway,JournalofComparativeandPhysiological Psychology,Vol.49(2),p.105110. BitschLink,J.A.,Viol,N.,Goliath,A.,Wehrle,K.,(2009)SimBetAge:Utilizing TemporalChangesinSocialNetworksforDelay/DisconnectionTolerant Networking,MobiquitousProceedings,Toronto,ON,Canada,ICST.

64

Chapter5.References

BitschLink,J.A.,Bretgeld,T.,Goliath,A.,Wehrle,K.(2010)DemoAbstract:RatMote ASensorPlatformforAnimalHabitatMonitoring,Proceedingsofthe9th ACM/IEEEInternationalConferenceonInformationProcessinginSensor Networks(IPSN2010),Stockholm,Sweden. Blanchard,R.J.,Blanchard,D.C.,Agullana,R.,Weiss,S.M.,(1991)TwentytwokHz alarmcriestopresentationofapredator,bylaboratoryratslivinginvisible burrowsystems.Physiology&Behavior,Vol.50,p.967972. Blandau,R.J.,(1945)Onfactorsinvolvedinspermtransportthoughthecervixuteriofthe albinorat.AmericanJournalofAnatomy,Vol.77,p.253272. Boice,R.,(1977)BurrowsofWildandAlbinoRats:EffectsofDomestication,Outdoor Raising,AgeExperience,andMaternalState.JournalofComparativeand PhysiologicalPsychology,Vol.91(3),p.649661. Breiman,L.,Friedman,J.,Olshen,R.,Stone,C.,(1984)ClassificationandRegression Trees.BocaRaton,FL:CRCPress. Bretgeld,T.,(2010)RatMote:ANewWirelessSensorPlatformforaSubterraneanAnimal HabitatOberservationSystem,Diplomarbeit,DistributedSystemsGroup,RWTH Aachen. Brudzynski,S.M.,Bihari,F.,Ociepa,D.,Fu,X.W.,(1993)Analysisof22kHzultrasonic vocalizationinlaboratoryrats:longandshortcalls.Physiology&Behavior,Vol. 54,p.215221. Brudzynski,S.M.,Kehoe,P.,Callahan,M.,(1999)Sonographicstructureofisolation inducedultrasoniccallsofratpups.DevelopmentalPsychobiology,Vol.34,p. 195204. Bulsara,A.,Jacobs,E.W.,Zhou,T.,Moss,F.,Kiss,L.,(1993)StochasticResonanceina SingleNeuronModel:TheoryandAnalogSimulation.Journaloftheoretical Biology,Vol.152,p.531555. Burgdorf,J.,Panksepp,J.,(2001)Ticklinginducesrewardinadolescentrats.Physiology &Behavior,Vol.72,p.167173. Burgdorf,J.,Panksepp,J.,(2005)Theneurobiologyofpositiveemotions.Neuroscience &BiobehavioralReviews,Vol.30,p.173187. Burgdorf,J.,Kroes,R.A.,Moskal,J.R.,Pfaus,J.G.,Brudzynski,S.M.,Panksepp,J., (2008)Ultrasonicvocalizationsofrats(Rattusnorvegicus)duringmating,play,

65

Realtimeanalysisofultrasonicrodentvocalizationsonwearablesensornodes

andaggression:Behavioralconcomitants,relationshiptoreward,andself administrationofplayback.JournalofComparativePsychology,Vol.122(4),p. 357367. Burt,W.H.,(1943)TerritorialityandHomeRangeConceptsasappliedtoMammals. JournalofMammalogy,Vol.24(3),p.346352. Calhoun,J.B.,(1962a)Populationdensityandsocialpathology.ScientificAmerican,Vol. 206,p.139148. Calhoun,J.B.,(1962b)A"behavioralsink".pp.INBliss,E.L.(Ed.),RootsofBehavior. NewYork:Harper. Calhoun,J.B.,(1963)TheEcologyandSociologyoftheNorwayRat.WashingtonDC: USDept.HEW,PublicHealthServiceDocumentNo.1008,USGovtPrinting Office. Davis,D.E.,Emlen,J.T.,Stokes,A.W.,(1948)Studiesonhomerangeinthebrownrat. JournalofMammalogy,Vol.29,p.207225. Douglass,J.K.,Wilkens,L.,Pantazelou,E.,Moss,F.,(1993)Noiseenhancementof informationtransferincrayfishmechanoreceptorsbystochasticresonance,Nature, Vol.365,p.337340. Erskine,M.S.,(1989)Solicitationbehaviorintheestrousfemalerat:Areview.Hormones andBehavior,Vol.23,p.473502. Fabritius,G.B.,(2009)BurrowView:PathReconstructionandLocalizationina SubterraneanAnimalHabitatObservationSystem.Diplomarbeit,Distributed SystemsGroup,RWTHAachen. Fauve,S.,Heslot,F.,(1983)StochasticResonanceinabistablesystem.PhysicsLetters, Vol.97(1),p.57. Francis,R.L.,(1977)22kHzcallsbyisolatedrats.Nature,Vol.265,p.236238. Friedman,V.,(1994)AZeroCrossingAlgorithmfortheEstimationoftheFrequencyofa SingleSinusoidinWhiteNoise.IEEETransactionsonSignalProcessing,Vol. 42(6),pp.15651569. Gammaitoni,L.,(1995)Stochasticresonanceandtheditheringeffectinthresholdphysical systems.PhysicalReviewE,Vol.52(5),p.46914698.

66

Chapter5.References

Hartley,D.J.,Bishop,J.A.,(1979)HomerangeandmovementinpopulationsofRattus norvegicuspolymorphicforwarfarinresistance.BiologicalJournalofthe LinneanSociety,Vol.12,p.1948. Inagaki,H.,Kuwahara,M.,Kikusui,T.,Tsubone,H.,(2005)Theinfluenceofsocial environmentalconditionontheproductionofstressinduced22kHzcallsinadult maleWistarrats.Physiology&Behavior,Vol.84,p.1722. John,G.H.,Langley,P.,(1995)Estimatingcontinuousdistributionsinbayesian classifiers,EleventhConferenceonUncertaintyinArtificialIntelligence. Johnson,P.,Tyack,P.,Instn,W.,(2003)Adigitalacousticrecordingtagformeasuring theresponseofwildmarinemammalstosound.IEEEJournalofOceanic Engineering,Vol.28(1),p.312. Kays,R.W.,Wikelski,M.,(2007)ReviewoftheNSFsponsoredanimaltrackingand physiologicalmonitoringworkshop.Reportpublishedonlineat www.movebank.org Kedem,B.,(1986)Onfrequencydetectionbyzerocrossings.SignalProcessing,Vol. 10(3),p.303306. Knutson,B.,Burgdorf,J.,Panksepp,J.,(2002)Ultrasonicvocalizationsasindicesof affectivestatesinrats.PsychologicalBulletin,Vol.128,p.961977. Logan,B.F.,Jr.,(1977)Informationinthezerocrossingsofbandpasssignals.BellSystem TechnicalJournal,Vol.56,p.487510. Lore,R.,Flanelly,K.,Farina,P.,(1976)Ultrasoundproducedbyratsaccompany decreasesinintraspecificfighting.AggressionBehavior,Vol.2,p.175181. Markou,M.,Singh,S.,(2003a)Noveltydetection:areviewpart1:statistical approaches.SignalProcessing,Vol.83,p.24812497. Markou,M.,Singh,S.,(2003b)Noveltydetection:areviewpart2:neuralnetwork basedapproaches.SignalProcessing,Vol.83,p.24992521. Mathworks,(2010)OnlineHandbook, http://www.mathworks.com/access/helpdesk/help/toolbox/stats/ofApril,4.2010. Mitchell,T.,(1997)MachineLearning,McGrawHill.

67

Realtimeanalysisofultrasonicrodentvocalizationsonwearablesensornodes

Moss,F.,Ward,L.M.,Sannita,W.G.,(2004)Stochasticresonanceandsensory informationprocessing:atutorialandreviewofapplication,Clinical Neurophysiology,Vol.115,p.267281. Noble,G.K.(1939)Theroleofdominanceinthesociallifeofbirds.TheAuk,Vol.56,p. 263273. Noirot,E.,(1968)Ultrasoundsinyoungrodents.II.Changeswithageinalbinorats. AnimalBehaviour,Vol.16,p.129134. Nyquist,H.,(1928)CertainTopicsinTelegraphTransmissionTheory.Trans.Amer.Inst. Elect.Eng.,Vol.47,reprint:ProceedingsoftheIEEE,Vol.90(2)(2002),p.617 644. Osechas,O.,Thiele,J.,BitschLink,J.A.,Wehrle,K.,(2008)Ratpack:WearableSensor NetworksforAnimalObservation.Proceedingsofthe30thAnnualInternational IEEEEngineeringinMedicineandBiologyConference,Vancouver,Canada. Qaisar,S.M.,Fesquet,L.,Renaudin,M.,(2009)AdaptiveRateSamplingandFiltering BasedonLevelCrossingSampling.EURASIPJournalonAdvancesinSignal Processing,Vol.2009,ArticleID971656. Rish,I.,(2001)AnempiricalstudyofthenaiveBayesclassifier.IJCAI01Workshopon EmpiricalMethodsinArtificialIntelligence,Seattle,USA. Sachs,B.D.,Barfield,R.J.,(1970)TemporalPatterningofsexualbehaviorinthemalerat. JournalofComparativeandPhysiologicalPsychology,Vol73(3),p.359364. Sadler,B.M.,Casey,S.D.,(2000)Sinusoidalfrequencyestimationviasparsezero crossings.JournaloftheFranklinInstitute,Vol.337,p.131145. Sales,G.D.,(1972a)Ultrasoundandaggressivebehaviourinratsandothersmall mammals.AnimalBehaviour,Vol.20,p.88100. Sales,G.D.,(1972b)Ultrasoundandmatingbehaviourinrodentswithsomeovservations onotherbehaviouralsituations.JournalofZoology,London,Vol.168,p.149164. Sales,G.D.,Smith,J.C.,(1978)Comparativestudiesoftheultrasoniccallsofinfantmurid rodents.DevelopmentalPsychobiology,Vol.11,p.595619. Sanchez,C.,(2003)Stressinducedvocalizationinadultanimals.Avalidmodelof anxiety?EuropeanJournalofPharmacology,Vol.463,p.133143.

68

Chapter5.References

Schulte,T.,(2010)GanganalyseundPfadrekonstruktionmittelsDeadReckoningbei Ratten.Diplomarbeit,FakulttfrInformationsundKognitionswissenschaften derUniversittTbingen. Sewell,G.D.,(1967)Ultrasoundinadultrodents.Nature,Vol.215,p.512. Stroud,D.C.,(1982)PopulationDynamicsofRattusrattusandRattusnorvegicusina riparianhabitat.JournalofMammalogy,Vol.63(1),p.151154. Takeuchi,H.,Kawashima,S.(1986)Ultrasonicvocalizationsandaggressivebehaviorin malerats.Physiology&Behavior,Vol.38,p.545550. Thiele,J.,(2006)NahrungssuchstrategiendernektarivorenFledermausGlossophaga commissarisi(Phyllostomidae)imFreilandeineindividuenbasierte VerhaltensstudieunterVerwendungvonTranspondertechnik.Dissertation,LMU Mnchen,FakulttfrBiologie. Thiele,J.,BitschLink,J.A.,Osechas,O.,(inprint)DynamicWirelessSensorNetworks forAnimalBehaviorResearch.RecentAdvancesinBiomedicalEngineering,ed. byAleksandarLazinica.InTech,Vienna,Austria. Thomas,D.A.,Howard,S.B.,Barfield,R.J.,(1982)MaleProducedUltrasonic VocalizationsandMatingPatternsinFemaleRats.JournalofComparativeand PhysiologicalPsychology,Vol.96(5),p.807815. Thomas,D.A.,Takahashi,L.K.,Barfield,R.J.(1983)Analysisofultrasonic vocalizationsemittedbyintrudersduringaggressiveencountersamongrats (Rattusnorvegicus).JournalofComparativePsychology,Vol.97,p.201206. VanderPoel,A.M.,Miczek,K.A.,(1991)Longultrasoniccallsinmaleratsfollowing mating,defeatandaversivestimulation:Frequencymodulationandboutstructure. Behavior,Vol119(1),p.127142. Vangelis,M.,Ion,A.,Geogios,P.,(2006)SpamFilteringwithNaiveBayesWhich NaiveBayes?,ThirdConferenceonEmailandAntiSpam. Viol,N.L.(2009)SimBetAge:DesignandEvaluationofEfficientDelayTolerantRouting inMobileWSN's.Diplomarbeit,DistributedSystemsGroup,RWTHAachen. Weimerskirch,H.,Bonadonna,F.,Bailleul,F.,Mabille,G.,DellOmo,G.,Lipp,H., (2002)GPStrackingofforagingalbatrosses.Science,Vol.15(5558),p.1259.

69

Realtimeanalysisofultrasonicrodentvocalizationsonwearablesensornodes

Whishaw,I.Q.,Kolb,B.,(2005)Thebehaviorofthelaboratoryrat:Ahandbookwith Tests.OxfordUniversityPress,NewYork White,N.R.,Barfield,R.J.,(1987)Roleoftheultrasonicvocalizationofthefemalerat (Rattusnorvegicus)insexualbehavior.JournalofComparativePsychology,Vol. 101(1),p.7381. Wiesenfeld,K.,Moss,F.,(1995)Stochasticresonanceandthebenefitsofnoise:fromice agestocrayfishandSQUIDs.Nature,Vol.373,p.3336. Wilson,D.E.,Reeder,D.M.,(1993)Mammalspeciesoftheworld:Ataxonomicand geographicreference.SmithsonianInstitutionPress,Washington&London Wilson,J.R.,Adler,N.,LeBoeuf,B.,(1965)Theeffectsofintromissionfrequencyon successfulpregnancyinthefemalerat.ProceedingsoftheNationalAcademyof Sciences,Vol.53,p.13921395. Wohr,M.,Borta,A.,Schwarting,R.K.,(2005)Overtbehaviorandultrasonic vocalizationinafearconditioningparadigm:adoseresponsestudyintherat. NeurobiologyofLearningandMemory,Vol.84,p.228240. Whr,M.,Houx,B.,Schwarting,R.K.W.,Spruijt,B.,(2008)Effectsofexperienceand contexton50kHzvocalizationsinrats.PhysiologyandBehavior,Vol.93,p.766 776. Wu,Q.,(2010)Ratpack:NeighborDiscovery,Diplomarbeit,DistributedSystemsGroup, RWTHAachen Zei,M.,(2009)RekonstruktionvonnatrlichenLaufbewegungenderRattemitHilfevon MagnetundInertialsensoren.Diplomarbeit,FakulttfrBiologiederUniversitt Tbingen.

70

Chapter6.Acknowledgments

6 Acknowledgments
Iwanttothank: Hannes,forjusttherightamountofguidanceintheprocessofthiswork.Despiteallthe heatedargumentswehadtobringforwardIalwaysenjoyedworkingwithyou.Hopefully wecanstayfriendsafterIleave. J,forbeingmyperfectresourceofknowledgewhenitcomestobitsandbytes.Iwill neverdeleteyouraccountsonmycomputers,justincase. Prof.Mallot,forgivingmetheopportunitytoworkinhisdepartment. Gregor&Rdiger,forthenumerouscoffeebreaks,chatsandparties,joyfulconversations andphysicallydemandingsportsactivities.Ihopewewillneverlosetrackofeachother. James,mydearroommateandfriend,forprecisiongrindingmyEnglishandforsupplying mewithbeer(althoughaforeignbrand). Tobi,forprovidingmewiththisoneimportantfigurethathelpedmecalibratethesystem. Heike&Andi,forbeingthemostunusualbutbestparentsonecouldthinkof.Ithankyou for giving me the opportunity to develop in my own fashion, while accepting and supportingeveryoneofmydecisions. MybabysisterAnna,forbeingarolemodelinlivingindependently. Ursula,ElliandHugo,fortheirunconstrainedloveasgrandparents.Thankyouforyour support. Hansjrgen&Lothar,forfailingthemintwocompletelydifferentways.

71

Realtimeanalysisofultrasonicrodentvocalizationsonwearablesensornodes

7 Supplement
7.1 CDwithprojectfiles
Contents: Diplomarbeit Anelectronicversionofthiswork,includingallfiguresandsomereferences Matlab AllMatlabscriptsusedforrecordinganddataanalysis. NanoStackv1.1.0GPL Acompletecollectionofallsourcesforthemicrocontrollerandthereceiver sideprograms. UltrasonicSB Allcircuitdiagramsandspicesimulationschematics.

72

Chapter7.Supplement

73

Realtimeanalysisofultrasonicrodentvocalizationsonwearablesensornodes

7.2 KnowlesFG23329C05frequencyresponsecurve

Figure 7.1 : FrequencyresponseoftheFG23329C05atdifferentsignalintensities,f =500Hz.FigureprovidedbyTobiasBudenz,UniversityofTbingen

74

Chapter7.Supplement

7.3 Developmentoftheanalogfilter
The first circuitry that was properly miniaturized was Revision 2. The first revision, althoughitwasthefirstworkingversionofthedigitalpartofthecircuit,hadnoactive filterandwillthereforebeskippedinthischapter.Revision2alreadyhadarelatively sophisticated4.orderhighpassfilterwithmultiplefeedbacktopology.Altogetherfour OPs were used for the circuitry (schematics can be found on the CD). Every stage amplified the signal to a large degree, which caused a cutoff for frequencies above ~50kHz.ThiswasduetotheusedTLC274,whosegainwassimplynothighenoughfora filter that sophisticated and an amplification coefficient that high. The filter stages furthermoretendedtooscillate,presumablybecauseofcrosstalkbetweenthestagesdue to the OPs operating at their upper performance limit. To control this behavior, the reference voltage regulator LM4040 was used to stabilize the reference voltage. The problemofsporadicoscillation,however,remainedpresentuntilrevision8.

Figure 7.1 : AnalogsideofRevision2whichwas builtfortheCrossbowMica2(dot)microcontroller. Ontherightmostsidethemicrophoneisvisible. ThePCB(PrintedCircuitBoard)versionofrevision2(Figure7.1)couldbeconnectedto aCrossbowMica2(dot)sensornode,whichwasinitiallychosenasmicrocontroller.Even ifitturnedoutthattheanalogfilterwasnotfullyfunctional,theboardwasusedtotestthe microcontroller.Resultsshowedthatitwastooslowtoreadinthedatasetsofthedigital part and it was therefore replaced by the Radiocrafts RC2301. Revision 2 was miniaturizedasecondtime(Figure 7.2)fortheRC2301beforetestsconfirmedthatthe analogfilterwasnotworkingcorrectly.

75

Realtimeanalysisofultrasonicrodentvocalizationsonwearablesensornodes

Inthefollowingrevisions36,thisissuewasresolved,essentiallybychangingtheOPs thatwereusedandbyadjustingthevaluesofresistorsandcapacitorsthatdefinethefilter characteristicsofeachstage.Revision5hadnoLM4040andnoextrasupplyvoltagefor themicrophonebutworked,apartfromthat,likeversion4.Thereforethesepartswere omittedinallsubsequentrevisions.Number6workedwellinthebreadboardversion,but oscillatedwhenbuiltonaPCB.Becausethesequenceofstageshadalsochangedandit hadbecomedifficulttomodifytheboardtomeettherequirementsofthecircuit,itwas thoughtthatdesigninganewPCBwouldsolvetheproblemofoscillation(Figure7.3).

Figure 7.2 : BoardlayoutforRevision2,RC2301version.Red:padsandtracksontop; Blue:padsandtracksonbottom;Green:Vias;Gray:Componentdimensions.

Figure 7.3 : RevisedlayoutatRevision7.Red:padsandtracksontop;Blue:pads andtracksonbottom;Green:Vias.Scalingissimilartofigure7.2.

76

Chapter7.Supplement

Revision7wasthenbuiltonthenewlydesignedPCB.Itworkedinitsbreadboardversion but,likenumber6,startedtooscillatewhenbuiltonthecustommadeboard.Toreduce thesupposedcrosstalkbetweenfilterstages,twomoreOPswereaddedtothecircuit. Theirmainfunctionwasnottofilterthesignal,buttoamplifyitsothatthisdidnothave tobedonebytheactivefilterstages.Unfortunately,thePCBversionofthiscircuitry whichwaspresentedinchapter 2.3.1 stillshowedoscillatorybehavior.Thisissuecould onlyberesolvedbyaspatialsegregationoftheanaloganddigitalpartsofthecircuit. Therefore,inthefinalversion,thetwopartswerebuiltontwoseparatelymodifiedPCBs thatweretakenfromrevision7(Figure7.3). Itismystrongbeliefthatamorecarefulandexperienceguideddesignoftheboardlayout couldhaveledtoasensorwithhalfthesize.ItispossiblethatthenumberofOPscould alsobereducedto4again,optimizingthecircuitryintermsofpartsthatareneededto buildit.However,moreworkandexperiencewillbeneededtoconstructasmalland functionalanalogfilterthathasthedesiredcharacteristics.

Figure 7.4 : EvaluationversionofRevision6.TheoscillatoryPCBversionwasattachedto abreadboardforamorecarefulcalibrationofthefilter.

77

Você também pode gostar