0
0
RosHow-ToBeginner · 3 min read

Z Transform of Unit Step in Signal Processing Explained

The 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:

  • z is a complex variable.
  • z^{-1} represents a delay by one sample.
  • The region of convergence (ROC) is |z| > 1 to ensure the sum converges.
python
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.

python
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()
Output
Approximate Z transform after 50 terms: 1.6667 Exact Z transform value: 1.6667
⚠️

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.

python
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}")
Output
Sum inside unit circle: 1.0 Sum outside unit circle: 10.9091
📊

Quick Reference

ConceptFormula / Note
Unit step signalu[n] = 1, n \geq 0
Z transform definitionX(z) = \sum_{n=0}^\infty x[n] z^{-n}
Z transform of unit stepZ\{u[n]\} = \frac{1}{1 - z^{-1}}, |z| > 1
Region of convergence|z| > 1 for convergence
Common mistakeIgnoring ROC or confusing with impulse signal

Key Takeaways

The Z transform of the unit step is 1 / (1 - z^{-1}) with ROC |z| > 1.
Always check the region of convergence to ensure the transform is valid.
The unit step signal is 1 for all n ≥ 0, not just at a single point.
Partial sums approximate the infinite series and converge when |z| > 1.
Confusing the unit step with other signals leads to incorrect transforms.