Z Transform of Unit Step in Signal Processing Explained
Z transform of the unit step signal u[n] is Z{u[n]} = \frac{1}{1 - z^{-1}} for |z| > 1. This transform converts the infinite sequence of ones into a simple rational function in z.Syntax
The Z transform of a discrete-time signal x[n] is defined as:
X(z) = \sum_{n=0}^{\infty} x[n] z^{-n}
For the unit step signal u[n], which equals 1 for all n \geq 0, the formula becomes:
Z\{u[n]\} = \sum_{n=0}^{\infty} 1 \cdot z^{-n} = \frac{1}{1 - z^{-1}}, \quad |z| > 1
Here:
zis a complex variable.z^{-1}represents a delay by one sample.- The region of convergence (ROC) is
|z| > 1to ensure the sum converges.
X_z = sum(z**-n for n in range(100)) # Approximate sum for |z|>1
Example
This example calculates the Z transform of the unit step signal for a specific z value and plots the magnitude of the partial sums to show convergence.
import numpy as np import matplotlib.pyplot as plt z = 1.5 # Choose |z| > 1 for convergence N = 50 # Number of terms to approximate the infinite sum # Calculate partial sums of Z transform partial_sums = [sum(z**-n for n in range(k)) for k in range(1, N+1)] # Exact value from formula exact_value = 1 / (1 - z**-1) print(f"Approximate Z transform after {N} terms: {partial_sums[-1]:.4f}") print(f"Exact Z transform value: {exact_value:.4f}") # Plot convergence plt.plot(range(1, N+1), partial_sums, label='Partial Sums') plt.axhline(exact_value, color='red', linestyle='--', label='Exact Value') plt.xlabel('Number of terms') plt.ylabel('Sum value') plt.title('Z Transform of Unit Step Signal Convergence') plt.legend() plt.grid(True) plt.show()
Common Pitfalls
One common mistake is forgetting the region of convergence (ROC). The Z transform of the unit step converges only if |z| > 1. Using values of z inside the unit circle (|z| \leq 1) will cause the sum to diverge.
Another error is confusing the unit step with other signals like the impulse. The unit step is 1 for all n \geq 0, not just at n=0.
import numpy as np z_inside = 0.9 # |z| < 1, should diverge try: sum_inside = sum(z_inside**-n for n in range(100)) print(f"Sum inside unit circle: {sum_inside}") except Exception as e: print(f"Error: {e}") z_outside = 1.1 # |z| > 1, converges sum_outside = sum(z_outside**-n for n in range(100)) print(f"Sum outside unit circle: {sum_outside:.4f}")
Quick Reference
| Concept | Formula / Note |
|---|---|
| Unit step signal | u[n] = 1, n \geq 0 |
| Z transform definition | X(z) = \sum_{n=0}^\infty x[n] z^{-n} |
| Z transform of unit step | Z\{u[n]\} = \frac{1}{1 - z^{-1}}, |z| > 1 |
| Region of convergence | |z| > 1 for convergence |
| Common mistake | Ignoring ROC or confusing with impulse signal |