Digital Signal Processing Reference
In-Depth Information
Für die Abschätzung der Komplexität werden vereinfachende Annahmen getroffen.
Alle reellen Operationen (Addition, Subtraktion und Multiplikation) werden als 1
FLOP gezählt. Die komplexe Multiplikation entspricht 6 reellen Operationen, d. h.
FLOPs.
Somit sind für jeden Spektralwert mit der Blocklänge N = 205
R Goertzel,1 / 205 3 FLOPs + 7 FLOPs = 622 FLOPs
Da 8 Spektralwerte zu bestimmen sind, folgt
R Goertzel, total
622 FLOPs = 4´976 FLOPs
Die Komplexität der DTMF-Anwendung mit dem Goertzel-Algorithmus ist um
circa 50 % geringer als die der Anwendung der Radix-2-FFT.
/
8
M8.5 u. 6
function y = goertzel_2(x,k,N)
% Goertzel-Algorithmus (2nd order system)
% function y = goertzel_2(x,k,N)
% x : time signal
% k : index of dft coefficient
% N : dft length
% y : kth dft coefficient
% mw * 10Nov2010
if length(x)<N
x = [x zeros(1,N-length(x))];
end
v1 = 0; v2 = 0; a1 = -2*cos(2*pi*k/N);
for n = 1:N-1
v0 = x(n) - a1*v1 - v2;
v2 = v1;
v1 = v0;
end
y = -a1*v1 - v2 - exp(-1i*2*pi*k/N)*v1;
M8.7
function y = goertzel_f(x,k,N)
% Goertzel-Algorithmus (2nd order system)
% function y = goertzelf(x,k,N)
% x : time signal
% k : index of dft coefficient
% N : dft length
% y : kth dft coefficient
% mw * 10Nov2010
if length(x)<N
x = [x zeros(1,N-length(x))];
end
a = [1 -2*cos(2*pi*k/N) 1];
b = 1;
y = filter(b,a,[x 0]);
y = y(N+1) - exp(-1i*2*pi*k/N)*y(N);
Search WWH ::




Custom Search