I try to plot the frequency response of the delay line canceller (FIR filter which used for MTI).
The delay line canceller has the following structure:
+-----+
| |
x [k] >---+---| T |
| | |
| +-----+
| |
| +-----+
| | |
| |x -1 |
| | |
| +-----+
| |
| +-----+
| | ___ |
\---| \ |---> y [k]
| /__ |
+-----+
Its frequency response is well known (Pg 20) and equal:
$$H(\omega) = 2 \cdot \left|\sin (\frac{\omega \cdot T} {2})\right| \tag{1}$$
I also try obtain frequency response of the canceller using algorithm which described on this question:
$$y [k] = x [k] - x [k - 1] \tag{2}$$
$$Y (z) = X (z) - X (z) z ^{-1} \tag {3}$$
$$ H(z) = 1 - z^{-1} \tag{4}$$
Now I try to plot (using GNU Octave) both of responses (1) and (4).
w = linspace (0, 2 * pi, 100);
z = exp (-j .* w);
H_z = 1 - z .^ -1;
H_w = 2.0 * abs (sin (w / 2) );
hold ("on");
plot (w, H_z, "1", "linewidth", 2);
plot (w, H_w, "2", "linewidth", 2);
title ("Frequency response of the delay line canceler.");
set (gca, 'XTick', 0: pi / 2: 2 * pi)
set (gca, 'XTickLabel',{'0', 'pi / 2', 'pi', '3 pi / 2','2 pi'})
xlabel ("Angular frequency.");
ylabel ("Magnitude.");
legend ("H (z)", 'H (\omega)');
I expect that they will be the same, but they are different.
Where is my mistake?
P.S. If I add modulus for (4) (like: H_z = abs (1 - z .^ -1);
) they will became the same.
You have to take the magnitude to get what you call the "frequency response" (which is usually referred to as "magnitude response" or simply "magnitude of the frequency response").
- Thanks a lot! This should be the answer. $\endgroup$