Short question
What are main stages (steps) of calculation frequency response of digital filter by their structure?
Detailed question
Let suppose that there is discrete FIR filter with known structure which is implemented in programming language (for instance with structure which shown in picture):
+-----+ +-----+
| | | |
x (k) >---+---| T |---| T |
| | | | |
| +-----+ +-----+
| | |
| +-----+ |
| | | |
| | x 2 | |
| | | |
| +-----+ |
| | |
| +----------------+ +-----+
| | ___ | | 1 |
\---| \ |---| x - |---> y (k)
| /__ | | 4 |
+----------------+ +-----+
It is possible to pass into the filter input signal (as vector of integers which describe magnitude), like this:
in [0, 0, 0, 0, 4, 0, 0, 0, 0, 0]
Which describe signal with following magnitude:
|
x (k) |
|
. . . . . | . . . .
k 9 8 7 6 5 4 3 2 1 0
And get corresponding output signal, like this:
out [0, 0, 0, 0, 1, 2, 1, 0, 0, 0]
Which describe signal with following magnitude:
y (k)
|
. . . | | | . . . .
k 9 8 7 6 5 4 3 2 1 0
Question is how to calculate frequency response of the filter (by stages)?
Notes
With known input and output signals we can calculate transfer function of the filter by their images of Laplace transform (z-transform for discrete signals):
1. $$X(z) = \mathcal{L} \{x(k)\}$$
2. $$Y(z) = \mathcal{L} \{y(k)\}$$
3. $$H(z) = Y(z) / X(z)$$
And after if we get Fourier transform from transfer function we will get AFC:
4. $$FR = \mathcal{F} \{H(z)\}$$
Is it correct?