Difference equation and initial conditions

simozz

Joined Jul 23, 2017
125
Hello,

In a signal processing exercise I have a system described by the following input output difference equation

$$y(n) = x(n) + y(n-1) + y(n-2)$$

and is it required to determine the initial conditions $$y(n-1)$$ and $$y(n-2)$$ such that $$y(0) = y(1) = 1$$ when $$x(n) = \delta(n)$$.

At first glance, I would say that if
$$x(n) = \delta(n) = 1 \qquad \text{if}\, n = 0$$

then
\begin{aligned} y(0) & = x(0) + y(-1) + y(-2) \\ 1 & = 1 + y(-1) + y(-2) \end{aligned}

so the sum of both initial conditions should be zero. Then, solving for $$y(1)$$:

\begin{aligned} y(1) & = x(1) + y(0) + y(-1)\\ 1 &= 0 + 1 + y(-1) \end{aligned}

seems that both initial conditions must be zero.
But I am not sure about the correctness of my solution.

Initial conditions (IC) are usually assumed to be zero in filtering problems, but unfortunately DSP textbooks usually show a lack of interest for IC, in most of the cases even without mentioning them at all...

Could someone confirm or give an hint (not the solution) about the correct way to solve it in case of wrong solution ?
s.

Last edited:

Papabravo

Joined Feb 24, 2006
21,222
It is a mistake to assign a finite value to a delta function at n=0. It is not a proper function in the sense that it is the limit of a series of distributions about n=0 that have progressively smaller variances. If only makes sense to use it inside an integral.

simozz

Joined Jul 23, 2017
125
Hello @Papabravo,

In this case it is assumed that $$\delta(n)$$ is the unit impulse (or Kronecker delta).
The sequence is discrete

s.

Last edited:

Papabravo

Joined Feb 24, 2006
21,222
Hello @Papabravo,

In this case it is assumed that $$\delta(n)$$ is the unit impulse (or Kronecker delta).
The sequence is discrete.

Anyway, I realized that the solution is wrong.

s.
I'm sorry, but you chose the WRONG notation for the Kronecker delta. The correct notation has two subscripts i and j. Like this:

$$\delta_{ij}$$

The value is one if i is equal j and zero otherwise. You should not be tossing around names if you don't know what you are talking about.

simozz

Joined Jul 23, 2017
125
I'm sorry, but you chose the WRONG notation for the Kronecker delta. The correct notation has two subscripts i and j. Like this:

$$\delta_{ij}$$

The value is one if i is equal j and zero otherwise. You should not be tossing around names if you don't know what you are talking about.
I am sorry but $$\delta(n)$$, or $$\delta[n]$$ is a widely used notation in this case.
I think I know what I am talking about.

s.

Last edited: