dan@0
|
1 % a high-level function for computing a DTFT based DDM
|
dan@0
|
2 % (constructs the linear system of equations using distribution derivative rule and solves it via
|
dan@0
|
3 % pseudo-inverse (pinv). Use this function if non-Fourier kernels are needed or
|
dan@0
|
4 % using FFT would be unsatisfactory due to
|
dan@0
|
5 function [gdi,A,b, gdi_lns, r_lns] = gen_ddm_int(krnls, krlns_ders, mf_ders, sig, N, tol)
|
dan@0
|
6 %generic multi-frequency distribution derivative based estimator for
|
dan@0
|
7 % non-stationary sinusoidal analysis
|
dan@0
|
8 %
|
dan@0
|
9 %
|
dan@0
|
10 % [1] Michael Betser: Sinusoidal Polynomial Estimation Using The Distribution
|
dan@0
|
11 % Derivative, in IEEE Transactions on Signal Processing, Vol.57, Nr. 12,
|
dan@0
|
12 % December 2009
|
dan@0
|
13 %
|
dan@0
|
14 % krnls: matrix of all the kernels... N x R , where R is the number of
|
dan@0
|
15 % non-static parameters to estimate and at the same time, the number
|
dan@0
|
16 % of kernels
|
dan@0
|
17 %
|
dan@0
|
18 % krlns_ders: matrix of all the kernel time derivatives... N x R , where R
|
dan@0
|
19 % is the number of non-static parameters to estimate and at the same
|
dan@0
|
20 % time, the number of kernels
|
dan@0
|
21 %
|
dan@0
|
22 % mf_ders: matrix of all the model function time derivatives... N x Q , where Q
|
dan@0
|
23 % is the number of model functions
|
dan@0
|
24 %
|
dan@0
|
25 %
|
dan@0
|
26 % sig: vector - signal, N x 1 (CAUTION: MUST be column vector!!!)
|
dan@0
|
27 %
|
dan@0
|
28 % N: odd integer - signal buffer length, ...
|
dan@0
|
29 %
|
dan@0
|
30 % For any reasonable use, Q equals R, otherwise it makes little sense.
|
dan@0
|
31 % Kernels must include the window function...
|
dan@0
|
32
|
dan@0
|
33 [A,b] = ddm_lin_sys(krnls, krlns_ders, mf_ders, sig, N);
|
dan@0
|
34
|
dan@0
|
35 % solving via pinv with provided tolerance
|
dan@0
|
36 gdi = pinv(A,tol) * b; % more generic than the following code:
|
dan@0
|
37 %[gdi_lns r_lns] = linsolve(A,b);
|
dan@0
|
38 %gdi = gdi_lns;
|
dan@0
|
39 end |