Skip to main content

Discrete Calculus

In this chapter, we will introduce fourier transform for discrete signals.

Discrete Pulse Signal

Similarly, we can define discrete signal. Unlike continuous signal, where pulse signal is a limit of any distribution, discrete signal is just a sequence of 0 and 1.

δ[n]={1if n=00otherwise\delta[n] = \begin{cases} 1 & \text{if } n = 0 \\ 0 & \text{otherwise} \end{cases}

Similarly, we use sum instead of integral. So,

u[t]={0if t<01if t0u[t] = \begin{cases} 0 & \text{if } t < 0 \\ 1 & \text{if } t \geq 0 \end{cases}

Where,

u[t]=n=tδ[n]u[t] = \sum_{n=-\infty}^{t} \delta[n]

Discrete Convolution

We simply replace the integral with sum,

x[t]y[t]=n=+x[nt]y[n]x[t] \ast y[t] = \sum_{n=-\infty}^{+\infty} x[n-t] y[n]

Discrete Calculus

tip

Discrete calculus is not a subject that mathematicians study a lot, so there isn't a unified notation or way to do it.

There are more than one ways- wether focused on forward difference, backward difference, shifting forward, backward operator, etc. Using only one of them, we can build up a discrete calculus theory.

For simplicity and convenience, we use both backward difference and shifting backward operators to build our theory.

Operators

We note the backward shift as,

B(x[n])=x[n1]\mathcal{B}(x[n]) = x[n-1]

And difference (backward) as,

Δx[n]=x[n]x[n1]\Delta x[n] = x[n] - x[n - 1]

It's obvious that,

Δ=1B\Delta = 1 - \mathcal{B}

The eigen function of the B\mathcal{B} is znz^n,

Bzn=1zzn\mathcal{B} z^n = \frac{1}{z} z^{n}

And so is true for difference

Δzn=znzn1=(11z)zn\Delta z^n = z^n - z^{n-1} = (1 - \frac{1}{z}) z^{n}

The inverse of B\mathcal{B} is,

B1x[n]=x[n+1]\mathcal{B}^{-1} x[n] = x[n + 1]

That is the moving-forward.

Obviously, they are all linear operators.

Factorial Power Sequence

There is also an important sequence, the (decrease) factorial power sequence,

xn=x(x1)(x2)(xn+1)x^{\underline{n}} = x \cdot (x - 1) \cdot (x - 2) \cdot \cdots \cdot (x - n + 1)

This is worthy of mentioning here since,

Δzn=znzn1=n(z1)n1\Delta z^{\underline{n}} =z^{\underline{n}} - z^{\underline{n-1}} \\ = n (z - 1)^{\underline{n - 1}}

Which corresponds to,

Dxn=nxn1Dx^n = nx^{n - 1}

We can factor normal power into factorial power,

zn=k=0n{nk}zkz^n = \sum_{k=0}^{n} \genfrac{\{}{\}}{0pt}{}{n}{k} z^{\underline{k}}

{nk}\genfrac{\{}{\}}{0pt}{}{n}{k} is called the stirling number of the second kind. It satisfies,

{nk}={n1k1}+k{n1k}{m0}=1\genfrac{\{}{\}}{0pt}{}{n}{k} = \genfrac{\{}{\}}{0pt}{}{n-1}{k-1} + k\genfrac{\{}{\}}{0pt}{}{n-1}{k} \\ \genfrac{\{}{\}}{0pt}{}{m}{0} = 1

You don't need to remember those- we don't dive that deep. You can just have the following common formula,

z2=z2+z1z3=z3+3z2+z1z^2 = z^{\underline{2}} + z^{\underline{1}} \\ z^3 = z^{\underline{3}} + 3z^{\underline{2}} + z^{\underline{1}} \\

Product Rule of Difference

Just like derivative, where,

D(uv)=uDv+vDuD(uv) = u D v + v D u

We have,

Δ(x[n]y[n])=x[n]y[n]x[n1]y[n1]=x[n]y[n]x[n]y[n1]+x[n]y[n1]x[n1]y[n1]=x[n]Δy[n]+By[n]Δx[n]\Delta(x[n] y[n]) = x[n]y[n] - x[n-1]y[n-1] \\ = x[n]y[n] - x[n]y[n-1] + x[n]y[n-1] - x[n-1]y[n-1] \\ = x[n]\Delta y[n] + \mathcal{B} y[n] \Delta x[n]

Sum

Sum corresponds to the integral.

We define,

X[n]=x[k]X[n] = \sum x[k]

Where,

ΔX[n]=x[n]\Delta X[n] = x[n]

Thus,

X[n]=Δ1x[n]X[n] = \Delta^{-1} x[n]

Likewise, adding any constant CC won't change this property,

X[n]+C=x[n]X[n] + C = \sum x[n]
tip

Please note that,

1Δnp=1p+1(n+1)p+1\frac{1}{\Delta} n^{\underline{p}} = \frac{1}{p + 1} (n + 1)^{\underline{p + 1}}

In addition, we also have,

X[b]X[a]=abx[n]=n=abx[n]baX[b] - X[a] = \sum_{a}^{b} x[n] = \sum_{n=a}^{b} x[n] \quad b \geq a

If b<ab < a, then we have,

abx[n]=bax[n]\sum_{a}^{b} x[n] = -\sum_{b}^{a} x[n]

Just like the integral, we have the sum by partition, what we call the Abel summation.

Previous, we concluded,

Δ(x[n]y[n])=x[n]Δy[n]+By[n]Δx[n]\Delta(x[n] y[n]) = x[n]\Delta y[n] + \mathcal{B} y[n] \Delta x[n] abx[n]Δy[n]=ab(Δ(x[n]y[n])By[n]Δx[n])=(x[n]y[n])ababBy[n]Δx[n]\sum_{a}^{b} x[n] \Delta y[n] \\ =\sum_{a}^{b} (\Delta(x[n]y[n]) - \mathcal{B} y[n] \Delta x[n]) \\ = (x[n]y[n])|_{a}^{b} - \sum_{a}^{b} \mathcal{B} y[n] \Delta x[n] \\

That equals to say,

x[n]Δy[n]=x[n]y[n]By[n]Δx[n]\sum x[n]\Delta y[n] = x[n]y[n] - \sum \mathcal{B} y[n] \Delta x[n]

For example, if we want,

Y[n]=0nz22zY[n] = \sum_{0}^{n} z^2 2^z

If you never learnt discrete calculus, it'd take some trick to get the result. But we can do it with brute force now,

z22z=z2(2z+12z)=z2Δ2z+1=z22z+12zΔz2=z22z+12z(2z1)=z22z+1(2z1)Δ2z+1=2z+1(z22z+1)+2z+1=2z+1(z22z+3)\sum z^2 2^z \\ = \sum z^2 (2^{z+1} - 2^{z}) \\ = \sum z^2 \Delta 2^{z+1} \\ = z^2 2^{z+1} - \sum 2^z \Delta z^2 \\ = z^2 2^{z+1} - \sum 2^z (2z - 1) \\ = z^2 2^{z+1} - \sum (2z - 1) \Delta 2^{z+1} \\ = 2^{z+1}(z^2 - 2z + 1) + \sum 2^{z + 1} \\ = 2^{z+1}(z^2 - 2z + 3)

Thus,

Y[n]=2n+1(n22n+3)+CY[0]=6+C=0Y[n] = 2^{n+1}(n^2 - 2n + 3) + C \\ Y[0] = 6 + C = 0

So,

Y[n]=2n+1(n22n+3)6Y[n] = 2^{n+1}(n^2 - 2n + 3) - 6
info

Other methods to calculate the sum includes,

Using shift-and-subtract method, that is,

Y[n]2Y[n]=z22z+1+1n(z2(z1)2)2zY[n] - 2Y[n] = - z^2 2^{z+1} + \sum_{1}^{n} (z^2 - (z - 1)^2) 2^{z}

And repeat it. This is just using Abel summation indirectly.

Another trick is using z-transformation, a transform introduced alter. This trick equals to the method of generation function.