# Digital Signal Processing/Z Transform

The Z Transform has a strong relationship to the DTFT, and is incredibly useful in transforming, analyzing, and manipulating discrete calculus equations. The Z transform is named such because the letter 'z' (a lower-case Z) is used as the transformation variable.

## z Transform Definition

For a given sequence x[n], we can define the z-transform X(z) as such:

[Z Transform]

$\mathcal{Z}(x[n]) = X(z) = \sum_{n=-\infty}^\infty x[n]z^{-n}$it is important to note that z is a continuous complex variable defined as such:
$z = Re(z) + j Im(z)$

It is important to note that the z-transform rarely needs to be computed manually, because many common results have already been tabulated extensively in tables.

## The Inverse Z-Transform

The inverse z-transform can be defined as such:

[Inverse Z Transform]

$x[n] = \frac{1}{2 \pi j} \oint_C X(z) z^{n-1} dz$

Where C is a closed-contour that lies inside the unit circle on the z-plane, and encircles the point z = {0, 0}.

The inverse z-transform is mathematically very complicated, but luckily--like the z-transform itself--the results are extensively tabulated in tables.

## Equivalence to DTFT

If we substitute $z = e^{j\omega}$, where $\omega$ is the frequency in radians per second, into the Z-transform, we get

$Z(e^{j\omega}) = \sum_{n=-\infty}^{\infty} x[n]e^{-j\omega n}$

which is equivalent to the definition of the Discrete-Time Fourier Transform. In other words, to convert from the Z-transform to the DTFT, we need to evaluate the Z-transform around the unit circle.

## Properties

Since the z-transform is equivalent to the DTFT, the z-transform has many of the same properties. Specifically, the z-transform has the property of duality, and it also has a version of the convolution theorem (discussed later).

The z-transform is a linear operator.

## Convolution Theorem

Since the Z-transform is equivalent to the DTFT, it also has a convolution theorem that is worth stating explicitly:

Convolution Theorem
Multiplication in the discrete-time domain becomes convolution in the z-domain. Multiplication in the z-domain becomes convolution in the discrete-time domain.

## Z-Plane

Since the variable z is a continuous, complex variable, we can map the z variable to a complex plane as such:

## Transfer Function

Let's say we have a system with an input/output relationship defined as such:

Y(z) = H(z)X(z)


We can define the transfer function of the system as being the term H(z). If we have a basic transfer function, we can break it down into parts:

$H(z) = \frac{N(z)}{D(z)}$

Where H(z) is the transfer function, N(z) is the numerator of H(z) and D(z) is the denominator of H(z). If we set N(z)=0, the solutions to that equation are called the zeros of the transfer function. If we set D(z)=0, the solutions to that equation are called the poles of the transfer function.

The poles of the transfer function amplify the frequency response while the zero's attenuate it. This is important because when you design a filter you can place poles and zero's on the unit circle and quickly evaluate your filters frequency response.

### Example

Here is an example:

$Y(z) = \frac{z^{-1}}{(z^{-1} + 2)}X(z)$

So by dividing through by X(z), we can show that the transfer function is defined as such:

$H(z) = \frac{z^{-1}}{(z^{-1} + 2)}$

We can also find the D(z) and N(z) equations as such:

$N(z) = z^{-1}$
$D(z) = (z^{-1} + 2)$

And from those equations, we can find the poles and zeros:

Zeros
z → 0
Poles
z → -1/2

## Stability

It can be shown that for any system with a transfer function H(z), all the poles of H(z) must lie within the unit-circle on the z-plane for the system to be stable. Zeros of the transfer function may lie inside or outside the circle.

## Gain

Gain is the factor by which the output magnitude is different from the input magnitude. If the input magnitude is the same as the output magnitude at a given frequency, the filter is said to have "unity gain".

## Properties

Here is a listing of the most common properties of the Z transform.

Time domain Z-domain ROC
Notation $x[n]=\mathcal{Z}^{-1}\{X(z)\}$ $X(z)=\mathcal{Z}\{x[n]\}$ ROC: $r_2<|z|
Linearity $a_1 x_1[n] + a_2 x_2[n]\$ $a_1 X_1(z) + a_2 X_2(z) \$ At least the intersection of ROC1 and ROC2
Time shifting $x[n-k]\$ $z^{-k}X(z) \$ ROC, except $z=0\$ if $k>0\,$ and $z=\infty$ if $k<0\$
Scaling in the z-domain $a^n x[n]\$ $X(a^{-1}z) \$ $|a|r_2<|z|<|a|r_1 \$
Time reversal $x[-n]\$ $X(z^{-1}) \$ $\frac{1}{r_2}<|z|<\frac{1}{r_1} \$
Conjugation $x^*[n]\$ $X^*(z^*) \$ ROC
Real part $\operatorname{Re}\{x[n]\}\$ $\frac{1}{2}\left[X(z)+X^*(z^*) \right]$ ROC
Imaginary part $\operatorname{Im}\{x[n]\}\$ $\frac{1}{2j}\left[X(z)-X^*(z^*) \right]$ ROC
Differentiation $nx[n]\$ $-z \frac{\mathrm{d}X(z)}{\mathrm{d}z}$ ROC
Convolution $x_1[n] * x_2[n]\$ $X_1(z)X_2(z) \$ At least the intersection of ROC1 and ROC2
Correlation $r_{x_1,x_2}(l)=x_1[l] * x_2[-l]\$ $R_{x_1,x_2}(z)=X_1(z)X_2(z^{-1})\$ At least the intersection of ROC of X1(z) and X2($z^{-1}$)
Multiplication $x_1[n]x_2[n]\$ $\frac{1}{j2\pi}\oint_C X_1(v)X_2(\frac{z}{v})v^{-1}\mathrm{d}v \$ At least $r_{1l}r_{2l}<|z|
Parseval's relation $\sum^\infty x_1[n]x^*_2[n]\$ $\frac{1}{j2\pi}\oint_C X_1(v)X^*_2(\frac{1}{v^*})v^{-1}\mathrm{d}v \$
• Initial value theorem
$x[0]=\lim_{z\rightarrow \infty}X(z) \$, If $x[n]\,$ causal
• Final value theorem
$x[\infty]=\lim_{z\rightarrow 1}(z-1)X(z) \$, Only if poles of $(z-1)X(z) \$ are inside unit circle