Web Simulation

 

 

 

Interactive Z-Transform Visualizer

Objective. This tool helps you explore the Z-transform and discrete-time LTI systems by placing poles (x) and zeros (o) on the Z-plane. The unit circle |z| = 1 corresponds to the frequency axis. You see the magnitude and phase of the frequency response H(e^jw), and the impulse response h[n] from the associated difference equation.

Stability. A system is stable iff all poles lie inside the unit circle (|z| < 1). Any pole with |z| > 1 makes the system unstable; the impulse response grows without bound (we clamp it for display).

Mathematical Foundation

Transfer function. We model the system as H(z) = gain * prod(z - zeroi) / prod(z - polei). On the unit circle, z = e^jw, so H(e^jw) gives the frequency response. Magnitude |H(e^jw)| is plotted in dB; phase angle H(e^jw) in degrees.

Difference equation. H(z) is converted to polynomial form B(z)/A(z) in z-1. The recurrence y[n] = sumk bk x[n-k] - sumk>0 ak y[n-k] (with a0=1) defines the filter. We drive it with an impulse [1, 0, 0, ...] to obtain the first 100 samples of h[n].

Poles and zeros. Poles attract |H|; near a pole, the magnitude grows. Zeros null |H|; on the unit circle they create notches. Conjugate pairs keep coefficients real and yield symmetric magnitude response.

Z-Plane: unit circle, poles (x), zeros (o)
Stable

Drag to move; right-click to delete.

Magnitude |H(e^jw)| (dB)
Phase angle H (deg)
Impulse response h[n]
3D: |H(z)| over complex plane (Re, Im)
|H(e^jw)| on unit circle (0 to 2pi)

 

Usage

Preset: Choose a built-in configuration. Order (slider): when a design preset (Butterworth, Chebyshev I/II, Elliptic) is selected, the Order slider appears; set filter order 2-12. Add Pole / Add Zero: place new roots (as conjugate pairs if enabled). Delete: remove the selected pole or zero (click to select). Clear All: remove all. Conjugate pairs: when on, adding or dragging a root updates its mirror. Show phase: toggle the phase plot.

On the Z-plane, drag a pole (x) or zero (o) to move it. Right-click one to delete it. Green = stable (|z| < 1); red = unstable (|z| > 1). Near the unit circle, dashed lines to the cursor suggest the distance interpretation of H(e^jw).

3D plot: Use the rotation step buttons (top) for elevation +/- and azimuth +/-. Use camera presets (bottom): Top, Iso, Front, Side, Bottom. Drag to rotate, scroll to zoom. The white tube traces |H(z)| along the unit circle on the surface.

2D projection: |H(e^jw)| vs angle on the unit circle. Use the overlay buttons to switch the x-axis range between 0 to 2pi and -pi to pi.

Presets

  • Simple Low-Pass: one real pole (r=0.8). Smooths; |H| falls at high w.
  • Narrow Bandpass (Resonator): conjugate pole pair at r=0.9, +/-45 deg. Sharp peak at w=pi/4; impulse rings.
  • Notch: zeros on the unit circle at 90 deg; poles inside. Deep null at w=pi/2.
  • High-Pass: pole at z=-1, zero at origin. Attenuates low w; h[n] alternates.
  • Unstable: conjugate poles with r=1.1. |H| and h[n] grow; plot clamped.
  • Butterworth LP: maximally flat passband; poles only. Order 2-12.
  • Chebyshev I LP: passband ripple; steeper rolloff. Order 2-12.
  • Chebyshev II LP: stopband ripple; zeros on unit circle. Order 2-12.
  • Elliptic LP: ripple in both bands; sharpest transition. Order 2-12.

Key Concepts

  • Z-plane: Re(z) horizontal, Im(z) vertical. Unit circle |z|=1 for frequencies 0 to pi (Nyquist).
  • Stability: all poles inside |z|<1. Any pole with |z|>1 gives unbounded h[n].
  • Frequency response: H(e^jw) = B(e^jw)/A(e^jw). Magnitude in dB; phase in degrees.
  • Impulse response: from difference equation with input delta[n]; clamped when unstable.
  • 3D plot: |H(z)| in dB over Re(z) and Im(z). Fine mesh (101�101), �120 dB range. Rotation step buttons (top): elevation +/-, azimuth +/-. Camera presets (bottom): Top, Front, Side, Iso, Bottom. Drag to rotate, scroll to zoom. White tube = unit circle trace (|H| along |z|=1 on the surface).
  • 2D projection: |H(e^jw)| vs angle on the unit circle (0?2pi or -pi?pi). Overlay buttons switch the x-axis range.