Wednesday, 21 October 2015

signal - How to know the kind of filter from the transfer function



I got that system \$x_n \to x_n-x_{n-1}\$, so \$h_n=[.....,0,1,-1,0,...]\$, with \$h_0=1\$ and \$h_1=-1\$, so the transfer function given by:


$$H(\omega)=\sum_{i=-\infty}^{\infty} h_ne^{-jwn} = h_0e^{-jw(0)}+h_1e^{-jw(1)}=1-e^{-jw}$$. How to knwo the type of filter, if it is high pass filter, low pass filter, etc.


I appreciate your help.




Answer



A completely formal answer would be: given the z-transform of an impulse response $$h = (0, \ldots, 0, 1, -1, 0, \ldots, 0)$$ which is $$H(z) = \sum^{\infty}_{n=-\infty} h_n z^{-n} = h_0 + h_1 z^{-1}$$ we study the frequency response $$H(z=e^{j 2 \pi f T}) = h_0 + h_1 e^{-j 2 \pi f T} = h_0 + h_1 \cos(2 \pi f T) - j h_1 \sin(2 \pi f T)$$ Clearly, $$|H(z=e^{j 2 \pi f T})| = 0$$ is the same as $$|H(z=e^{j 2 \pi f T})|^2 = 0 \Leftrightarrow (h_0 +h_1 \cos(2 \pi f T))^2 + (h_1 \sin(2 \pi f T))^2 = 0$$ $$h^2_0 + h^2_1 (\cos(2 \pi f T)^2+ \sin(2 \pi f T)^2) + 2 h_0 h_1 \cos(2 \pi f T) = h^2_0 + h^2_1 + 2 h_0 h_1\cos(2 \pi f T) = 0$$ So the zeros of this transfer function are at $$f_0 = \frac{k}{2 \pi T} \text{arccos}\left(- \frac{h_0^2 h_1^2}{2 h_0 h_1}\right), k \in \mathbb{Z}$$ If $$h_0 = 1, h_1 = -1$$ then this is a digital differentiator. For $$f \in [0, 1/T] = [0, f_s]$$ the frequencies at which the amplitude response is 0 are $$f_0 = \frac{1}{2 \pi T} \text{arccos}(1/2)= \frac{k}{T}, k \in \mathbf{Z}$$ so practically $$f_0 = \{0, f_s\}$$ which makes this filter the simplest highpass response. As for the phase response it is simply $$ \angle H(z = e^{j 2 \pi f T}) = \frac{\pi}{2} - \pi f T$$ The dual case is the digital integrator, i.e. $$h_0 = h_1 = 1$$


Another way to derive the differentiatior response is $$H(z = e^{j 2 \pi f T}) = 1 - e^{- j 2 \pi f T} = (e^{j \pi f T} - e^{-j \pi f T} ) e^{-j \pi f T} = j 2 \sin(\pi f T) e^{-j \pi f T}$$ We can also define $$G(f) = |H(z = e^{j 2 \pi f T})| = 2 \sin(\pi f T)$$ with $$f \in [0, f_s]$$. It is even simpler to see that $$G(f) = 2 \sin(\pi f T) = 0 \Leftrightarrow f = \{0, f_s = \frac{1}{T}\}$$ In this way it is also easier to see that the phase response is $$\angle H(z = e^{j 2 \pi f T}) = \angle j + \angle G(f) - \pi f T = \frac{\pi}{2} + 0 - \pi f T $$


No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...