0
0
Signal Processingdata~10 mins

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

Choose your learning style9 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.