Complex Variables & Transforms · Unit 2 · Topic 12

Z-transform: the Laplace transform for sequences.

Short answer

The Z-transform of a sequence \(x(n)\) is \(X(z) = \sum x(n)\,z^{-n}\), together with the region of convergence (ROC) where the series converges.

For example, \(Z\{a^n\} = \dfrac{z}{z-a}\) for \(|z| > |a|\), and \(Z\{1\} = \dfrac{z}{z-1}\) for \(|z| > 1\).

Engineering MathsSemester IIIBSc
01

Definition and region of convergence

Before you start: you need geometric series and partial fractions. The Laplace transform lesson helps, because the Z-transform does for sequences what Laplace does for functions.

Definition

For a sequence \(x(n)\), \[X(z) = Z\{x(n)\} = \sum_{n=-\infty}^{\infty} x(n)\,z^{-n}\]

For a sequence that starts at \(n = 0\) (a causal sequence) the sum runs from \(n = 0\): \(X(z) = \sum_{n=0}^{\infty} x(n)\,z^{-n}\). This one-sided form is the one used for difference equations.

Region of convergence (ROC)

The set of complex numbers \(z\) for which the series converges.

The transform packs a whole sequence into one function of \(z\). The term \(x(n)\) sits in front of \(z^{-n}\), so you can read the sequence back off a power series in \(z^{-1}\). That is the idea behind long division later.

Most transforms you meet are geometric series. For \(x(n) = a^n\), \(n \ge 0\): \[\sum_{n=0}^{\infty}\left(\frac{a}{z}\right)^n = \frac{1}{1 - a/z} = \frac{z}{z-a},\quad |z| > |a|\] The series converges only when \(|a/z| < 1\). That condition is the ROC.

Always give the ROC with the formula. The sequence \(x(n) = -a^n\) for \(n \le -1\) (and \(0\) for \(n \ge 0\)) has the same formula \(\dfrac{z}{z-a}\), but with ROC \(|z| < |a|\). A causal sequence always has an ROC outside a circle, \(|z| > R\). A sequence that runs only over negative \(n\) has an ROC inside a circle. A two-sided sequence has a ring \(R_1 < |z| < R_2\), or no ROC at all.

02

Standard Z-transforms and properties

All sequences below are for \(n \ge 0\) and zero for \(n < 0\).

\(x(n)\)\(X(z)\)ROC
\(\delta(n)\) (1 at \(n = 0\), else 0)\(1\)all \(z\)
\(u(n) = 1\)\(\dfrac{z}{z-1}\)\(|z| > 1\)
\(a^n\)\(\dfrac{z}{z-a}\)\(|z| > |a|\)
\(n\)\(\dfrac{z}{(z-1)^2}\)\(|z| > 1\)
\(n^2\)\(\dfrac{z(z+1)}{(z-1)^3}\)\(|z| > 1\)
\(n\,a^n\)\(\dfrac{az}{(z-a)^2}\)\(|z| > |a|\)
\(\cos n\theta\)\(\dfrac{z(z - \cos\theta)}{z^2 - 2z\cos\theta + 1}\)\(|z| > 1\)
\(\sin n\theta\)\(\dfrac{z\sin\theta}{z^2 - 2z\cos\theta + 1}\)\(|z| > 1\)

The cosine and sine rows come from \(a^n\) with \(a = e^{\pm i\theta}\), since \(\cos n\theta\) is the average of \(e^{in\theta}\) and \(e^{-in\theta}\).

Properties (with \(X(z) = Z\{x(n)\}\))

Linearity

\(Z\{a\,x(n) + b\,y(n)\} = aX(z) + bY(z)\)

Multiplication by \(a^n\)

\(Z\{a^n x(n)\} = X\!\left(\dfrac{z}{a}\right)\), ROC scaled by \(|a|\)

Multiplication by \(n\)

\(Z\{n\,x(n)\} = -z\dfrac{dX}{dz}\)

Shifting (one-sided, causal \(x\))

Right shift: \(Z\{x(n-k)\} = z^{-k}X(z)\)

Left shift: \(Z\{x(n+1)\} = zX(z) - z\,x(0)\)

\(Z\{x(n+2)\} = z^2X(z) - z^2x(0) - z\,x(1)\)

Initial value theorem

\(x(0) = \displaystyle\lim_{z \to \infty} X(z)\)

The left-shift rule is the discrete twin of \(\mathcal{L}\{y'\} = sY - y(0)\): the initial values come in automatically, which is why the Z-transform solves difference equations.

03

Inverse Z-transform and difference equations

Partial fractions

Every table entry has a \(z\) on top. So split \(\dfrac{X(z)}{z}\), not \(X(z)\), into partial fractions, then multiply back by \(z\). Each \(\dfrac{z}{z-a}\) becomes \(a^n\) if the ROC is outside \(|a|\), and \(-a^n\) for \(n \le -1\) if the ROC is inside.

Long division

Divide the numerator by the denominator, both written in falling powers of \(z\). The quotient is \(x(0) + x(1)z^{-1} + x(2)z^{-2} + \cdots\), so the coefficients are the terms of the sequence. This gives the first few terms quickly, but not a formula for \(x(n)\). (A third method uses residues: for a causal sequence, \(x(n)\) is the sum of the residues of \(z^{n-1}X(z)\), as in the residue theorem lesson.)

Solving a difference equation

  1. Take the Z-transform of both sides, using the left-shift rules with the given \(y(0)\), \(y(1)\).
  2. Transform the right side from the table.
  3. Solve for \(Y(z)\).
  4. Split \(\dfrac{Y(z)}{z}\) into partial fractions, multiply by \(z\), and invert.
  5. Check \(y(0)\), \(y(1)\), and one more term from the recurrence.
04

Solved examples

Example 1: From the definition

Easy

Find \(Z\{(1/2)^n\}\), \(n \ge 0\), with its ROC.

  1. \(X(z) = \displaystyle\sum_{n=0}^\infty \left(\frac{1}{2z}\right)^n\), a geometric series with ratio \(\dfrac{1}{2z}\).
  2. It converges when \(\left|\dfrac{1}{2z}\right| < 1\), that is \(|z| > \tfrac{1}{2}\), and the sum is \(\dfrac{1}{1 - 1/(2z)} = \dfrac{2z}{2z - 1}\).

Answer\(X(z) = \dfrac{z}{z - 1/2}\), ROC \(|z| > \tfrac{1}{2}\)

Example 2: Linearity

Easy

Find \(Z\{3\cdot 2^n - 4(-1)^n + 5\}\), \(n \ge 0\).

  1. Term by term: \(\dfrac{3z}{z-2} - \dfrac{4z}{z+1} + \dfrac{5z}{z-1}\).
  2. Each part needs its own condition: \(|z| > 2\), \(|z| > 1\), \(|z| > 1\). All three hold when \(|z| > 2\).

Answer\(\dfrac{3z}{z-2} - \dfrac{4z}{z+1} + \dfrac{5z}{z-1}\), ROC \(|z| > 2\)

Example 3: Multiplication by n

Medium

Find \(Z\{n\,2^n\}\), \(n \ge 0\).

  1. \(Z\{2^n\} = \dfrac{z}{z-2}\). Multiplication by \(n\) means \(-z\dfrac{d}{dz}\).
  2. \(\dfrac{d}{dz}\left(\dfrac{z}{z-2}\right) = \dfrac{(z-2) - z}{(z-2)^2} = -\dfrac{2}{(z-2)^2}\).
  3. Multiply by \(-z\).

Answer\(Z\{n\,2^n\} = \dfrac{2z}{(z-2)^2}\), ROC \(|z| > 2\)

Example 4: A cosine sequence

Medium

Find \(Z\left\{\cos\dfrac{n\pi}{2}\right\}\), \(n \ge 0\).

  1. Here \(\theta = \dfrac{\pi}{2}\), so \(\cos\theta = 0\) and the table gives \(\dfrac{z\cdot z}{z^2 + 1}\).
  2. Check from the definition: the sequence is \(1, 0, -1, 0, 1, \dots\), so \(X = 1 - z^{-2} + z^{-4} - \cdots = \dfrac{1}{1 + z^{-2}}\).

Answer\(\dfrac{z^2}{z^2+1}\), ROC \(|z| > 1\)

Example 5: A two-sided sequence

Exam level

Find the Z-transform and ROC of \(x(n) = (1/2)^n\) for \(n \ge 0\) and \(x(n) = 3^n\) for \(n < 0\).

  1. The \(n \ge 0\) part: \(\dfrac{z}{z - 1/2}\), for \(|z| > \tfrac{1}{2}\).
  2. The \(n < 0\) part: put \(m = -n\). \(\displaystyle\sum_{m=1}^\infty 3^{-m}z^{m} = \frac{z/3}{1 - z/3} = \frac{z}{3 - z}\), for \(|z| < 3\).
  3. Both conditions together give a ring.

Answer\(X(z) = \dfrac{z}{z - 1/2} - \dfrac{z}{z - 3}\), ROC \(\tfrac{1}{2} < |z| < 3\)

Example 6: Inverse by partial fractions, three ROCs

Exam level

Find \(x(n)\) if \(X(z) = \dfrac{z}{(z-2)(z-3)}\) and (a) \(|z| > 3\), (b) \(2 < |z| < 3\), (c) \(|z| < 2\).

  1. \(\dfrac{X(z)}{z} = \dfrac{1}{(z-2)(z-3)} = -\dfrac{1}{z-2} + \dfrac{1}{z-3}\), so \(X(z) = -\dfrac{z}{z-2} + \dfrac{z}{z-3}\).
  2. (a) Outside both poles, both terms are causal: \(x(n) = 3^n - 2^n\) for \(n \ge 0\).
  3. (b) \(|z| > 2\) makes the first term causal, \(|z| < 3\) makes the second anticausal: \(x(n) = -2^n\) for \(n \ge 0\) and \(x(n) = -3^n\) for \(n \le -1\).
  4. (c) Inside both poles: \(x(n) = 2^n - 3^n\) for \(n \le -1\), and \(0\) for \(n \ge 0\).

Answer(a) \(3^n - 2^n\), \(n \ge 0\); (b) \(-2^n\) for \(n \ge 0\), \(-3^n\) for \(n \le -1\); (c) \(2^n - 3^n\), \(n \le -1\)

Example 7: Inverse by long division

Medium

Find the first four terms of \(x(n)\) if \(X(z) = \dfrac{2z^2 + z}{z^2 - z - 2}\), \(|z| > 2\), and then a formula.

  1. Divide: \(2z^2 + z = 2(z^2 - z - 2) + (3z + 4)\), so the first term is \(2\).
  2. Keep going: \(3z + 4 = 3z^{-1}(z^2 - z - 2) + (7 + 6z^{-1})\), then \(7 + 6z^{-1} = 7z^{-2}(z^2 - z - 2) + (13z^{-1} + 14z^{-2})\), and the next term is \(13z^{-3}\).
  3. So \(X(z) = 2 + 3z^{-1} + 7z^{-2} + 13z^{-3} + \cdots\).
  4. For a formula: \(\dfrac{X}{z} = \dfrac{2z + 1}{(z-2)(z+1)} = \dfrac{5/3}{z-2} + \dfrac{1/3}{z+1}\).

Answer\(x(n) = 2, 3, 7, 13, \dots\), and \(x(n) = \dfrac{5}{3}\,2^n + \dfrac{1}{3}(-1)^n\)

Example 8: A difference equation

Exam level

Solve \(y(n+2) - 3y(n+1) + 2y(n) = 3^n\), with \(y(0) = 0\), \(y(1) = 0\).

  1. Transform: \(z^2Y - 3zY + 2Y = \dfrac{z}{z-3}\). (The initial values are zero, so the shift rules add nothing.)
  2. \(Y = \dfrac{z}{(z-1)(z-2)(z-3)}\), so \(\dfrac{Y}{z} = \dfrac{1}{(z-1)(z-2)(z-3)}\).
  3. Cover-up: at \(z = 1\), \(\dfrac{1}{(-1)(-2)} = \tfrac{1}{2}\); at \(z = 2\), \(\dfrac{1}{(1)(-1)} = -1\); at \(z = 3\), \(\dfrac{1}{(2)(1)} = \tfrac{1}{2}\).
  4. \(Y = \dfrac{1}{2}\cdot\dfrac{z}{z-1} - \dfrac{z}{z-2} + \dfrac{1}{2}\cdot\dfrac{z}{z-3}\).
  5. Check: \(y(2) = 3y(1) - 2y(0) + 3^0 = 1\), and the formula gives \(\tfrac{1}{2} - 4 + \tfrac{9}{2} = 1\). ✓

Answer\(y(n) = \dfrac{1}{2} - 2^n + \dfrac{3^n}{2}\)

Vipul Sir's tip

Write \(\dfrac{X(z)}{z}\) on the first line of every inverse question, before you think about anything else. Students who split \(X(z)\) itself end up with terms like \(\dfrac{1}{z-2}\), which are not in the table, and then lose marks fixing it with a shift. Dividing by \(z\) first avoids the whole problem.

05

Common mistakes

1. Leaving out the ROC

\(\dfrac{z}{z-3}\) on its own does not fix the sequence: it is \(3^n\) (\(n \ge 0\)) for \(|z| > 3\) and \(-3^n\) (\(n \le -1\)) for \(|z| < 3\). State the ROC with every transform, and use it in every inverse.

2. Splitting \(X(z)\) instead of \(\dfrac{X(z)}{z}\)

For \(X = \dfrac{z}{(z-2)(z-3)}\), splitting \(X\) directly gives \(-\dfrac{2}{z-2} + \dfrac{3}{z-3}\). Neither fraction is in the table; each needs a right shift to invert. Split \(\dfrac{X}{z}\) and you get \(-\dfrac{z}{z-2} + \dfrac{z}{z-3}\), straight from the table.

3. Missing initial terms in the left shift

\(Z\{y(n+1)\} = zY - z\,y(0)\), not \(zY\) and not \(zY - y(0)\). With \(y(0) = 1\), dropping the \(-z\) term changes the whole solution.

06

Practice questions

Try each one on paper before you open the answer.

Q1Find \(Z\{(1/3)^n\}\), \(n \ge 0\), with its ROC.

\(\dfrac{z}{z - 1/3}\), ROC \(|z| > \tfrac{1}{3}\).

Q2Find \(Z\{n\}\), \(n \ge 0\), using multiplication by \(n\).

\(-z\dfrac{d}{dz}\left(\dfrac{z}{z-1}\right) = -z\cdot\dfrac{-1}{(z-1)^2} = \dfrac{z}{(z-1)^2}\), ROC \(|z| > 1\).

Q3Find \(Z\left\{2^n\cos\dfrac{n\pi}{2}\right\}\), \(n \ge 0\).

Replace \(z\) by \(\dfrac{z}{2}\) in \(\dfrac{z^2}{z^2+1}\) (Example 4): \(\dfrac{z^2/4}{z^2/4 + 1} = \dfrac{z^2}{z^2+4}\), ROC \(|z| > 2\).

Q4Find \(x(n)\) if \(X(z) = \dfrac{z^2}{(z-1)(z - 1/2)}\), \(|z| > 1\).

\(\dfrac{X}{z} = \dfrac{z}{(z-1)(z-1/2)} = \dfrac{2}{z-1} - \dfrac{1}{z-1/2}\).

So \(x(n) = 2 - (1/2)^n\), \(n \ge 0\).

Q5Solve \(y(n+2) + 3y(n+1) + 2y(n) = 0\), \(y(0) = 1\), \(y(1) = 0\).

\(z^2Y - z^2 + 3(zY - z) + 2Y = 0\), so \(Y = \dfrac{z^2 + 3z}{(z+1)(z+2)}\) and \(\dfrac{Y}{z} = \dfrac{2}{z+1} - \dfrac{1}{z+2}\).

\(y(n) = 2(-1)^n - (-2)^n\).

Q6Solve \(y(n+1) - 2y(n) = 1\), \(y(0) = 0\).

\((z - 2)Y = \dfrac{z}{z-1}\), so \(\dfrac{Y}{z} = \dfrac{1}{(z-1)(z-2)} = -\dfrac{1}{z-1} + \dfrac{1}{z-2}\).

\(y(n) = 2^n - 1\).

Stuck on a question?

Bring it to a free demo class and work through it with Vipul Sir. Book on WhatsApp.

07

Frequently asked questions

What is the Z-transform of a^n?

For \(n \ge 0\), \(Z\{a^n\} = \dfrac{z}{z-a}\), with ROC \(|z| > |a|\). It is the sum of the geometric series \(\sum (a/z)^n\).

What is the region of convergence?

The set of \(z\) for which \(\sum x(n)z^{-n}\) converges. It is \(|z| > R\) for a causal sequence, \(|z| < R\) for one running over negative \(n\), and a ring for a two-sided sequence. Without it, the inverse is not unique.

How is the Z-transform related to the Laplace transform?

If a signal is sampled every \(T\) seconds, the Laplace transform of the samples becomes the Z-transform with \(z = e^{sT}\). Sums replace integrals, and difference equations replace differential equations.

Why do we split X(z)/z into partial fractions?

Because the table entries are \(\dfrac{z}{z-a}\), with \(z\) on top. Splitting \(\dfrac{X(z)}{z}\) and multiplying back by \(z\) gives exactly that shape.

Related lessons

← All 12 Complex Variables & Transforms topics
Vipul Sir
Written by Vipul Sir

Vipul Sir has taught mathematics for over 15 years to HSC, CBSE, ICSE, IGCSE/IB, Diploma, Engineering and BSc students at VVS Classes in Goregaon and Vile Parle, Mumbai. He teaches every class himself, concepts first and exam technique second.

Complex Variables and Transforms

Get Complex Variables & Transforms right, with Vipul Sir beside you.

Concept-first classes in small batches in Goregaon and Vile Parle, or online. Your first class is free.

WhatsApp↗