短时傅里叶变换及其逆变换(Short-Time Fourier Transform and Its

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

Short-TimeFourierTransformandItsInverseIvanW.SelesnickApril14,20091IntroductionTheshort-timeFouriertransform(STFT)ofasignalconsistsoftheFouriertransformofoverlappingwindowedblocksofthesignal.Inthisnote,weassumetheoverlappingisby50%andwederivetheperfectreconstructionconditionforthewindowfunction,denotedw(n).Thewindoww(n)isassumedtobesupported(non-zero)forn=0,...,N−1.Forexample,Figure1showsawindowoflengthN=10.Inthisexample,thewindowisasymmetrichalf-cyclesinewindow.TheN-pointhalf-cyclesinewindowisgivenbyw(n)=sinπN(n+0.5),n=0,...,N−1.(1)Thefigureshowsseveralshiftedwindows.Theshiftedwindowsareshiftedbyhalfthelengthofthewindow.(Inpractice,thewindowismuchlongerthan10samples.Ashortwindowisusedhereforillustration.)Them-thwindowedblockofthesignalx(n)isgivenbyx(n)·w(n−m·N/2).Forexample,Figure2showsseveralwindowedblocks.Them-thwindowedblockisdenotedass(m,n):s(m,n):=x(n)·w(n−m·N/2)(2)Forexample,Figure2showsthem-thwindowedblockform=0,...,4.Theshort-timeFouriertransformisobtainedbytakingtheDTFTofeachwindowedblock:S(m,ω):=DTFT{x(n)·w(n−m·N/2)}(3)Theshort-timeFouriertransformofadiscrete-timesignalx(n)isdenotedbyS(m,ω)=STFT{x(n)}.Inpractice,theDTFTiscomputedusingtheDFTorazero-paddedDFT.2InverseSTFTTheinverseSTFTbeginswiththeinverseDTFTofS(m,ω)torecovers(m,n).s(m,n)=DTFT−1{S(m,ω)}1Signalx(n)051015202530012Windoww(n)05101520253000.51w(n−N/2)05101520253000.51w(n−N)05101520253000.51w(n−3N/2)05101520253000.51w(n−2N)05101520253000.51Figure1:Awindoww(n)oflengthN=10andseveralshiftedwindowsw(n−m·N/2).2Signalx(n)051015202530012s(0,n)=x(n)·w(n)05101520253000.51s(1,n)=x(n)·w(n−N/2)051015202530012s(2,n)=x(n)·w(n−N)051015202530012s(3,n)=x(n)·w(n−3N/2)051015202530012s(4,n)=x(n)·w(n−2N)051015202530012Figure2:Windowedblocksx(n)·w(n−m·N/2).TheshiftedwindowsareshowninFigure1.3Now,froms(m,n)wewishtorecoverx(n)bymultiplyingeachs(m,n)bytheshiftedwindoww(n−m·N/2)andaddingtheresults.WewillusethesamewindowusedintheforwardSTFT.Multiplyingthem-thwindowedblockbytheshiftedwindowgives:s(m,n)·w(n−m·N/2)whichareillustratedinFigure3.Figure3showsthewindoweds(m,n)form=0,...,4.ThenextstepoftheinverseSTFTaddstheseoverlappingblockstoobtainthefinalsignaly(n):y(n)=Xms(m,n)·w(n−m·N/2)(4)Wehavecalledthisthe‘inverse’STFT,however,itisonlyaninverseify(n)=x(n),whichinturndependsonthewindoww(n).Ifthewindowisnotchosencorrectly,thenthereconstructedsignaly(n)willnotbeequaltotheoriginalsignalx(n).3PerfectReconstructionConditionHowshouldthewindoww(n)bechosensoastoensurethatthe‘inverse’STFTreallyisaninverse?Combining(2)and(4)givesy(n)=Xmx(n)·w2(n−m·N/2).(5)Ifwedefinethesquaredwindowfunctionp(n):=w2(n)then(5)canbewrittenasy(n)=x(n)Xmp(n−m·N/2).Forperfectreconstruction(y(n)=x(n))itisnecessarythatXmp(n−mN/2)=1.(6)Thehalf-cyclesinewindowsatisfiesthisconditionasillustratedinFigure4.NotethatthefirstN/2samplesandthelastN/2samplesareexceptions.Thebeginningandendofthesignalcanbeinvertedusingadifferentprocedureor,ifthesignalislongthentheserelativelyfewpointsatthebeginningandendmaynotmatter.Notethattheleft-hand-sideof(6)isperiodicwithperiodN/2.Thereforeitisnecessarytochecktheconditiononlyforn=0,...,N/2−1(orforanyotherN/2rangeofn).Moreover,overthisinterval,onlytwotermscontribute;sotheperfectreconstructionsimplifiesto:p(n)+p(n+N/2)=1,n=0,...,N2−1.Therefore,theperfectreconstructionconditionis4Signalx(n)051015202530012s(0,n)·w(n)05101520253000.51s(1,n)·w(n−N/2)051015202530012s(2,n)·w(n−N)051015202530012s(3,n)·w(n−3N/2)05101520253000.51s(4,n)·w(n−2N)051015202530012Figure3:FortheinverseSTFTtheoverlappingsignalss(m,n)·w(n−m·N/2)areadded.5p(n)05101520253000.51p(n−N/2)05101520253000.51p(n−N)05101520253000.51p(n−3N/2)05101520253000.51p(n−2N)05101520253000.51p(0)+···+p(n−2N)05101520253000.51Figure4:Illustrationoftheperfectreconstructioncondition(6)forthe10-pointhalf-cyclesinewindow.6w(n)w2(n)05101520253000.5105101520253000.51+w(n+N/2)w2(n+N/2)05101520253000.5105101520253000.51=w2(n)+w2(n+N/2)05101520253000.51Figure5:Illustrationoftheperfectreconstructioncondition(7)forthe10-pointhalf-cyclesinewindow.w2(n)+w2(n+N/2)=1,n=0,...,N2−1.(7)Thehalf-cyclesinewindow(1)satisfies(7)asillustratedinFigure5.Basicallyitsatisfies(7)becauseofthetrigonometricidentitycos2(θ)+sin2(θ)=1.Manyotherwindowscanalsobedesignedthatsatisfy(7).PerhapsthesimplestN-pointwindowsatisfying(7)istherectangularwindow,w(n)=1√2,n=0,...,N−1,however,thiswindowisnotagoodwindowbecauseitisnottapered(smooth)atitsends.ItcanthereforecausediscontinuitiesatblockboundarieswhentheSTFTisusedfornoisereduction,signalenhancement,orotherapplications.Thisdiscontinuityissometimesaudibleasalownoise.74SpeechNoiseReductionTheSTFTcanbeusedtoreducenoiseinaspeechsignal(orotherhighlyoscillatorysignal).Asimplemethodconsistsofthreesteps:1.ComputetheSTFTofthenoisysignal.S(m,ω)=STFT{x(n)}2.ThresholdtheSTFT.S2(m,ω)=g(S(m,ω))whereg(a)isthethresholdingfunction:g(a)=(0,|a|≤Ta,|a|T(8)AllvalueslessthanthethresholdTinabsolutevaluegetsettozero.−2−1012−2−1012ag(a)3.ComputetheinverseSTFT.y(n)=STFT−1{S2(m,ω)}.Thisisillustratedbytheblockdiagram:x(n)STFTTHRESHINV-STFTy(n)Example:Speechde

1 / 11
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功