z-Transform z-Transform
What is the z-Transform?
The DTFT is a tool that lets us to view a signal as a sum of complex exponentials at different frequencies. However, the DTFT analysis equation adds infinitely many terms, so it can be used when this sum converges.
\[X(e^{j\omega}) = \sum_{n=-\infty}^{\infty} x[n]e^{-j\omega n}\]For example, the unit step $u[n]$ stays at $1$ forever, and $2^n u[n]$ keeps growing. For signals like these, the sum does not converge, so their DTFT cannot be found.
However, such signals often appear in the real-world systems. So we extend the DTFT to handle these signals as well. This extension is the z-transform.
From DTFT to z-Transform
The idea is simple. If a signal is too large for the sum to converge, we just make it smaller before taking the DTFT.
Consider the DTFT of $x[n]$ multiplied by $r^{-n}\,(r>0)$.
\[\sum_{n=-\infty}^{\infty} \big(x[n]r^{-n}\big)e^{-j\omega n} = \sum_{n=-\infty}^{\infty} x[n]\big(re^{j\omega}\big)^{-n}\]For example, if $x[n]=2^n u[n]$, then $x[n]r^{-n}=(2/r)^n u[n]$. If we choose $r>2$, this signal decays, so the sum converges.
Now let us write $re^{j\omega}$ as a single complex number $z$:
\[z = re^{j\omega}\]Then the equation above becomes
\[X(z) = \sum_{n=-\infty}^{\infty} x[n]z^{-n}\]In other words, the z-transform is the DTFT of $x[n]$ multiplied by $r^{-n}$. Here, $r$ controls how quickly $r^{-n}$ decays.
In particular, if $r=1$, the z-transform is same as the DTFT.
\[X(z)\Big|_{z=e^{j\omega}} = X(e^{j\omega})\]Points with $\lvert z\rvert=1$ form the unit circle in the complex plane. So the DTFT is the z-transform on a unit circle.
z-Transform Representation
Definition
The z-transform of $x[n]$ is defined as:
\[X(z) = \sum_{n=-\infty}^{\infty} x[n] z^{-n} \tag{1}\]Since $z$ is a complex number, $X(z)$ is a function defined on the complex plane. We call this the z-plane.
Let us start with a finite-length signal. Suppose $x[n]=1,2,3$ for $n=0,1,2$, and $x[n]=0$ otherwise. Its z-transform is
\[X(z) = 1+2z^{-1}+3z^{-2}\]Each value of $x[n]$ simply becomes the coefficient of $z^{-n}$. In other words, $z^{-n}$ works like a label that says “this value is at sample $n$”.
Inverse z-Transform
Since the z-transform is the DTFT of $x[n]r^{-n}$, we can can go back to the time domain using the DTFT synthesis equation:
\[x[n]r^{-n} = \frac{1}{2\pi}\int_{2\pi} X(re^{j\omega})e^{j\omega n}\,d\omega\]Multiplying both sides by $r^n$ and substituting $z=re^{j\omega}$, we obtain
\[x[n] = \frac{1}{2\pi j}\oint X(z)z^{n-1}\,dz \tag{2}\]where $\oint$ denotes an integral once around a circle of radius $r$, counterclockwise.
In practice, we rarely compute this integral directly. Instead, we decompose $X(z)$ into a sum of simple terms, look up each term in the table below, and convert it back to the time domain.
Region of Convergence (ROC)
The sum in equation $\small(1)$ does not converge for every $z$. The set of $z$ for which the sum converges is called the region of convergence (ROC).
ROC Depends Only on $\lvert z\rvert$
Here, “converges” means that the sum of the magnitudes $\lvert x[n]z^{-n}\rvert$ is finite, just like absolute summability for the DTFT.
If $z=re^{j\omega}$, the magnitude of each term is
\[\lvert x[n]z^{-n}\rvert = \lvert x[n]\rvert r^{-n}\]This does not depend on $\omega$ So whether the sum converges depends only on $r$, the distance of $z$ from the origin.
As a result, if the sum converges at one point $z$, it also converges at every point on the circle through $z$ centered at the origin. The ROC is therefore always a ring centered at the origin. This includes the case where the ring has no inner or outer boundary, such as the outside or inside of a circle.
Same $X(z)$, Different Signals
Let’s compare two signals. The z-transform of the right-sided signal $x_1[n]=a^n u[n]$ is
\[X_1(z) = \sum_{n=0}^{\infty} \big(az^{-1}\big)^n = \frac{1}{1-az^{-1}}, \qquad \lvert z\rvert>\lvert a\rvert\]The sum starts at $n=0$ because $u[n]=0$ for $n<0$. This is a geometric series with common ratio $az^{-1}$, so it converges only when $\lvert az^{-1}\rvert<1$, that is, $\lvert z\rvert>\lvert a\rvert$.
The z-transform of Left-sided signal $x_2[n]=-a^n u[-n-1]$ is
\[X_2(z) = -\sum_{n=-\infty}^{-1} a^n z^{-n} = -\sum_{m=1}^{\infty} \big(a^{-1}z\big)^m = \frac{1}{1-az^{-1}}, \qquad \lvert z\rvert<\lvert a\rvert\]Now, it converges only when $\lvert a^{-1}z\rvert<1$, that is, $\lvert z\rvert<\lvert a\rvert$.
Switch between the two signals and move $a$. $X(z)$ stays the same, but the ROC flips from the outside of the circle $\lvert z\rvert=a$ to its inside. The DTFT exists only when the ROC contains the unit circle.
Two signals $x[n]$ are completely different, but their $X(z)$ is exactly same. The only difference is ROC. In other words, a z-transform determines a unique signal only when it is written together with its ROC.
Properties of the ROC
- Right-sided signal: The ROC is the outside of a circle.
- Left-sided signal: The ROC is the inside of a circle.
- Two-sided signal The ROC is a ring between two circles. If these two regions do not overlap, the z-transform does not exist.
- Finite-length signal: There are only finitely many terms, so the sum converges for every $z$, except possibly $z=0$ or $z=\infty$.
In every case, the ROC is a single connected region.
The shape of the ROC for each kind of signal. It is always bounded by circles centered at the origin.
ROC and the DTFT
The DTFT is the z-transform on the unit circle. So the DTFT exists when the ROC includes the unit circle.
For example, the ROC of $u[n]$ is $\lvert z\rvert>1$. This ROC does not include a unit circle, so the DTFT of $u[n]$ does not exist. However, its z-transform does exist: $X(z)=1/(1-z^{-1})$.
DTFT vs. z-Transform
| DTFT | z-Transform | |
|---|---|---|
| Variable | $e^{j\omega}$: a point on the unit circle | $z=re^{j\omega}$: a point in the complex plane |
| Transform | $X(e^{j\omega})=\sum_n x[n]e^{-j\omega n}$ | $X(z)=\sum_n x[n]z^{-n}$ |
| Exists when | $x[n]$ is absolutely summable (sufficient condition) | The ROC is not empty (The sum converges for at least one $z$) |
| Inverse | $x[n]=\frac{1}{2\pi}\int_{2\pi} X(e^{j\omega})e^{j\omega n}\,d\omega$ | $x[n]=\frac{1}{2\pi j}\oint X(z)z^{n-1}\,dz$ |
| Relation | $X(z)$ on the unit circle (if the ROC includes it) | DTFT of $x[n]r^{-n}$ |
Poles and Zeros
All the z-transforms we have seen so far are rational functions, that is, ratios of two polynomials in $z^{-1}$. In fact, most z-transforms we deal with in practice have this form:
\[X(z) = \frac{B(z)}{A(z)} = \frac{b_0+b_1z^{-1}+\cdots+b_Mz^{-M}}{a_0+a_1z^{-1}+\cdots+a_Nz^{-N}}\]- The roots of the numerator are called zeros, because $X(z)=0$ there.
- The roots of the denominator are called poles, because $X(z)\to\infty$ there.
On the z-plane, we mark zeros with $\circ$ and poles with $\times$.
For example, $X(z)=1/(1-az^{-1})=z/(z-a)$ has a zero at $z=0$ and a pole at $z=a$.
The ROC never contains a pole, since $X(z)$ is infinite there. Its boundary is therefore always a circle through a pole. For example, for a right-sided signal, the ROC lies outside the circle through the outermost pole.
Frequency Response from Poles and Zeros
Just by looking at where the poles and zeros are, we can predict the rough shape fo the DTFT.
First, factor $X(z)$ as
\[X(z) = b_0\,\frac{\prod_{k}(1-c_kz^{-1})}{\prod_{k}(1-d_kz^{-1})}\]where the $c_k$ are the zero and the $d_k$ are the pole. Substituting $z=e^{j\omega}$ gives
\[X(e^{j\omega}) = \lvert b_0\rvert\, \frac{\prod_{k} e^{-j\omega} (e^{j\omega}-c_k)}{\prod_{k} e^{-j\omega} (e^{j\omega}-d_k)}\]Since $\lvert e^{-j\omega}\rvert=1$, the magnitude is
\[\lvert X(e^{j\omega})\rvert = \lvert b_0\rvert\, \frac{\prod_{k}\lvert e^{j\omega}-c_k\rvert}{\prod_{k}\lvert e^{j\omega}-d_k\rvert}\]Here, $e^{j\omega}$ is a point on the unit circle. So $\lvert e^{j\omega}-c_k\rvert$ is the distance from this point to the zero $c_k$, and $\lvert e^{j\omega}-d_k\rvert$ is its distance to each pole.
As $\omega$ goes from $0$ to $2\pi$, the point $e^{j\omega}$ goes around the unit circle once:
- Near a pole: the denominator becomes small, so $\lvert X(e^{j\omega})\rvert$ rises sharply.
- Near a zero: the numerator becomes small, so $\lvert X(e^{j\omega})\rvert$ drops toward $0$.
The point $e^{j\omega}$ goes around the unit circle. $\lvert X(e^{j\omega})\rvert$ is its distance to the zero divided by its distance to the pole, so it peaks where the point passes close to the pole and dips where it passes close to the zero. Move $a$, or put the zero at $-1$.
Partial Fraction Expansion
Knowing the poles also makes the inverse z-transform easier. We split $X(z)$ into a sum of terms, each with a single pole, and then look up each term in the table below.
For example, consider
\[X(z) = \frac{1}{(1-0.5z^{-1})(1-0.25z^{-1})}, \qquad \lvert z\rvert>0.5\]Its poles are $0.5$ and $0.25$, so we can split it into two terms:
\[X(z) = \frac{2}{1-0.5z^{-1}}-\frac{1}{1-0.25z^{-1}}\]The ROC is the outside of $0.5$, so two terms are right-sided signal. inverse z-transform is
The ROC lies outside the outermost pole $0.5$, so both terms correspond to right-sided signals. Using the table, we get
\[x[n] = \big(2(0.5)^n-(0.25)^n\big)u[n]\]Common z-Transform Pairs
| $x[n]$ | $X(z)$ | ROC |
|---|---|---|
| $\delta[n]$ | $1$ | for all $z$ |
| $\delta[n-m]$ | $z^{-m}$ | for all $z$ except $z=0$ or $\infty$ |
| $u[n]$ | $\frac{1}{1-z^{-1}}$ | $\lvert z\rvert>1$ |
| $a^n u[n]$ | $\frac{1}{1-az^{-1}}$ | $\lvert z\rvert>\lvert a\rvert$ |
| $-a^n u[-n-1]$ | $\frac{1}{1-az^{-1}}$ | $\lvert z\rvert<\lvert a\rvert$ |
| $na^n u[n]$ | $\frac{az^{-1}}{(1-az^{-1})^2}$ | $\lvert z\rvert>\lvert a\rvert$ |
| $\cos(\omega_0 n)u[n]$ | $\frac{1-\cos\omega_0\,z^{-1}}{1-2\cos\omega_0\,z^{-1}+z^{-2}}$ | $\lvert z\rvert>1$ |
z-Transform Properties
The properties of the z-transform are almost the same as those of the DTFT. The difference is that we also need to keep track of how the ROC changes.
Below, $X(z)$ denotes the z-transform of $x[n]$, and $R_x$ denotes its ROC.
Linearity
The z-transform of a sum is the sum of the z-transforms:
\[ax[n]+by[n] \;\longleftrightarrow\; aX(z)+bY(z)\]The ROC contains at least $R_x\cap R_y$. It can be larger if some poles are canceled by zeros when the two are added.
Time Shift
Shifting a signal in time multiplies its z-transform by a power of $z^{-1}$:
\[x[n-n_0] \;\longleftrightarrow\; z^{-n_0}X(z)\]As we saw earlier, multiplying by $z^{-1}$ delays the signal by one sample. The ROC stays $R_x$, except that $z=0$ or $z=\infty$ may be removed or added.
Multiplication by an Exponential
Multiplying a signal by $z_0^n$ scales its z-transform in the z-plane:
\[z_0^n\,x[n] \;\longleftrightarrow\; X\!\left(\frac{z}{z_0}\right)\]The ROC becomes $\lvert z_0\rvert R_x$, that is, $R_x$ scaled by $\lvert z_0\rvert$. Every pole and zero is also multiplied by $z_0$.
When $z_0=e^{j\omega_0}$, this is the frequency shift property of the DTFT. In this case, the poles and zeros rotate by $\omega_0$ around the origin, and the ROC does not change.
Time Reversal
Flipping a signal in time replaces $z$ with $z^{-1}$:
\[x[-n] \;\longleftrightarrow\; X(z^{-1})\]The ROC becomes $1/R_x$: the outside of a circle turns into the inside of a circle, and vice versa. This matches what happens to the signal: flipping a right-sided signal gives a left-sided one.
Convolution
Convolution in time becomes multiplication in the z-domain:
\[x[n]*h[n] \;\longleftrightarrow\; X(z)H(z)\]This is the most important property of the z-transform. The ROC contains at least $R_x\cap R_h$.
The output of an LTI system is the convolution of the input with the impulse response. So in the z-domain, the output is simply the input multiplied by $H(z)$. In the next post, we will use $H(z)$ to analyze systems.
Why does convolution become multiplication?
Substitute the convolution into equation $\small(1)$ and let $m=n-k$:
\[\begin{aligned} \sum_{n}\Big(\sum_{k}x[k]h[n-k]\Big)z^{-n} &= \sum_{k}x[k]z^{-k}\sum_{m}h[m]z^{-m} \\ &= X(z)H(z) \end{aligned}\]Summary
| Property | Time domain | z-domain | ROC |
|---|---|---|---|
| Linearity | $ax[n]+by[n]$ | $aX(z)+bY(z)$ | Contains $R_x\cap R_y$ |
| Time Shift | $x[n-n_0]$ | $z^{-n_0}X(z)$ | $R_x$, except possibly $z=0$ or $\infty$ |
| Multiplication by an Exponential | $z_0^n\,x[n]$ | $X(z/z_0)$ | $\lvert z_0\rvert R_x$ |
| Time Reversal | $x[-n]$ | $X(z^{-1})$ | $1/R_x$ |
| Convolution | $x[n]*h[n]$ | $X(z)H(z)$ | Contains $R_x\cap R_h$ |