# How to find number of poles from the unit sample response?

Below I'm attaching a snapshot of a problem and its solution. I do not get how they figured out system functional $\dfrac{Y}{X}$ from the given table. I'd really appreciate if you please help me understand this...

• You know X is a unit impulse and you see that h[0]=1, which means the first non-delay term in the denominator must be 1. Then h[1]=2 involves a delay plus a previous sample of the input, which is zero from now on. Keep working like that. When the output doesn't allow adding more terms, you know you're done and the rest of the output serves as a verification, only. Jun 20, 2018 at 19:52
• Apart from the very first few samples, sample n is 3x bigger than sample n-1. Jun 20, 2018 at 20:11
• Least-squares z-TF estimation.
– Chu
Jun 20, 2018 at 22:52
• @aconcernedcitizen Let me give it a try : At $n=1$, the input is $0$, so the output $y[1]$ depends only on one thing : $y[0]$. This immediately establishes $y[1] = 2y[0]$ Jun 21, 2018 at 2:00
• (contd) At $n=2$, the output $y[2]$ depends on two things : $y[1],y[0]$. This means $y[2] = ay[1]+by[0]$ . Since we've already established that $a=2$, substituting we get $7=2*2+b*1$, this gives $b = 3$. So we can say $y[2] = 2y[1]+3y[0]$ Jun 21, 2018 at 2:06

It would help to break down the difference equation:

$$y_n=\frac{1}{b_0}(a_0 x_n+a_1 x_{n-1}+a_2 x_{n-2}-b_1 y_{n-1}-b_2 y_{n-2})$$

Assume a monic polynomial, so b0=1, you can multiply afterwards if needed. At this point, think of what would it take you to write down this equation in a programming language. You would have to break it down into time pieces.

1. n=0. Since the input is the $\delta_n$ function, it's a 1 at n=0 and zero in rest, so:

$$y_n=a_0 x_n \Rightarrow a_0=...$$

1. n=1. a0 has been found out, xn-1 is zero, yn-1 is known:

$$y_n=a_0 x_n +( a_1 x_{n-1} - b_1 y_{n-1}) \Rightarrow b_1=...$$

1. n=2. Again, some are known, some can be simplified thanks to the $\delta_n$ input, and given the equation you find out the missing terms, one by one.

Eventually, you'll find that the answer cannot have more terms and the equation found out at this point can be used to verify the rest of the impulse. This is not really done in practise, but it helps to understand that there is a way to systematically determine the transfer function, when they're not so complicated.