您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 人事档案/员工关系 > 小波函数及Matlab常用指令
常用小波函数及Matlab常用指令●一、常用小波函数与标准傅立叶变换相比,小波分析中用到的小波函数没有唯一性,小波函数具有多样性。由此而带来的问题是使用不同的小波基分析同一个问题会产生不同的结果,没有一个选择最优小波基的统一方法。目前主要是通过用小波分析方法处理信号的结果与理论分析结果的误差莱判定小波基的好坏,并由此选定小波基。()x常用的指导性选择标准有:(1)的支撑长度。即当时间或频率趋于无穷大时,上述各量从有限值收敛到0的速度;(2)对称型。它在图象处理中对于避免移相非常有用;(3)(若存在)的消失矩阶数。对于压缩非常有用;(4)正则性。对信号或图象的重构获得较好的平滑效果非常有用。^^、、、和1、Haar小波waveinfo('haar')HAARINFOInformationonHaarwavelet.HaarWaveletGeneralcharacteristics:Compactlysupportedwavelet,theoldestandthesimplestwavelet.scalingfunctionphi=1on[01]and0otherwise.waveletfunctionpsi=1on[00.5[,=-1on[0.51]and0otherwise.FamilyHaarShortnamehaarExampleshaaristhesameasdb1其他012/112/101xxHOrthogonalyesBiorthogonalyesCompactsupportyesDWTpossibleCWTpossibleSupportwidth1Filterslength2RegularityhaarisnotcontinuousSymmetryyesNumberofvanishingmomentsforpsi1图:在命令窗口输入waveinfo('haar')DBINFOInformationonDaubechieswavelets.DaubechiesWaveletsGeneralcharacteristics:Compactlysupportedwaveletswithextremalphaseandhighestnumberofvanishingmomentsforagivensupportwidth.Associatedscalingfiltersareminimum-phasefilters.FamilyDaubechiesShortnamedbOrderNNstrictlypositiveintegerExamplesdb1orhaar,db4,db152、db系列小波OrthogonalyesBiorthogonalyesCompactsupportyesDWTpossibleCWTpossibleSupportwidth2N-1Filterslength2NRegularityabout0.2NforlargeNSymmetryfarfromNumberofvanishingmomentsforpsiN图:3、Biorthogonal(biorNr.Nd)小波系主要特点体现在具有线性相位型,主要应用于信号和图象的重构中。通常表示为biorNr.Nd形式。Nr=1Nd=1,3,5;Nr=2Nd=2,4,6,8Nr=3Nd=1,3,5,7,9;Nr=4Nd=4Nr=5Nd=5;Nr=6Nd=8Generalcharacteristics:CompactlysupportedbiorthogonalsplinewaveletsforwhichsymmetryandexactreconstructionarepossiblewithFIRfilters(inorthogonalcaseitisimpossibleexceptforHaar).FamilyBiorthogonalShortnamebiorOrderNr,NdNr=1,Nd=1,3,5rforreconstructionNr=2,Nd=2,4,6,8dfordecompositionNr=3,Nd=1,3,5,7,9Nr=4,Nd=4Nr=5,Nd=5Nr=6,Nd=8Examplesbior3.1,bior5.5Orthogonal(正交)noBiorthogonal(双正交的)yesCompactsupportyesDWTpossibleCWTpossibleSupportwidth2Nr+1forrec.,2Nd+1fordec.Filterslengthmax(2Nr,2Nd)+2butessentiallybiorNr.NdldlreffectivelengtheffectivelengthofLo_DofHi_Dbior1.122bior1.362bior1.5102bior2.253bior2.493bior2.6133bior2.8173bior3.144bior3.384bior3.5124bior3.7164bior3.9204bior4.497bior5.5911bior6.81711Regularityforpsirec.Nr-1andNr-2attheknotsSymmetryyesNumberofvanishingmomentsforpsidec.NrRemark:bior4.4,5.5and6.8aresuchthatreconstructionanddecompositionfunctionsandfiltersarecloseinvalue.图:4、Coiflet(coifN)小波系由Daubechies构造,N=1,2,3,4,5.具有比dbN更好的对称性。从支撑长度看,具有和db3N及sym3N具有相同的支撑长度,从消失矩的数目看,具有和db2N和symN相同的消失矩数目。图:Generalcharacteristics:Compactlysupportedwaveletswithhighestnumberofvanishingmomentsforbothphiandpsiforagivensupportwidth.FamilyCoifletsShortnamecoifOrderNN=1,2,...,5Examplescoif2,coif4OrthogonalyesBiorthogonalyesCompactsupportyesDWTpossibleCWTpossibleSupportwidth6N-1Filterslength6NRegularitySymmetrynearfromNumberofvanishingmomentsforpsi2NNumberofvanishingmomentsforphi2N-15、SymletsA(symN)小波系Symlets函数系由Daubechies提出的近似对称的小波函数,是对db函数的改进,N=2,3,…,8。Generalcharacteristics:Compactlysupportedwaveletswithleastasymmetryandhighestnumberofvanishingmomentsforagivensupportwidth.Associatedscalingfiltersarenearlinear-phasefilters.FamilySymletsShortnamesymOrderNN=2,3,...Examplessym2,sym8OrthogonalyesBiorthogonalyesCompactsupportyesDWTpossibleCWTpossibleSupportwidth2N-1Filterslength2NRegularitySymmetrynearfromNumberofvanishingmomentsforpsiN●6、Molet(morl)小波小波函数为:尺度函数不存在,不具有正交性。Definition:morl(x)=exp(-x^2/2)*cos(5x)FamilyMorletShortnamemorlOrthogonalnoBiorthogonalnoCompactsupportnoDWTnoCWTpossible2/2cos5xxCex()=SupportwidthinfiniteEffectivesupport[-44]Symmetryyes7、MexicanHat(mexh)小波由Gauss函数的二阶导数构成。具有很好的时频局部化能力,尺度函数不存在,不具有正交性。Definition:secondderivativeoftheGaussianprobabilitydensityfunctionmexh(x)=c*exp(-x^2/2)*(1-x^2)wherec=2/(sqrt(3)*pi^{1/4})2/224/1)1(32xexx)=(FamilyMexicanhatShortnamemexhOrthogonalnoBiorthogonalnoCompactsupportnoDWTnoCWTpossibleSupportwidthinfiniteEffectivesupport[-55]Symmetryyes8、Meyer小波其小波函数和尺度函数在频率域定义,为具有紧支撑的正交小波。二、小波分析工具箱常用函数介绍1、Cwt功能:一维连续小波变换格式:(1)coefs=cwt(s,scales,’wname’)(2)coefs=cwt(s,scales,’wname’,’plot’)s为待分析信号;scales为尺度向量:可以为离散值,表示为[a1,a2,a3,…];也可以为连续值,表示为[amin:step:amax];还可以是混合情况,需要将离散值写前面,连续值写后面[a1,a2,a3,amin:step:amax]返回值为小波变换系数矩阵,矩阵的行数为尺度个数,每一行的值为该尺度小波变换系数在命令窗口输入helpcwt,可得指令的功能解释。helpcwtCWTRealorComplexContinuous1-Dwaveletcoefficients.COEFS=CWT(S,SCALES,'wname')computesthecontinuouswaveletcoefficientsofthevectorSatreal,positiveSCALES,usingwaveletwhosenameis'wname'.ThesignalSisreal,thewaveletcanberealorcomplex.COEFS=CWT(S,SCALES,'wname','plot')computesand,inaddition,plotsthecontinuouswavelettransformcoefficients.COEFS=CWT(S,SCALES,'wname',PLOTMODE)computesand,plotsthecontinuouswavelettransformcoefficients.CoefficientsarecoloredusingPLOTMODE.PLOTMODE='lvl'(Byscale)orPLOTMODE='glb'(Allscales)orPLOTMODE='abslvl'or'lvlabs'(AbsolutevalueandByscale)orPLOTMODE='absglb'or'glbabs'(AbsolutevalueandAllscales)………%一维连续小波变换loadnoissin;s=noissin(1:100);ls=length(s);w=cwt(s,[12.12,10.24,15.48,1.2,2:2:10],'db3','plot');xlabel('时间')ylabel('变换尺度')2、单尺度一维离散小波变换格式:(1)[ca,cd]=dwt(x,’wname’)(2)
本文标题:小波函数及Matlab常用指令
链接地址:https://www.777doc.com/doc-1559111 .html