1563AAD©2011MicrochipTechnologyIncorporated.AllRightsReserved.ClassTitleSlide11563AADCreatingAudioandDSPApplicationswith16/32-bitMicrocontrollersObjectives●RealizehowDigitalFilteringworks●Understandandusespeechcompressiontechniques●ConstructaMP3playerusingHelixMP3©2011MicrochipTechnologyIncorporated.AllRightsReserved.1563AADSlide2●ConstructaMP3playerusingHelixMP3decoderalgorithmAgenda●DigitizationofSignals●DigitalFiltering●Lab1–DigitalFiltering●SpeechCodingShCi©2011MicrochipTechnologyIncorporated.AllRightsReserved.1563AADSlide3●SpeechCompression●Lab2–SpeexAlgorithm●AudioCoding●HelixMP3AlgorithmAPI●Lab3–HelixMP3AlgorithmLabs●Lab1–Removeunwantedtonefromspeechsignal●Lab2–DevelopaUSBthumbdrivebasedvoicerecorder©2011MicrochipTechnologyIncorporated.AllRightsReserved.1563AADSlide4●Lab3–DevelopaUSBThumbDrivebasedMP3playerDigitizationofSignals©2011MicrochipTechnologyIncorporated.AllRightsReserved.1563AADSlide5DigitizationofSignalsDigitization●Whatisdigitization●Sampling(Discretetime)●Quantization(Discreteamplitude)●AnalogtoDigitalConversion©2011MicrochipTechnologyIncorporated.AllRightsReserved.1563AADSlide6Tsx(t)tQuantizerx(n)…100110…Digitization●Somecomments●SamplingfrequencyFs=1/Ts●Bitresolution(howmuch)●Applicationdependant©2011MicrochipTechnologyIncorporated.AllRightsReserved.1563AADSlide7●ppp●Costsensitivity●‘t’isthecontinuoustimeindex●‘n’isthediscretetimeindexTrivia●ApolloGuidanceComputer●5600NORgates●36KBProgramMemory●16bitprocessor●Powerconsumption:55Watts!©2011MicrochipTechnologyIncorporated.AllRightsReserved.1563AADSlide8●InstructionSet:34+10●Weight:70pounds!●Acellphonehasmoreprocessingpowerthanthis!WhyDigitization?●Growthincomputingcapacity●Semiconductortechnology●ProcessInnovation●Cost●Integration©2011MicrochipTechnologyIncorporated.AllRightsReserved.1563AADSlide9●g●Supportingdigitalinfrastructure●Powerefficiency●Benefitsofdigitaldomain●Noiseimmunity●DesignFlexibilityDigitization●Weighcostbenefitratio●Quantizationnoise●LimitedBandwidthLi©2011MicrochipTechnologyIncorporated.AllRightsReserved.1563AADSlide10●Learningcurve●Difficulttosatisfypurists!SamplingOperation●WhathappenswhenyousampleasignalFrequencySpectrumofaarbitrarysignal©2011MicrochipTechnologyIncorporated.AllRightsReserved.1563AADSlide11-ff-F1F10-f-F1F10Fs2FsfFs/23Fs/2FrequencySpectrumaftersamplingatFsFs+F1Fs-F1ImagesAliasing●WhatisaliasingFs/2F1Fs/2-Fs/2©2011MicrochipTechnologyIncorporated.AllRightsReserved.1563AADSlide12Fs-f-F10F1-FsfFs/2-F10F1-Fs/2●Signalisnotsampledadequately●Ambiguityinreconstruction●Highfrequenciesfoldoverintolowerfrequencies●Fs/2iscalledthefoldingfrequencyAliasing●Howtopreventit●EnsurethatFs2F1(Samplingtheorem)Fs/2F1©2011MicrochipTechnologyIncorporated.AllRightsReserved.1563AADSlide13-f-F1F10Fsf-Fs/2Fs/2-Fs●Sampleattwicemaximumfrequency●Signalcanbereconstructed●FsistheNyquistratePracticalDigitization●Limitthebandwidthoftheinputsignal●Anti-Aliaslowpassfilter●Mustbeagoodqualityfilter(op-amps)●Sharproll-off●Typicallyhashigherorder©2011MicrochipTechnologyIncorporated.AllRightsReserved.1563AADSlide14●Stopbandattenuationgreaterthan60dB●Tightspecifications●AnalogtoDigitalconvertor(ADC)AnalogtoDigitalConvertorx(t)x(n)Anti-aliasfilterOversampling●Anti-aliasingfilteriscriticaltosystemperformance●Howtoeasethefilterspecification?●UseOversamplingtechniqueIncreaseSamplingfrequency©2011MicrochipTechnologyIncorporated.AllRightsReserved.1563AADSlide15Fs/2F1Fs/2F1●Steeptransitionband●Tightfilterspecifications●Nosoftwareoverhead●Broadertransitionband●Relaxedfilterspecifications●Tighterfilterimplementinsoftware●SamplerateconversionDigitalFiltering©2011MicrochipTechnologyIncorporated.AllRightsReserved.1563AADSlide16DigitalFilteringDigitalFilters●WhydigitalfiltersArbitraryFilterspecificationsAdaptiveEasierprototyping©2011MicrochipTechnologyIncorporated.AllRightsReserved.1563AADSlide17AdaptiveTighterSpecificationsCostEffectiveNoise/EnvironmentalImmunityFilterTypesf|H|LowPassHighPass|H|ff©2011MicrochipTechnologyIncorporated.AllRightsReserved.1563AADSlide18(Fs/2)fcfc(Fs/2)●Applications●Anti-aliasing●Smoothing●NoiseReduction●TrebleCut●Applications●DCRemoval●PowerLineHum●BassReductionFilterTypesBandPass|H|fBandStop|H|f©2011MicrochipTechnologyIncorporated.AllRightsReserved.1563AADSlide19●Applications●Equalizer●Wirelesstransmitterandreceivers●FilterbanksinMP3CompressionffcLfcH(Fs/2)ffcLfcH(Fs/2)ImpulseResponse●WhatisanImpulseResponseH(z)10t10t1234δ(t)©2011MicrochipTechnologyIncorporated.AllRightsReserved.1563AADSlide20Somesystem(Filter)0t0t1234●Responseofasystemtoanimpulse●Responsetothefinestsignal(temporalsense)●Typicallycomputedmathematicallyorthroughmodeling●AnysystemcanbetreatedasafilterOneSampleWhatisaLTIsystem●WhatdoesLinearTimeInvariant(LTI)mean?H(z)11©2011MicrochipTechnologyIncorporated.AllRightsReserved.1563AADSlide21Somesystem(Filter)0t0t1234●Multiplyingtheinputproportionallyaffectsoutput●Impulseresponsedoesnotchangewithtime●Anysystem(evennonlineartimevariant)canbetreatedLTIforsakeofanalysisWhyImpulseResponse●WhyisImpulseresponseimporta