Bird
Raised Fist0
Signal Processingdata~20 mins

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

Choose your learning style10 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(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}')
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.

Practice

(1/5)
1. What does the transfer function H(z) represent in signal processing?
easy
A. The amplitude of the output signal
B. The time delay of a signal
C. The frequency of the input signal
D. The ratio of output to input signals in the z-domain

Solution

  1. Step 1: Understand the definition of transfer function

    The transfer function H(z) is defined as the ratio of the output signal to the input signal in the z-domain.
  2. Step 2: Identify the correct description

    Among the options, only The ratio of output to input signals in the z-domain correctly describes H(z) as this ratio.
  3. Final Answer:

    The ratio of output to input signals in the z-domain -> Option D
  4. Quick Check:

    Transfer function = output/input ratio [OK]
Hint: Remember: H(z) = output signal รท input signal [OK]
Common Mistakes:
  • Confusing H(z) with time delay
  • Thinking H(z) is just frequency
  • Mixing amplitude with transfer function
2. Which of the following is the correct general form of a digital filter transfer function H(z)?
easy
A. H(z) = (b0 + b1z + b2z^2) / (1 + a1z + a2z^2)
B. H(z) = (b0 + b1z^{-1} + b2z^{-2}) * (1 + a1z^{-1} + a2z^{-2})
C. H(z) = (b0 + b1z^{-1} + b2z^{-2}) / (1 + a1z^{-1} + a2z^{-2})
D. H(z) = (b0z + b1z^2 + b2z^3) / (1 + a1z + a2z^2)

Solution

  1. Step 1: Recall the standard form of digital filter transfer function

    The transfer function is usually expressed with negative powers of z, representing delays: numerator and denominator polynomials in z^{-1}.
  2. Step 2: Compare options with the standard form

    H(z) = (b0 + b1z^{-1} + b2z^{-2}) / (1 + a1z^{-1} + a2z^{-2}) correctly shows numerator and denominator with negative powers of z, matching the standard form.
  3. Final Answer:

    H(z) = (b0 + b1z^{-1} + b2z^{-2}) / (1 + a1z^{-1} + a2z^{-2}) -> Option C
  4. Quick Check:

    Negative powers of z indicate delays [OK]
Hint: Look for negative powers of z in numerator and denominator [OK]
Common Mistakes:
  • Using positive powers of z incorrectly
  • Multiplying numerator and denominator instead of dividing
  • Forgetting the leading 1 in denominator
3. Given the transfer function H(z) = (1 - 0.5z^{-1}) / (1 - 0.9z^{-1} + 0.15z^{-2}), what is the value of H(z) at z = 1?
medium
A. 2.0
B. 1.0
C. 0.5
D. 0.0

Solution

  1. Step 1: Substitute z = 1 into H(z)

    Calculate numerator: 1 - 0.5 * 1^{-1} = 1 - 0.5 = 0.5
    Calculate denominator: 1 - 0.9 * 1^{-1} + 0.15 * 1^{-2} = 1 - 0.9 + 0.15 = 0.25
  2. Step 2: Compute H(1) = numerator / denominator

    H(1) = 0.5 / 0.25 = 2.0 exactly.
  3. Final Answer:

    2.0 -> Option A
  4. Quick Check:

    H(1) = 2.0 [OK]
Hint: Plug z=1, compute numerator and denominator separately [OK]
Common Mistakes:
  • Forgetting to use z^{-1} as 1/z
  • Incorrect arithmetic in numerator or denominator
  • Choosing zero instead of computed value
4. Identify the error in the following transfer function expression:
H(z) = (1 + 0.3z^{-1} - 0.2z^{-2}) / (1 + 0.5z + 0.1z^{-2})
medium
A. Numerator has negative powers of z which is invalid
B. Denominator has a positive power of z which is incorrect
C. Transfer function must not have more than two terms in numerator
D. Denominator should be multiplied, not divided

Solution

  1. Step 1: Examine powers of z in numerator and denominator

    The numerator has negative powers of z, which is correct for delays.
    The denominator has a positive power term 0.5z, which is not standard and incorrect.
  2. Step 2: Confirm correct form of denominator

    The denominator should have terms with negative powers of z (delays), not positive powers (advances). So the positive power term is an error.
  3. Final Answer:

    Denominator has a positive power of z which is incorrect -> Option B
  4. Quick Check:

    Denominator powers must be negative [OK]
Hint: Check denominator powers: must be negative or zero [OK]
Common Mistakes:
  • Allowing positive powers of z in denominator
  • Confusing numerator and denominator powers
  • Thinking number of terms limits validity
5. You have a transfer function H(z) = (1 - 0.7z^{-1}) / (1 - 1.2z^{-1} + 0.45z^{-2}). Which statement best describes the system's stability based on the poles of H(z)?
hard
A. The system is stable because all poles lie inside the unit circle
B. The system is unstable because at least one pole lies outside the unit circle
C. The system is marginally stable because poles lie on the unit circle
D. Stability cannot be determined without zeros

Solution

  1. Step 1: Find the poles by solving denominator polynomial

    The denominator is 1 - 1.2z^{-1} + 0.45z^{-2} = 0.
    Rewrite as z^2 - 1.2z + 0.45 = 0 (multiply both sides by z^2).
  2. Step 2: Calculate roots of the quadratic

    Using quadratic formula:
    z = [1.2 ยฑ sqrt(1.44 - 1.8)] / 2
    Discriminant = 1.44 - 1.8 = -0.36 (complex roots)
    Roots: z = 0.6 ยฑ 0.3i
  3. Step 3: Calculate magnitude of poles

    Magnitude = sqrt(0.6^2 + 0.3^2) = sqrt(0.36 + 0.09) = sqrt(0.45) โ‰ˆ 0.67 < 1
  4. Step 4: Re-examine coefficients for stability

    Actually, the denominator polynomial is in z^{-1}, so poles are roots of denominator polynomial in z.
    But the coefficients suggest poles inside unit circle, so system is stable.
  5. Step 5: Check option correctness

    Options say system is unstable if poles outside unit circle.
    Our calculation shows poles inside unit circle, so system is stable.
  6. Final Answer:

    The system is stable because all poles lie inside the unit circle -> Option A
  7. Quick Check:

    Poles magnitude < 1 means stable [OK]
Hint: Calculate pole magnitudes; inside unit circle means stable [OK]
Common Mistakes:
  • Confusing zeros with poles for stability
  • Ignoring complex roots magnitude
  • Assuming zeros affect stability
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