view gen_ddm_int.m @ 4:72c011ed1977 tip

more elaborate example with non-stat. estimate explanation
author smusevic
date Tue, 30 Jul 2013 09:56:27 +0100
parents a4a7e3405062
children
line wrap: on
line source
% a high-level function for computing a DTFT based DDM 
% (constructs the linear system of equations using distribution derivative rule and solves it via 
% pseudo-inverse (pinv). Use this function if non-Fourier kernels are needed or
% using FFT would be unsatisfactory due to 
function [gdi,A,b, gdi_lns, r_lns] = gen_ddm_int(krnls, krlns_ders, mf_ders, sig, N, tol)
%generic multi-frequency distribution derivative based estimator for
% non-stationary sinusoidal analysis
%
%
% [1] Michael Betser: Sinusoidal Polynomial Estimation Using The Distribution
% Derivative, in IEEE Transactions on Signal Processing, Vol.57, Nr. 12,
% December 2009
%
% krnls: matrix of all the kernels... N x R , where R is the number of 
%      non-static parameters to estimate and at the same time, the number 
%      of kernels
%
% krlns_ders: matrix of all the kernel time derivatives... N x R , where R 
%     is the number of non-static parameters to estimate and at the same 
%     time, the number of kernels
%
% mf_ders: matrix of all the model function time derivatives... N x Q , where Q 
%     is the number of model functions
%
%
% sig: vector - signal, N x 1 (CAUTION: MUST be column vector!!!)
%
% N: odd integer - signal buffer length, ...
%
% For any reasonable use, Q equals R, otherwise it makes little sense.
% Kernels must include the window function...

[A,b] = ddm_lin_sys(krnls, krlns_ders, mf_ders, sig, N);

% solving via pinv with provided tolerance
gdi = pinv(A,tol) * b; % more generic than the following code:
%[gdi_lns r_lns]  = linsolve(A,b);
%gdi = gdi_lns;
end