1
$\begingroup$

I am having trouble specifying the transfer function of the following system as seen below:

Filter

From the initial view I work out the difference equation to be:

$$ y(n) = x(n) - p^Nx(n-N) +py(n-1) $$

However should the constant before y(n-1) be negative p according to the following standardised equation for a difference equation?

\begin{align} y(n)=b_0 x(n)+&b_1 x(n-1)+\cdots+b_M x(n-M)\\ -&a_1 y(n-1)-\cdots-a_N y(n-N) \end{align}

Furthermore I am trying to work out the impulse response and it is required that the first $N$ values ($n=0,1,2,\ldots,N-1$) of the impulse response of the filter are defined as: $$ h(n) = p^2 $$

I cannot get this to work from my current workings but feel it may be related to the first problem.

Thanks for taking the time to read my problem and any help would be greatly appreciated!

$\endgroup$
5
  • $\begingroup$ You forgot an $x$ in your first equation. $\endgroup$
    – Gilles
    Aug 14, 2016 at 9:14
  • $\begingroup$ Ahh my mistake, cheers! $\endgroup$
    – Tricks
    Aug 14, 2016 at 9:24
  • $\begingroup$ For the $N$ values, is it $n=0,1,2,N-1$ or $n=0, 1, 2, \ldots, N-1$ ? $\endgroup$
    – Gilles
    Aug 14, 2016 at 9:34
  • $\begingroup$ The latter, i'll alter my question now, sorry againnn. $\endgroup$
    – Tricks
    Aug 14, 2016 at 9:35
  • $\begingroup$ No problem, it was just to be sure. ;) $\endgroup$
    – Gilles
    Aug 14, 2016 at 9:41

1 Answer 1

4
$\begingroup$

Your difference equation is correct. I'm not sure why you worry about signs because the signs of the coefficients $a_n$ are just a matter of definition. Just choose $\tilde{a}_n=-a_n$ and you have coefficients with a positive sign.

The impulse response of the system can be determined in a straightforward manner by making a table with entries for $n$ and $y[n]=h[n]$ (with input $x[n]=\delta[n]$):

$$ \begin{array}{c|c} n & y[n]\\ \hline 0 & 1\\ 1 & p\\ 2 & p^2\\ \vdots & \vdots\\ N-1 & p^{N-1}\\ N & p^N-p^N=0\\ N+1 & 0\\ \vdots & \vdots \end{array} $$

Note that despite the recursion in the system, we have a finite impulse response (FIR), i.e., the system could also be realized without a recursion. The impulse response can be written as

$$h[n]=\begin{cases}p^n,&0\le n <N\\0,&\text{otherwise}\end{cases}$$

or, equivalently, as

$$h[n]=p^n(u[n]-u[n-N])$$

where $u[n]$ is the discrete-time unit step function.

$\endgroup$
4
  • $\begingroup$ Thank you very much! For some reason when I was translating to my paper for working out I wasn't using the z^-N. Which negates that term for the impulse response? $\endgroup$
    – Tricks
    Aug 14, 2016 at 10:20
  • $\begingroup$ @Tricks: I'm sorry but I don't understand your question. Which term are you talking about? $\endgroup$
    – Matt L.
    Aug 14, 2016 at 11:03
  • $\begingroup$ @Gilles: Thanks for the edit, this looks much better now! $\endgroup$
    – Matt L.
    Aug 14, 2016 at 11:38
  • $\begingroup$ @MattL. , you're welcome. And excellent answer as always ! $\endgroup$
    – Gilles
    Aug 14, 2016 at 11:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.