利用MATLAB实现信号的1½维谱估计

众所周知,高阶谱是由高阶累积量经过多维傅里叶变换,但是存在着计算量大且耗时比较长的缺点。为了使高阶谱像功率谱那样能够适用FFT,计算简单,许多学者对此进行了研究,但是效果却不尽如人意。近年来,有的学者通过“降维”的思想,将双谱投影到一维频率空间上,取得了一定的理论成果,其主要思想是通过取对角切片的方式实现的,即选择特殊的延时 τ 1 = τ 2 = ⋯ = τ k = τ {\tau _1} = {\tau _2} = \cdots = {\tau _k}= {\tau } τ1=τ2==τk=τ,进而简化双谱的计算。
已知零均值平稳随机过程 x ( n ) x\left( n \right) x(n)的三阶累积量和三阶矩相等,三阶累积量的定义为
c 3 x ( τ 1 , τ 2 ) = E [ x ( n ) x ( n + τ 1 ) x ( n + τ 2 ) ] {c_{3x}}\left( {{\tau _1},{\tau _2}} \right) = E\left[ {x\left( n \right)x\left( {n + {\tau _1}} \right)x\left( {n + {\tau _2}} \right)} \right] c3x(τ1,τ2)=E[x(n)x(n+τ1)x(n+τ2)]
τ 1 = τ 2 {\tau _1} = {\tau _2} τ1=τ2得到三阶累积量的主对角切片为
c ( τ ) = c 3 x ( τ , τ ) = E [ x ( n ) x ( n + τ ) x ( n + τ ) ] c\left( \tau \right) = {c_{3x}}\left( {\tau ,\tau } \right) = E\left[ {x\left( n \right)x\left( {n + \tau } \right)x\left( {n + \tau } \right)} \right] c(τ)=c3x(τ,τ)=E[x(n)x(n+τ)x(n+τ)]
c ( τ ) c\left( \tau \right) c(τ)进行一维傅里叶变换可以得到 x ( n ) x\left( n \right) x(n) 1 1 2 1\frac{1}{2} 121维谱,即
S B ( f ) = ∑ τ = − ∞ ∞ c ( τ ) e − j 2 π f τ SB\left( f \right) = \sum\limits_{\tau = - \infty }^\infty {c\left( \tau \right){e^{ - j2\pi f\tau }}} SB(f)=τ=c(τ)ej2πfτ
1 1 2 1\frac{1}{2} 121维谱实际是双谱在平面 f 1 = f 2 {f_1} = {f_2} f1=f2的投影。
下面给出一个关于求 1 1 2 1\frac{1}{2} 121维谱的例子
例:估计仿真信号 x ( n ) x\left( n \right) x(n) 1 1 2 1\frac{1}{2} 121维谱
x ( n ) = ∑ i = 1 6 A i cos ⁡ ( 2 π f i n + φ i ) x\left( n \right) = \sum\limits_{i = 1}^6 {{A_i}\cos \left( {2\pi {f_i}n + {\varphi _i}} \right)} x(n)=i=16Aicos(2πfin+φi)
其中 A i {A_i} Ai为确定常数 i = 1 , 2 , ⋯   , 6 i = 1,2, \cdots ,6 i=1,2,,6 φ i {\varphi _i} φi [ 1 , 2 π ] \left[ {1,2\pi } \right] [1,2π] i = 1 , 2 , ⋯   , 5 i = 1,2, \cdots ,5 i=1,2,,5,上均匀分布的随机变量,取 f 1 = 0.6381 H z {f_1} = 0.6381Hz f1=0.6381Hz f 2 = 0.8435 H z {f_2} = 0.8435Hz f2=0.8435Hz f 3 = 2 H z {f_3} = 2Hz f3=2Hz f 4 = 0.4909 H z {f_4} = 0.4909Hz f4=0.4909Hz f 5 = 1.7671 H z {f_5} = 1.7671Hz f5=1.7671Hz f 6 = f 4 + f 5 {f_6} = {f_4} + {f_5} f6=f4+f5 φ 6 = φ 4 + φ 5 {\varphi _6} = {\varphi _4} + {\varphi _5} φ6=φ4+φ5

代码如下

clear;
close all;
clc;
%样本数
N=128*64;
%采样频率
fs=8;
%频率参数
f1=0.6381;
f2=0.8435;
f3=2;
f4=0.4909;
f5=1.7671;
f6=f4+f5;
%仿真信号
a=2*pi*rand(5);
x=cos(2*pi*f1/fs*(1:N)+a(1))+cos(2*pi*f2/fs*(1:N)+a(2))+...
  cos(2*pi*f3/fs*(1:N)+a(3))+cos(2*pi*f4/fs*(1:N)+a(4))+...
  cos(2*pi*f5/fs*(1:N)+a(5))+cos(2*pi*f6/fs*(1:N)+a(4)+a(5));
%估计三阶累积量
K=64;
M=fix(N/K);
%分段,去均值
for i=0:K-1
    y=x(i*M+1:(i+1)*M);
    y=y-mean(y);
    xk(i+1,:)=y;
end
nfft=256;
%计算累积量
for t=-(nfft/2-1):nfft/2
    c(t+nfft/2)=third_slice_cumulant(xk,t);
end
%FFT变换
figure(1);
subplot(211);
Y=fft(c,nfft);
P=Y.*conj(Y)/nfft;
f=fs*(0:nfft/2-1)/nfft;
plot(f,P(1:nfft/2));
title('x(n)的1又1/2谱');
xlabel('频率');
ylabel('幅值');
hold on;
subplot(212);
Y=fft(x,nfft);
P=Y.*conj(Y)/nfft;
f=fs*(0:nfft/2-1)/nfft;
plot(f,P(1:nfft/2));
title('x(n)的功率谱');
xlabel('频率');
ylabel('幅值');

其中third_slice_cumulant.m为

function y=third_slice_cumulant(xk,t)
[K,M]=size(xk);
s1=max([1,1-t]);
s2=min([M,M-t]) ;
for i=1:K
templ=xk(i,:);
temp=sum(templ(s1:s2).*templ(s1+t:s2+t).*templ(s1+t:s2+t));
cc(i)=temp/M;
end
y=sum(cc)/K;
end

运行结果为
在这里插入图片描述
可以看出 1 1 2 1\frac{1}{2} 121维谱是频率的一维函数,类似于功率谱,但是它只在 f 4 , f 5 , f 6 {f_4} , {f_5} , {f_6} f4f5f6处有谱线存在,这和功率谱是不一样的,这是因为这三个频率恰好对应发生二次相位耦合关系的频率分量,因此检测出二次相位耦合现象。

  • 2
    点赞
  • 28
    收藏
    觉得还不错? 一键收藏
  • 8
    评论
解决??? XML-file failed validation against schema located in: D:\Program Files\MATLAB\R2007b\sys\namespace\info\v1\info.xsd XML-file name: d:\program files\matlab\r2007b\toolbox\hosa_d\hosa\info.xml To retest the XML-file against the schema, call the following java method: com.mathworks.xml.XMLValidator.validate(... 'd:\program files\matlab\r2007b\toolbox\hosa_d\hosa\info.xml',... 'D:\Program Files\MATLAB\R2007b\sys\namespace\info\v1\info.xsd', true) Errors: org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'area'. One of '{MathWorksID, type}' is expected. 运行hosaver: Warning: Could not find an exact (case-sensitive) match for 'hosaver'. D:\Program Files\MATLAB\R2007b\toolbox\hosa_d\hosa\HOSAVER.M is a case-insensitive match and will be used instead. You can improve the performance of your code by using exact name matches and we therefore recommend that you update your usage accordingly. Alternatively, you can disable this warning using warning('off','MATLAB:dispatcher:InexactMatch'). Higher-Order Spectral Analysis Toolbox. Version 2.0.3 (R12 compliant) 27 Dec 2000 安装原版工具箱之所以出现问题是因为没有将文件名全部改成小写,无法运行hosademo是因为缺少choices.m文件,参考http://cn.mathworks.com/matlabcentral/fileexchange/3013-hosa-higher-order-spectral-analysis-toolbox。本资源是整理后的工具箱,直接安装就可使用,运行hosaver显示成功安装信息,运行hosademo查看示例。
评论 8
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值