Bird
Raised Fist0
Signal Processingdata~10 mins

Common Z-transform pairs in Signal Processing - Interactive Code Practice

Choose your learning style10 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to compute the Z-transform of a unit step sequence.

Signal Processing
import sympy as sp
z = sp.symbols('z')
n = sp.symbols('n', integer=True, nonnegative=True)
x = sp.Heaviside(n)
X = sp.summation(x * z**(-n), (n, 0, sp.oo))
result = X  # Result is [1]
Drag options to blanks, or click blank then click option'
A1 / (1 - z**-1)
B1 / (z - 1)
Cz / (z - 1)
Dz / (1 - z)
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing z and z^-1 in the formula.
Using z/(z-1) instead of 1/(1-z^-1).
2fill in blank
medium

Complete the code to find the Z-transform of the sequence x[n] = a^n u[n].

Signal Processing
a = sp.symbols('a')
x = a**n * sp.Heaviside(n)
X = sp.summation(x * z**(-n), (n, 0, sp.oo))
result = X  # Result is [1]
Drag options to blanks, or click blank then click option'
A1 / (1 - a * z**-1)
B1 / (1 - z**-1 / a)
Cz / (z - a)
Dz / (1 - a)
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping a and z in the denominator.
Forgetting the unit step function u[n].
3fill in blank
hard

Fix the error in the code to compute the Z-transform of the sequence x[n] = delta[n - k].

Signal Processing
k = sp.symbols('k', integer=True, nonnegative=True)
x = sp.KroneckerDelta(n - k)
X = sp.summation(x * z**(-n), (n, 0, sp.oo))
result = X  # Result should be [1]
Drag options to blanks, or click blank then click option'
Az**(k-1)
Bz**k
C1 / z**k
Dz**-k
Attempts:
3 left
💡 Hint
Common Mistakes
Using z^k instead of z^-k.
Confusing the sign in the exponent.
4fill in blank
hard

Fill both blanks to compute the Z-transform of x[n] = n * a^n * u[n].

Signal Processing
x = n * a**n * sp.Heaviside(n)
X = sp.summation(x * z**(-n), (n, 0, sp.oo))
result = [1] / ([2])**2
Drag options to blanks, or click blank then click option'
Aa * z**-1
B1 - a * z**-1
Cz - a
D1 - z * a
Attempts:
3 left
💡 Hint
Common Mistakes
Forgetting to square the denominator.
Mixing up numerator and denominator terms.
5fill in blank
hard

Fill all three blanks to compute the Z-transform of x[n] = cos(ω₀ n) u[n].

Signal Processing
omega0 = sp.symbols('omega0', real=True)
x = sp.cos(omega0 * n) * sp.Heaviside(n)
X = sp.summation(x * z**(-n), (n, 0, sp.oo))
result = ([1] - [2] * z**-1) / (1 - 2 * [3] * z**-1 + z**-2)
Drag options to blanks, or click blank then click option'
Az
Bcos(omega0)
Dsin(omega0)
Attempts:
3 left
💡 Hint
Common Mistakes
Using sin(ω₀) instead of cos(ω₀).
Mixing up powers of z in numerator and denominator.

Practice

(1/5)
1. Which of the following is the Z-transform of the sequence x[n] = a^n u[n], where u[n] is the unit step?
easy
A. X(z) = z / (z - a), |z| < |a|
B. X(z) = 1 / (1 - a z^{-1}), |z| > |a|
C. X(z) = (1 - a z^{-1}) / z, |z| > |a|
D. X(z) = a / (1 - z^{-1}), |z| > 1

Solution

  1. Step 1: Recall the definition of the Z-transform for geometric sequences

    The Z-transform of a^n u[n] is a standard pair given by the sum of a geometric series: \( \sum_{n=0}^\infty a^n z^{-n} = \frac{1}{1 - a z^{-1}} \) for \( |z| > |a| \).
  2. Step 2: Match the formula with the options

    X(z) = 1 / (1 - a z^{-1}), |z| > |a| matches the formula exactly with the correct region of convergence.
  3. Final Answer:

    X(z) = 1 / (1 - a z^{-1}), |z| > |a| -> Option B
  4. Quick Check:

    Geometric sequence Z-transform = 1/(1 - a z^{-1}) [OK]
Hint: Geometric sequences transform to 1/(1 - a z^{-1}) [OK]
Common Mistakes:
  • Confusing region of convergence
  • Mixing numerator and denominator terms
  • Using wrong inequality for |z|
2. Which of the following is the correct Z-transform expression for the unit impulse sequence δ[n]?
easy
A. X(z) = z / (z - 1)
B. X(z) = z^{-1}
C. X(z) = 1 / (1 - z^{-1})
D. X(z) = 1

Solution

  1. Step 1: Understand the unit impulse sequence

    The unit impulse δ[n] is 1 at n=0 and 0 elsewhere.
  2. Step 2: Calculate the Z-transform

    By definition, \( X(z) = \sum_{n=-\infty}^\infty δ[n] z^{-n} = z^{0} = 1 \).
  3. Final Answer:

    X(z) = 1 -> Option D
  4. Quick Check:

    Impulse Z-transform = 1 [OK]
Hint: Impulse transforms to 1 always [OK]
Common Mistakes:
  • Confusing impulse with step function
  • Adding z terms unnecessarily
  • Forgetting impulse is zero except at n=0
3. What is the Z-transform of the sequence x[n] = n u[n]?
medium
A. X(z) = z^{-1} / (1 - z^{-1})^2, |z| > 1
B. X(z) = 1 / (1 - z^{-1})^2, |z| > 1
C. X(z) = z / (z - 1), |z| > 1
D. X(z) = 1 / (1 - z)^2, |z| > 1

Solution

  1. Step 1: Recall the Z-transform of the sequence n u[n]

    The sequence n u[n] has Z-transform \( X(z) = \frac{z^{-1}}{(1 - z^{-1})^2} \) with region of convergence \( |z| > 1 \).
  2. Step 2: Match the formula with the options

    X(z) = z^{-1} / (1 - z^{-1})^2, |z| > 1 matches the formula exactly including the region of convergence.
  3. Final Answer:

    X(z) = z^{-1} / (1 - z^{-1})^2, |z| > 1 -> Option A
  4. Quick Check:

    Linear sequence Z-transform = z^{-1}/(1 - z^{-1})^2 [OK]
Hint: Linear sequences transform to z^{-1}/(1 - z^{-1})^2 [OK]
Common Mistakes:
  • Confusing powers of z
  • Using (z - 1) instead of (1 - z^{-1})
  • Ignoring region of convergence
4. Identify the error in the following Z-transform expression for x[n] = a^n u[n]: X(z) = 1 / (1 - z a^{-1})
medium
A. The variable z and a are swapped in the denominator
B. The region of convergence is missing
C. The exponent on a should be negative
D. The formula is correct as is

Solution

  1. Step 1: Recall the correct Z-transform formula for a^n u[n]

    The correct formula is \( X(z) = \frac{1}{1 - a z^{-1}} \), not \( 1/(1 - z a^{-1}) \).
  2. Step 2: Analyze the given expression

    The given expression swaps z and a in the denominator, which changes the meaning and is incorrect.
  3. Final Answer:

    The variable z and a are swapped in the denominator -> Option A
  4. Quick Check:

    Correct formula uses a z^{-1}, not z a^{-1} [OK]
Hint: Check order of variables in denominator carefully [OK]
Common Mistakes:
  • Swapping z and a in denominator
  • Ignoring negative powers of z
  • Missing region of convergence
5. Given the sequence x[n] = (1/2)^n u[n] + 3 δ[n], what is the combined Z-transform X(z)?
hard
A. X(z) = 3 * z / (z - 1/2), |z| > 1/2
B. X(z) = 3 z^{-1} + 1 / (1 - (1/2) z^{-1}), |z| > 1/2
C. X(z) = 3 + 1 / (1 - (1/2) z^{-1}), |z| > 1/2
D. X(z) = 3 + 1 / (1 - 2 z^{-1}), |z| > 2

Solution

  1. Step 1: Find Z-transform of each sequence part

    The Z-transform of (1/2)^n u[n] is \( \frac{1}{1 - (1/2) z^{-1}} \) with \( |z| > 1/2 \). The Z-transform of 3 δ[n] is 3.
  2. Step 2: Add the transforms for combined sequence

    Since Z-transform is linear, add both: \( X(z) = 3 + \frac{1}{1 - (1/2) z^{-1}} \).
  3. Final Answer:

    X(z) = 3 + 1 / (1 - (1/2) z^{-1}), |z| > 1/2 -> Option C
  4. Quick Check:

    Sum of transforms = 3 + 1/(1 - 0.5 z^{-1}) [OK]
Hint: Sum transforms for combined sequences linearly [OK]
Common Mistakes:
  • Multiplying instead of adding transforms
  • Incorrect region of convergence
  • Wrong coefficient placement
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard