📄 esprit_ls.m
字号:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% FUNCTION: esprit_ls.m
%
% AUTHOR: Steve Kogon
%
% DATE: January 20, 1999
%
% DESCRIPTION: This file estimates the frequencies of sinusoids using
% least squares ESPRIT algorithm (Roy & Kailath 1989).
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%-----------------------------------------------------------
% Copyright 2000, by Dimitris G. Manolakis, Vinay K. Ingle,
% and Stephen M. Kogon. For use with the book
% "Statistical and Adaptive Signal Processing"
% McGraw-Hill Higher Education.
%-----------------------------------------------------------
function [fest] = esprit_ls(x,P,M)
% x = signal
% P = number of complex exponentials
% M = time-window length
% Nfft = number of FFT frequencies
N = length(x) - M + 1;
% Form data matrix from the signal x(n)
X = zeros(N,M);
for n = 1:M
X(:,n) = x((1:N) + (M-n));
end
% Compute the SVD of the augmented data matrix
[L,S,U] = svd(X);
% Signal subspace (2*N by K matrix of right singular vectors)
Us = U(:,1:P);
% Split subspace into two subspaces corresponding to the unshifted
% and shifted versions
U1 = Us(1:(M-1),:);
U2 = Us(2:M,:);
% Solve for the rotation between these subspaces (LS version)
Psi = U1\U2;
% Solve for the original rotation that was needed for the original data
phi = eig(Psi);
% Estimate frequencies
fest = angle(phi)/(2*pi);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -