xiaokang 发表于 2009-8-23 11:42

局部投影算法 降噪

局部投影算法采用延时坐标将时间序列进行相重构,在高维的相空间上采用局部投影的方法将相空间分解成正交的子空间,
通过子空间中吸引子特性的不同来分离时序中的背景信号和弱特征信号分量。哪位研究过啊,帮帮忙,谢谢!

xiaokang 发表于 2009-8-31 00:42

function =StateSpaceProject(time_series,dim,delay,...
    project_space_vector,eps_min,eps_step,eps_max,neigh_min)
length=max(size(time_series));
Vnum=length-(dim-1)*delay;
for m=1:dim
    series_emb(m,1:Vnum)=time_series(1+(m-1)*delay:Vnum+(m-1)*delay);   
end
% %%%%%%%
for j=1:Vnum
    current_point=series_emb(:,j);
    % research neighbour matrix
    neigh_amount(j)=0;
    neigh_num(1,j)=0;
    for eps=eps_min:eps_step:eps_max
      epsilon(j)=eps;
      for k=1:Vnum
            comparing_point=series_emb(:,k);
            if k~=j&k~=neigh_num(:,j)
                distance=norm(current_point-comparing_point,2);
                if distance<eps&abs(k-j)>10 % 限定时间邻近点不被记为相空间邻点
                  neigh_amount(j)=neigh_amount(j)+1;
                  neighbour(:,neigh_amount(j),j)=comparing_point;
                  neigh_num(neigh_amount(j),j)=k;
                end
            end
      end
      if neigh_amount(j)>neigh_min
            neigh_lag(j)=1;
            break;
      else if epsilon(j)==eps_max
                neigh_lag(j)=0;
            end
      end
    end
      
    % caculate center vector
    center_vec=zeros(dim,1);
    for k=1:neigh_amount(j)
      center_vec=center_vec+neighbour(:,k,j);
    end
    center_vec=center_vec/neigh_amount(j);
    % construct matrix A
    for k=1:neigh_amount(j)
      if neighbour(:,k,j)==center_vec
            neighbour(:,k:neigh_amount(j)-1,j)=neighbour(:,k+1:neigh_amount(j),j);
      end
      matrix_A(:,k)=(neighbour(:,k,j)-center_vec)/norm(neighbour(:,k,j)-center_vec,2);
    end
    =svd(matrix_A);
    clear v;
    ul(:,project_space_vector)=u(:,project_space_vector);
%   u(:,project_space_vector)=[];
    if neigh_lag(j)>=0
      % project to noise subspace
      separated_chaos=center_vec+ul*ul'*(current_point-center_vec);
      separated_sig=current_point-separated_chaos;
%         separated_sig1=u*u'*(current_point-center_vec);
    else
%         separated_sig=ul*ul'*(current_point-center_vec);
%         separated_chaos=current_point-separated_sig;
    end
    separated_clutter(:,j)=separated_chaos;
    separated_signal(:,j)=separated_sig;
%   separated_signal1(:,j)=separated_sig1;
end

temp=zeros(dim,length);
temp1=zeros(dim,length);
% temp2=zeros(dim,length);
%
for k=1:dim
    temp(k,1+(k-1)*delay:Vnum+(k-1)*delay)=separated_clutter(k,:);
    temp1(k,1+(k-1)*delay:Vnum+(k-1)*delay)=separated_signal(k,:);
%   temp2(k,1+(k-1)*delay:Vnum+(k-1)*delay)=separated_signal1(k,:);
end
%
for k=1:dim
    clutter((k-1)*delay+1:k*delay)=sum(temp(:,(k-1)*delay+1:k*delay),1)/k;
    sig((k-1)*delay+1:k*delay)=sum(temp1(:,(k-1)*delay+1:k*delay),1)/k;
%   sig1((k-1)*delay+1:k*delay)=sum(temp2(:,(k-1)*delay+1:k*delay),1)/k;
end
%
clutter(1+(dim-1)*delay:Vnum)=sum(temp(:,1+(dim-1)*delay:Vnum),1)/dim;
sig(1+(dim-1)*delay:Vnum)=sum(temp1(:,1+(dim-1)*delay:Vnum),1)/dim;
% sig1(1+(dim-1)*delay:Vnum)=sum(temp2(:,1+(dim-1)*delay:Vnum),1)/dim;
%
for k=1:dim
    kk=dim-k+1;
    clutter(length-kk*delay+1:length-(kk-1)*delay)=sum(temp(:,length-kk*delay+1:length-(kk-1)*delay),1)/kk;
    sig(length-kk*delay+1:length-(kk-1)*delay)=sum(temp1(:,length-kk*delay+1:length-(kk-1)*delay),1)/kk;
%   sig1(length-kk*delay+1:length-(kk-1)*delay)=sum(temp2(:,length-kk*delay+1:length-(kk-1)*delay),1)/kk;
end

这是我在网上找到的程序,但是不知道这个函数中变量的含义,比如=StateSpaceProject(time_series,dim,delay,...
    project_space_vector,eps_min,eps_step,eps_max,neigh_min)
time_series是时间序列?dim是相关维?delay是延迟时间,project_space_vector??eps_min,eps_step,eps_max这些是说嵌入维??neigh_min?clutter,sig,neigh_lag,neigh_amount,neigh_num,epsilon?

qqchun 发表于 2009-8-31 11:43

能提取弱特征信号分量确实很有吸引力,有对这方面擅长的吗?请指点。

nkdtxf 发表于 2010-1-4 16:47

期待指点,
页: [1]
查看完整版本: 局部投影算法 降噪