The frequency response is calculated from the filter coefficients
I can't find any understandable information about the subject On Wikipedia in the Netherlands, I found that you can apply a Z-transform, which generates a formula in this form:
Take FIR filter as an example: upload wikimedia. org/math/b/9/e/b9e2ed5184f98621922f716e5216f33d. png
Use Z transform: upload wikimedia. org/math/4/d/6/4d6621be8fabf4db8816c12f34ed9877. png
In that example, e ^ it (natural logarithm rises to imaginary units, t = theta) replaces Z: upload wikimedia. org/math/0/6/e/06eada8fedfb492bd63bb50491b042aa. png
The graph of this function is then used and treated as a frequency response I think this method is easy to calculate the frequency response of the filter But is this method effective? When I think of a small delay ("blocking" the original signal), I find that the frequency response of each frequency should be 1, because the signal does not change, but it is delayed. However, using this method, I calculate the frequency response as follows:
y(n) = 0*x(n) + 1*x(n-1)
Z transform
H(z) = 0 + 1z^-1
Replace e ^ it (with T = theta):
H(e^it) = 0 + 1 * e^-it
Since this produces a sine wave as a frequency response, I have to do something wrong or misunderstand something If someone can help me, I will be very happy!
Solution
According to rwong's comments, system function h provides you with the phase and amplitude response of the system at a specific frequency This means that if the input to the system is cos[ ω n] = cos [2 π FN], then the output will be (f) cos [2 π FN] Φ (f) ], where a (f) = |h (f)| Φ (f) = phase (H (f)) In your case, the amplitude is 1 because the signal is not scaled in any way, just shifted in time And the phase shift is- ω, among ω Is the angular frequency of the sinusoidal input of the system
I hope the following contents are not too simple for stack overflow, but the basic knowledge of time series analysis may be helpful to miniear and others
If the impulse response of your system is h [n]= δ [n-1] (where δ [n] Is a delta function), as shown in your example, which means you delay the input by 1 step Think about what this means for the phase of the sine curve The digital frequency of the fastest changing sine wave is 0.5 (i.e. the period of 2 samples) – for example, cos [π n] This is series [1, - 1,...] If this signal is delayed by 1, a series [- 1,1,...] is obtained, that is, cos [π n – π] = cos [π (n – 1)], that is, the phase shift of the input signal - π radian (- 180 degrees) Observe a longer period signal with a digital frequency of 0.25 (i.e. the period of 4 samples) – for example, cos [0.5 π n] This is the [1,...] series The unit delay generates a series [0, i.e. cos [0.5 π n – 0.5 π] = cos [0.5 π (n – 1)], i.e. the phase offset of the input signal is - π / 2 radians (- 90 degrees) Similarly, you can calculate the input of COS [0.25 π n] to produce the output of COS [0.25 π n – 0.25 π] = cos [0.25 π (n – 1)], that is, the input phase offset - π / 4 radians (- 45 degrees), etc
Obviously, if the input angular frequency is ω (e.g. 0.5 π), the output will be phase shifted Φ=-ω. The signal is regarded as a train around a unit circle on a counterclockwise route, and its time series value corresponds to the stop on this route An angular frequency of 0.5 π means that it stops four times at the following radian values: 0,0.5 π, π, 1.5 π Then it returns 0 and repeats the loop If the train stops late, it corresponds to an offset of - 0.5 π radian on the scheduled route
Back to h (f), why do I want it to be equal to exp (- I2 π f) = exp (- I) ω) It makes sense Similarly, if your system has a delay of 2, then h [n]= δ [n-2] and H (f) = exp (- I4 π f) = exp (- 2I ω) – This is a 2 - stop delay unit lap This is what all the frequency responses of the system / filter tell you, that is, the degree to which the system scales and delays each input sine wave as a function of frequency
Fir systems (i.e. finite impulse response, corresponding to moving average model [Ma]) are the simplest because they are only the sum of delta (i.e. proportional and delay) functions on the feedforward path The analysis of IIR systems (i.e. infinite impulse response, corresponding to autoregressive model [ar]) is more interesting because they have feedback paths