• [转载]时频特性分析(Matlab)


    最近瞅了一些关于时频分析工具箱的matlab函数使用方法,总结一下吧.

    我使用的是2011a的matlab,貌似没有自带的时频分析工具箱,可以到网上下载,google一搜就能搜到,安装后就可以使用了(所谓安装就是把工具箱的目录包含到matlab工作目录中即可).

    下面说一些时频工具箱函数的用法(由于我下的工具箱没有html版的帮助,所以只能使用help funname的方法查看帮助信息).

    AMGAUSS

    Generate gaussian amplitude modulation.

    Y=AMGAUSS(N,T0,T) generates a gaussian amplitude modulation

    centered on a time T0, and with a spread proportional to T.

    This modulation is scaled such that Y(T0)=1

    and Y(T0+T/2) and Y(T0-T/2) are approximately equal to 0.5 .

    产生高斯幅值调制信号,其以信号点数为N,中心为T0,传播0.5的比例到T,即Y(T0)=1,Y(T0+T/2) = Y(T0-T/2) = 0.5。 T0默认为N/2,T默认为2*sqrt(N)。

    如z=amgauss(160,90,40); plot(z);

    image

     

    FMCONST

    Signal with constant frequency modulation.

    [Y,IFLAW] = FMCONST(N,FNORM,T0) generates a frequency modulation

    with a constant frequency fnorm.

    The phase of this modulation is such that y(t0)=1.

    产生一个固定频率的频率调制信号。N为产生信号的点数,FNORM为标准化频率(默认为0.25),T0表示此时刻为正幅值(默认为round(N/2)),相当于规定了相位。IFLAW为设置的频率变化情况,这里就是一个常数。

    如z=fmconst(128,0.05,50); plot(real(z));

    image

     

    FMLIN

    Signal with linear frequency modulation.

    [Y,IFLAW]=FMLIN(N,FNORMI,FNORMF,T0) generates a linear frequency

    modulation.

    The phase of this modulation is such that Y(T0)=1.

    产生一个线性调频信号。N为信号的点数,FNORMI为开始标准频率(默认为0.0),FNORMF为结束标准频率(默认为0.5),相位由T0规定,即Y(T0)=1。IFLAW为设置的频率变化情况,这里就是一个线性变化的直线。

    如[z, f]=fmlin(128,0.05,0.3,50); plot(real(z));figure, plot(f)

    imageimage

    以上是比较常用的产生信号的函数。

     

    下面说一些时频分析常用的分析方法,主要有短时傅里叶变换STFT、Wigner-Ville分布WVD、伪Wigner-Ville分布PWVD等,其他还有很多分析方法,都有相关函数,具体可以查看帮助。

    短时傅里叶变换STFT

    功能:计算时间序列的短时离散傅里叶变换,得到瞬时频率。

    格式:

    [tfr, t, f] = tfrstft(x) % 计算时间序列x的短时傅里叶变换,参数tfr为短时傅里叶变换系数,t为系数tfr对应的时刻,f为归一化频率向量

    [tfr, t, f] = tfrstft(x, t) % 计算对应时刻t的短时傅里叶变换

    [tfr, t, f] = tfrstft(x, t, n) % 计算n点对应时刻t的短时傅里叶变换

    [tfr, t, f] = tfrstft(x, t, n, h) % 参数h为归一化频率平滑窗

    [tfr, t, f] = tfrstft(x t, n, h, trace) % trace显示算法进程

    说明:

    x--信号

    t--时间(缺省值为1:length(x))

    n--频率数(缺省值为length(x))

    h--频率滑窗,h归一化为单位能量(缺省值为hamming(n/4))

    trace--如果非零,显示算法的进程(缺省值为0)

    tfr--时频分解(为复值),频率轴观察范围为-0.5~0.5

    f--归一化频率

    sig=[fmconst(128,0.2);
        fmconst(128,0.4)]; % 产生由两个常值调频信号(即正弦信号)的组合信号
    tfr=tfrstft(sig);
    subplot(211); imagesc(abs(tfr)); % 瞬时频率
    subplot(212); imagesc(angle(tfr)); % 瞬时相位

    image

    Wigner-Ville时频分布图

    功能:计算时间序列的Wigner-Ville时频分布图,得到瞬时频率

    格式:

    [tfr, t, f] = tfrwv(x)

    [tfr, t, f] = tfrwv(x, t)

    [tfr, t, f] = tfrwv(x, t, n)

    [tfr, t, f] = tfrwv(x, t, n, trace)

    说明:

    x--信号

    t--时间(缺省值为1:length(x))

    n--频率数(缺省值为length(x))

    trace--如果非零,显示算法的进程(缺省值为0)

    tfr--时频分解(为复值),频率轴观察范围为-0.5~0.5

    f--归一化频率

    sig=fmlin(128,0.1,0.4);

    tfrwv(sig);

    image

     

    伪Wigner-Ville时频分布图

    功能:计算时间序列的伪Wigner-Ville时频分布图,得到瞬时频率

    格式:

    [tfr, t, f] = tfrpwv(x)

    [tfr, t, f] = tfrpwv(x, t)

    [tfr, t, f] = tfrpwv(x, t, n)

    [tfr, t, f] = tfrpwv(x, t, n, trace)

    说明:

    x--信号

    t--时间(缺省值为1:length(x))

    n--频率数(缺省值为length(x))

    trace--如果非零,显示算法的进程(缺省值为0)

    tfr--时频分解(为复值),频率轴观察范围为-0.5~0.5

    f--归一化频率

    sig=fmlin(128,0.1,0.4);

    tfrpwv(sig);

    image

    还可以设置成三维显示,如下

    imageimage

    其他时频分析

    fmt

    计算时间序列的快速梅林变换

    ifmt

    计算快速梅林逆变换。

    tfrbj

    生成时间序列的Bord-Jondan时频分布图,得到瞬时频率。

    image

    tfrbud

    生成时间序列的Butterworth时频分布图,得到瞬时频率。

    tfrcw

    生成时间序列的Choi-Williams时频分布图,得到瞬时频率。

    tfrgrd

    生成时间序列的广义矩形时频分布图,得到瞬时频率。

    image

    tfrmh

    生成时间序列的Margenau-Hill时频分布图,得到瞬时频率。

    image

    tfrmhs

    生成时间序列的Margenau-HillP谱图时频分布图,得到瞬时频率。

    image

    tfrsp

    计算时间序列的频谱图分布,得到瞬时频率。

    image

    tfrscalo

    计算时间序列的尺度图时频表示,即连续小波变换的幅值的平方

    image

    tfrrsp

    计算时间序列的时频分布和它的重排形式,得到瞬时频率。

    image

    friedman

    计算时间序列的瞬时频率密度

    image

    ridges

    从时间序列的重排时频分布中提取瘠

    image

    tfrideal

    计算给定时间序列的瞬时频率规律的理想时频表示

    image

    以上给了很多函数,但常用的基本就是短时傅里叶变换STFT、Wigner-Ville分布WVD、伪Wigner-Ville分布PWVD和提取瘠ridges、得到理想时频表示tfrideal。

  • 相关阅读:
    1.表单标签
    07.Ajax.post
    06.Ajax.get
    05.Ajax.get
    04.Ajax-get.html
    03.post.file
    nodejs-7.2. CURD数据管理系统小栗子
    nodejs-7.1. mongoose模块
    JS 无缝轮播图1-节点操作
    JS 放大镜特效
  • 原文地址:https://www.cnblogs.com/gisalameda/p/12840635.html
Copyright © 2020-2023  润新知