3

I am implementing an FIR Filter described as below:

y(n) = x(n) + 2x(n-1) + 4x(n-2) + 2x(n-3) + x(n-4)

Where there are no poles in this system.

Computing the transfer function on MATLAB yields HZ = 1 + 2 z^-1 + 4 z^-2 + 2 z^-3 + z^-4 which is correct, but when I try to plot the Zeros locations I find a pole at the origin. However the impulse response of the system is correct, but it's only shifted to the right side by one. Why is this also happening ?

What I cannot figure out is, why there is a pole at the origin and why there are some zeros outside the unit circle.

close all;clear;clc;

Ts = 0.1;

num = [1, 2, 4, 2, 1];
den = 1;

HZ = tf(num, den, Ts, 'variable', 'z^-1')

Pole zero map

impulse response

figure(1)
pzplot(HZ)
axis equal

figure(2)
stem(impulse(HZ*Ts), 'linewidth', 1)
xlabel('n', 'FontSize', 13)
ylabel('h(n)', 'FontSize', 13)
title('Impulse Response')
grid minor
axis([0 10 0 max(num)+0.1])
Tes3awy
  • 2,166
  • 5
  • 29
  • 51
  • FIR filters contain poles as many as their zeros but they are all located at the origin. Multiply the both num and den by the z^4 – percusse Dec 25 '16 at 22:39
  • @percusse I understand what you mean, but your solution requires symbolic expressions, and I want to compute the numerical values. – Tes3awy Dec 25 '16 at 22:46
  • invert your num and use den as `[1,0,0,0,0]` for example. You can also use filter commands of signal processing toolbox for this – percusse Dec 25 '16 at 22:47
  • @percusse You mean I use `'Z'` instead of `'z^-1'` ? – Tes3awy Dec 25 '16 at 22:49
  • If you want the inverse powers of z then use `filt(num,den,0.1)`. it will do what you want – percusse Dec 25 '16 at 22:51

1 Answers1

1

your impulse response is HZ = 1 + 2 z^-1 + 4 z^-2 + 2 z^-3 + z^-4 thus for z = 0 i.e Origin the impulse response is infinity/undefined and hence by convention z=0 should be a pole. And since your impulse response is 'Finite Duration' the ROC is whole Z-Plain except 0 and ROC can contain Zeroes but not poles. Thus you have zeroes outside the unit circle. Anyways you can always put HZ = 0 and compute values of Z ( the equation is of degree 4 there should be 4 values.)

Mahaveer
  • 435
  • 4
  • 14
  • The zeros outside makes the system unstable, however, it is a finite impulse system and in this example has to be a stable one. – Tes3awy Dec 25 '16 at 19:44
  • I dont know about zeroes but i read that if ROC contains unit circle System should be stable. – Mahaveer Dec 25 '16 at 19:59
  • Part of your answer is right, I read about stability and causality and found that stability counts only on poles either in or outside the unit circle. But I don't understand the pole at origin. – Tes3awy Dec 26 '16 at 23:13
  • @OsamaAbbas, let see if i can clarify _Pole is any point where the function becomes undefined/infinity_ right?. Now your `impulse response is HZ = 1 + 2 z^-1 + 4 z^-2 + 2 z^-3 + z^-4`. This is a geomentric progression with **5 terms and z^-1 as common ratio**. Now if we use the formula for Sum of G.P we get `HZ = (1 - z^5)/z^4(1-z)` now try to put `z=0` in this and see if you get infinity :) . You can always put `z=0 in HZ = 1 + 2 z^-1 + 4 z^-2 + 2 z^-3 + z^-4` and you'll still get `infinity` as `1*z^-1 at z = 0 equals 1*1/0 = infinity ` – Mahaveer Dec 27 '16 at 02:12
  • Your answer is somewhat conveniant, but I am sure that pole at the origin gives a very high gain, however the impulse response is not approaching infinity. Thus, the pole at the origin is plotted for a reason. If you put your cursor over the pole at the origin, you can see it's charachtristics, the overshoot is NaN, which makes me say that your answer is somewhat conveniant. – Tes3awy Dec 27 '16 at 17:12