Skip to main content
Engineering LibreTexts

5.1: Z-Transform

  • Page ID
    103985
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)

    Introduction

    The Z transform is a generalization of the Discrete-Time Fourier Transform (Section 9.2). It is used because the DTFT does not converge/exist for many important signals, and yet does for the z-transform. It is also used because it is notationally cleaner than the DTFT. In contrast to the DTFT, instead of using complex exponentials (Section 7.2) of the form (e^{j \omega n}\), with purely imaginary parameters, the Z transform uses the more general, \(z^n\), where \(z\) is complex. The Z-transform thus allows one to bring in the power of complex variable theory into Digital Signal Processing.

    The Z-Transform

    Bilateral Z-transform Pair

    Although Z transforms are rarely solved in practice using integration (tables and computers (e.g. Matlab) are much more common), we will provide the bilateral Z transform pair here for purposes of discussion and derivation. These define the forward and inverse Z transformations. Notice the similarities between the forward and inverse transforms. This will give rise to many of the same symmetries found in Fourier analysis (Section 5.1).

    Z Transform

    \[X(z)=\sum_{n=-\infty}^{\infty} x[n] z^{-n} \nonumber \]

    Inverse Z Transform

    \[x[n]=\frac{1}{2 \pi j} \oint_{r} X(z) z^{n-1} \mathrm{d} z \nonumber \]

    Note

    We have defined the bilateral z-transform. There is also a unilateral z-transform ,

    \[X(z)=\sum_{n=0}^{\infty} x[n] z^{-n} \nonumber \]

    which is useful for solving the difference equations with nonzero initial conditions. This is similar to the unilateral Laplace Transform in continuous time.

    Relation between Z-transform and DTFT

    Taking a look at the equations describing the Z-Transform and the Discrete-Time Fourier Transform:

    Discrete-Time Fourier Transform

    \[X\left(e^{j \omega}\right)=\sum_{n=-\infty}^{\infty} x(n) e^{-(j \omega n)} \nonumber \]

    Z-Transform

    \[X(z)=\sum_{n=-\infty}^{\infty} x[n] z^{-n} \nonumber \]

    We can see many similarities; first, that:

    \[X\left(e^{j \omega}\right)=X(z) \nonumber \]

    for all \(z=e^{j \omega}\)

    Visualizing the Z-transform

    With the DTFT, we have a complex-valued function of a real-valued variable \(\omega\) (and \(2\pi\) periodic). The Z-transform is a complex-valued function of a complex valued variable z.

    Plotszplanefigure1.png

    Figure \(\PageIndex{1}\)

    With the Fourier transform, we had a complex-valued function of a purely imaginary variable, \(F(j \omega)\). This was something we could envision with two 2-dimensional plots (real and imaginary parts or magnitude and phase). However, with Z, we have a complex-valued function of a complex variable. In order to examine the magnitude and phase or real and imaginary parts of this function, we must examine 3-dimensional surface plots of each component.

    Consider the z-transform given by \(H(z)=z\), as illustrated below.

    ztransform.jpg

    Figure \(\PageIndex{2}\)

    The corresponding DTFT has magnitude and phase given below.

    Note

    While these are legitimate ways of looking at a signal in the Z domain, it is quite difficult to draw and/or analyze. For this reason, a simpler method has been developed. Although it will not be discussed in detail here, the method of Poles and Zeros is much easier to understand and is the way both the Z transform and its continuous-time counterpart the Laplace-transform are represented graphically.

    graph1.png

    (a)

    graph2.png

    (b)

    Figure \(\PageIndex{3}\): Magnitude and Phase of \(H(z)\).

    What could the system H be doing? It is a perfect all-pass, linear-phase system. But what does this mean?

    Suppose \(h[n]=\delta\left[n-n_{0}\right]\). Then

    \[\begin{aligned}
    H(z) &=\sum_{n=-\infty}^{\infty} h[n] z^{-n} \\
    &=\sum_{n=-\infty}^{\infty} \delta\left[n-n_{0}\right] z^{-n} \\
    &=z^{-n_{0}}
    \end{aligned} \nonumber \]

    Thus, \(H(z)=z^{−n_0}\) is the \(z\)-transform of a system that simply delays the input by \(n_0\). \(H(z)\) is the \(z\)-transform of a unit-delay.

    Now consider \(x[n]=\alpha^{n} u[n]\)

    graph3.png

    Figure \(\PageIndex{4}\)

    \[\begin{align}
    X(z) &=\sum_{n=-\infty}^{\infty} x[n] z^{-n}=\sum_{n=0}^{\infty} \alpha^{n} z^{-n} \nonumber \\
    &=\sum_{n=0}^{\infty}\left(\frac{\alpha}{z}\right)^{n} \nonumber \\
    &=\frac{1}{1-\frac{\alpha}{z}}\left( \text{ if }\left|\frac{\alpha}{z}\right|<1\right)(\text { Geometric series }) \nonumber \\
    &=\frac{z}{z-\alpha}
    \end{align} \nonumber \]

    What if \(|\frac{\alpha}{z}|≥1\)? Then \(\sum_{n=0}^{\infty}\left(\frac{\alpha}{z}\right)^{n}\) does not converge! Therefore, whenever we compute a \(z\)-tranform, we must also specify the set of \(z\)'s for which the \(z\)-transform exists. This is called the region of convergence (ROC).

    Note: Using a computer to find the Z-transform

    Matlab has two functions,

    ztrans

    and

    iztrans

    that are both part of the symbolic toolbox, and will find the Z and inverse Z transforms respectively. This method is generally preferred for more complicated functions. Simpler and more contrived functions are usually found easily enough by using tables.

    Application to Discrete Time Filters

    The \(z\)-transform might seem slightly ugly. We have to worry about the region of convergence, and stability issues, and so forth. However, in the end it is worthwhile because it proves extremely useful in analyzing digital filters with feedback. For example, consider the system illustrated below

    Plots

    graph4.png

    Figure \(\PageIndex{5}\)

    We can analyze this system via the equations

    \[v[n]=b_{0} x[n]+b_{1} x[n-1]+b_{2} x[n-2] \nonumber \]

    and

    \[y[n]=v[n]+a_{1} y[n-1]+a_{2} y[n-2] \nonumber \]

    More generally,

    \[v[n]=\sum_{k=0}^{N} b_{k} x[n-k] \nonumber \]

    and

    \[y[n]=\sum_{k=1}^{M} a_{k} y[n-k]+v[n] \nonumber \]

    or equivalently,

    \[\sum_{k=0}^{N} b_{k} x[n-k]=y[n]-\sum_{k=1}^{M} a_{k} y[n-k]. \nonumber \]

    What does the \(z\)-transform of this relationship look like?

    \[Z \sum_{k=0}^{M} a_{k} y[n-k]=Z \sum_{k=0}^{M} b_{k} x[n-k] \nonumber \]

    \[\sum_{k=0}^{M} a_{k} Z\{y[n-k]\}=\sum_{k=0}^{M} b_{k} Z\{x[n-k]\} \nonumber \]

    Note that

    \[\begin{aligned}
    Z\{y[n-k]\} &=\sum_{n=-\infty}^{\infty} y[n-k] z^{-n} \\
    &=\sum_{m=-\infty}^{\infty} y[m] z^{-m} z^{-k} \\
    &=Y(z) z^{-k}
    \end{aligned} \nonumber \]

    Thus the relationship reduces to

    \begin{aligned}
    \sum_{k=0}^{M} a_{k} Y(z) z^{-k} &=\sum_{k=0}^{N} b_{k} X(z) z^{-k} \\
    Y(z) \sum_{k=0}^{M} a_{k} z^{-k} &=X(z) \sum_{k=0}^{N} b_{k} z^{-k} \\
    \frac{Y(z)}{X(z)} &=\frac{\sum_{k=0}^{N} b_{k} z^{-k}}{\sum_{k=0}^{M} a_{k} z^{-k}}
    \end{aligned}

    Hence, given a system the one above, we can easily determine the system's transfer function, and end up with a ratio of two polynomials in \(z\): a rational function. Similarly, given a rational function, it is easy to realize this function in a simple hardware architecture.

    Interactive Z-Transform Demonstration

    ZTDefinitionDemo
    Figure \(\PageIndex{6}\): Interact (when online) with a Mathematica CDF demonstrating the Z Transform. To Download, right-click and save target as .cdf.

    Conclusion

    The z-transform proves a useful, more general form of the Discrete Time Fourier Transform. It applies equally well to describing systems as well as signals using the eigenfunction method, and proves extremely useful in digital filter design.


    This page titled 5.1: Z-Transform is shared under a CC BY license and was authored, remixed, and/or curated by Richard Baraniuk et al..