Challenge - 5 Problems
Transfer Function Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ Predict Output
intermediate2:00remaining
Output of Transfer Function Evaluation
Given the transfer function H(z) = (1 - 0.5z-1) / (1 - 0.8z-1), what is the output of H(z) at z = 2?
Signal Processing
def H(z): return (1 - 0.5 / z) / (1 - 0.8 / z) output = H(2) print(f'{output:.3f}')
Attempts:
2 left
💡 Hint
Calculate numerator and denominator separately before dividing.
✗ Incorrect
At z=2, numerator = 1 - 0.5/2 = 0.75, denominator = 1 - 0.8/2 = 0.6, so H(2) = 0.75/0.6 = 1.25. The code formats output to 3 decimal places: 1.250.
❓ data_output
intermediate2:00remaining
Frequency Response Magnitude at Specific Frequencies
Calculate the magnitude of the frequency response |H(ejω)| for ω = π/4 and ω = π/2 for the transfer function H(z) = (1 - 0.3z-1 + 0.4z-2) / (1 - 0.5z-1 + 0.25z-2). What are the magnitudes?
Signal Processing
import numpy as np def H(w): z = np.exp(1j * w) numerator = 1 - 0.3 / z + 0.4 / (z**2) denominator = 1 - 0.5 / z + 0.25 / (z**2) return numerator / denominator mag_pi_4 = abs(H(np.pi/4)) mag_pi_2 = abs(H(np.pi/2)) print(f'{mag_pi_4:.3f}, {mag_pi_2:.3f}')
Attempts:
2 left
💡 Hint
Use Euler's formula to compute z and carefully calculate numerator and denominator.
✗ Incorrect
Calculate z = e^(jω), then compute numerator and denominator complex values, finally take magnitude of their ratio.
❓ visualization
advanced3:00remaining
Plot the Pole-Zero Diagram of H(z)
Which plot correctly shows the poles and zeros of the transfer function H(z) = (z^2 - 0.6z + 0.08) / (z^2 - 1.2z + 0.36)?
Signal Processing
import matplotlib.pyplot as plt import numpy as np from numpy import roots zeros = roots([1, -0.6, 0.08]) poles = roots([1, -1.2, 0.36]) plt.figure(figsize=(5,5)) plt.scatter(np.real(zeros), np.imag(zeros), marker='o', facecolors='none', edgecolors='b', label='Zeros') plt.scatter(np.real(poles), np.imag(poles), marker='x', color='r', label='Poles') unit_circle = plt.Circle((0,0), 1, color='gray', fill=False, linestyle='dashed') plt.gca().add_artist(unit_circle) plt.axhline(0, color='black', linewidth=0.5) plt.axvline(0, color='black', linewidth=0.5) plt.title('Pole-Zero Plot') plt.xlabel('Real') plt.ylabel('Imaginary') plt.legend() plt.grid(True) plt.axis('equal') plt.show()
Attempts:
2 left
💡 Hint
Find roots of numerator and denominator polynomials to locate zeros and poles.
✗ Incorrect
The roots of denominator polynomial z^2 - 1.2z + 0.36 = 0 are 0.6 (repeated). Numerator roots z^2 - 0.6z + 0.08 = 0 are 0.4 and 0.2. All real, matching A.
🧠 Conceptual
advanced1:30remaining
Effect of Pole Location on Stability
Which statement correctly describes the effect of pole locations of H(z) on the stability of a discrete-time system?
Attempts:
2 left
💡 Hint
Recall the condition for bounded output in discrete-time systems.
✗ Incorrect
For discrete-time systems, stability requires all poles strictly inside the unit circle (magnitude <1). Poles on the unit circle lead to marginal stability, outside to instability.
🔧 Debug
expert2:00remaining
Identify the Error in Transfer Function Computation
The following code attempts to compute the transfer function H(z) = (1 - 0.7z-1 + 0.2z-2) / (1 - 1.1z-1 + 0.3z-2) at z=0.9 but raises an error. What is the cause?
Signal Processing
def H(z): numerator = 1 - 0.7*z**-1 + 0.2*z**-2 denominator = 1 - 1.1*z**-1 + 0.3*z**-2 return numerator / denominator output = H(0.9) print(output)
Attempts:
2 left
💡 Hint
Check if negative powers are valid for float inputs in Python.
✗ Incorrect
Python supports float ** negative integer powers (e.g., 0.9 ** -1 = 1/0.9). Denominator at z=0.9: 1 - 1.1/0.9 + 0.3/0.81 ≈ 1 - 1.222 + 0.370 ≈ 0.148 ≠ 0. No error.