0
0
Signal Processingdata~20 mins

Transfer function H(z) in Signal Processing - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Transfer Function Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
Predict Output
intermediate
2: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}')
A0.429
B1.250
C0.625
D0.875
Attempts:
2 left
💡 Hint
Calculate numerator and denominator separately before dividing.
data_output
intermediate
2:00remaining
Frequency Response Magnitude at Specific Frequencies
Calculate the magnitude of the frequency response |H(e)| 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}')
A1.045, 1.000
B0.987, 1.234
C1.123, 0.875
D1.000, 1.045
Attempts:
2 left
💡 Hint
Use Euler's formula to compute z and carefully calculate numerator and denominator.
visualization
advanced
3: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()
APoles at 0.6 and 0.6, zeros at 0.8 and 0.1
BPoles at 0.6 and 0.6 (complex conjugates), zeros at 0.4 and 0.2 (complex conjugates)
CPoles at 0.6 and 0.6, zeros at 0.4 and 0.2 (complex conjugates)
DPoles at 0.6 and 0.6, zeros at 0.4 and 0.2
Attempts:
2 left
💡 Hint
Find roots of numerator and denominator polynomials to locate zeros and poles.
🧠 Conceptual
advanced
1: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?
AThe system is stable if all poles lie inside or on the unit circle in the z-plane.
BThe system is stable if all poles lie outside the unit circle in the z-plane.
CThe system is stable if all poles lie strictly inside the unit circle in the z-plane.
DThe system is stable if all poles lie on the real axis regardless of their magnitude.
Attempts:
2 left
💡 Hint
Recall the condition for bounded output in discrete-time systems.
🔧 Debug
expert
2: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)
ANo error; the code runs correctly and outputs a float
BSyntaxError due to incorrect use of negative exponents
CTypeError because z is a float and cannot be raised to negative powers
DZeroDivisionError because denominator evaluates to zero at z=0.9
Attempts:
2 left
💡 Hint
Check if negative powers are valid for float inputs in Python.