dash–calculator

04 Numbers and Counting

Inverse Z-Transform: Complex Roots Explained

Readout 04-0285 · Updated · Standard formula, shown below

The calculator on this page is switched off while it is checked. The formula is below, and the worked example shows how to do the sum by hand.

The inverse z-transform of a function with complex roots is found using partial fraction expansion, where each complex conjugate pole pair produces a real-valued sinusoidal term in the time domain. You enter the z-domain expression or its poles, and the calculator returns the corresponding discrete-time sequence as a combination of damped sine and cosine terms.

Formula

For a second-order z-domain denominator with complex conjugate poles, the inverse z-transform is:

x[n] = rn [ A cos(nθ) + B sin(nθ) ] u[n]

where:

  • r = magnitude of the pole pair (radius), dimensionless (0 ≤ r ≤ 1 for stability)
  • θ = angle of the pole in radians (or degrees, as used here), 0 ≤ θ ≤ 2π
  • A, B = constants from partial fraction expansion, real numbers
  • n = discrete time index, integer ≥ 0
  • u[n] = unit step sequence (1 for n ≥ 0, else 0)

The calculator uses the standard formula for a system with transfer function H(z) = (a + b z-1) / (1 – 2r cosθ z-1 + r2 z-2). The output gives x[n] for n = 0, 1, 2, … based on the coefficients you enter.

Worked Example

Using the default values: a = 1, b = 0.5, r = 0.9, θ = 45°.

The denominator corresponds to poles at 0.9 e±j45°. The inverse z-transform is:

x[n] = rn [ cos(nθ) + (b/(2r)) sin(nθ) ] u[n]

For n = 0: x[0] = 0.90 [ cos(0) + (0.5/(1.8)) sin(0) ] = 1.0000

For n = 1: x[1] = 0.9 [ cos(45°) + (0.2778) sin(45°) ] = 0.9 [0.7071 + 0.1964] = 0.8132

For n = 2: x[2] = 0.81 [ cos(90°) + 0.2778 sin(90°) ] = 0.81 [0 + 0.2778] = 0.2250

The calculator shows x[n] for n = 0, 1, 2, … using the same formula, giving 1.0000, 0.8132, 0.2250, …

Why Complex Roots Appear

In z-transform analysis, complex roots typically arise when the denominator polynomial has a pair of conjugate complex zeros. This happens naturally in systems with resonance, such as second-order digital filters, mechanical oscillators, or any difference equation with a characteristic equation having a discriminant less than zero. The presence of complex poles means the system’s impulse response is oscillatory, with the oscillation frequency determined by the pole angle and the decay rate by the pole magnitude.

For example, a simple second-order system described by y[n] – 1.8 cos(45°) y[n-1] + 0.81 y[n-2] = x[n] has poles at 0.9 e±j45°. The inverse z-transform yields a damped sinusoid, not a pure exponential.

How to Perform Partial Fractions with Complex Roots

Given X(z) = N(z) / D(z), where D(z) has a complex conjugate pair p and p*, the partial fraction expansion includes terms of the form:

  • A / (1 – p z-1) + A* / (1 – p* z-1)

where A is a complex constant. To find A, multiply both sides by (1 – p z-1) and evaluate at z = p. The result is a complex number, but when combined with its conjugate pair, the time-domain sequence becomes real:

x[n] = (A pn + A* (p*)n) u[n]

Using Euler’s formula, this simplifies to a real damped sinusoid. Many students mistakenly try to keep the expansion in terms of complex exponentials and forget to combine conjugates, leading to complex-looking answers that are actually real.

Choosing the Right Method

Several methods exist for finding the inverse z-transform, and the choice depends on the form of X(z):

  • Partial fraction expansion – best for rational functions with distinct poles, including complex pairs.
  • Power series expansion – useful for causal sequences when X(z) is given as a series; works for any function but often impractical.
  • Contour integration – theoretical, rarely used in practice.
  • Using tables – quick for common transforms, but complex pairs require recognizing the sinusoidal form.

For complex roots, partial fractions are the most systematic. Always check that the numerator degree is less than the denominator; if not, perform polynomial division first.

Common Mistakes and Pitfalls

Several errors frequently occur when dealing with complex roots:

  • Forgetting the conjugate pair – only computing one term and getting a complex sequence.
  • Using degrees vs. radians – the angle in the exponential must match the sine/cosine argument. This calculator uses degrees for convenience, but many textbooks use radians.
  • Misidentifying the radius – the magnitude of the pole is the square root of the constant term in the denominator, not the coefficient of z-1.
  • Ignoring the region of convergence – the inverse transform depends on whether the ROC is outside or inside the pole circle. For causal sequences (u[n]), the ROC is outside the outermost pole.
  • Rounding too early – keep at least 4 decimal places in intermediate steps to avoid significant error in the final sequence.

Interpreting the Result

The output x[n] is a discrete-time signal. The radius r determines the envelope: if r < 1, the sinusoid decays; if r = 1, it persists indefinitely; if r > 1, it grows (unstable). The angle θ determines the frequency of oscillation: the digital frequency is θ/2π cycles per sample. For example, θ = 45° means a period of 8 samples (360/45).

In practical terms, this sequence might represent the impulse response of a digital resonator, the voltage across a capacitor in a sampled RLC circuit, or the output of a feedback control system. The calculator gives you the numerical sequence directly, which you can compare with simulation or measurement.

Frequently Asked Questions

Q: Can I use this calculator for repeated complex roots?
A: No, this calculator handles only distinct complex conjugate pairs. Repeated roots require a different partial fraction form with additional polynomial terms, and the time-domain response includes a polynomial factor multiplying the sinusoid.

Q: What if my numerator is a constant?
A: That’s fine. Set a to the constant and b to 0. The formula still works, producing a pure damped cosine if b=0.

Q: How do I convert from the z-domain to this calculator’s inputs?
A: Write your X(z) as N(z)/D(z). Factor D(z) into first and second-order terms. For a second-order term with complex poles, the denominator is 1 – 2r cosθ z-1 + r2 z-2. Identify r and θ from the coefficients. The numerator coefficients a and b come from the partial fraction expansion, not directly from the original numerator.

Q: Why does the result look like a sine wave?
A: Because complex conjugate poles always produce sinusoidal behavior in the time domain. The imaginary parts cancel, leaving a real oscillation. This is a fundamental property of linear systems.

Q: What is the difference between this and the inverse Laplace transform?
A: The z-transform is for discrete-time signals, while the Laplace transform is for continuous-time. The mathematical structure is similar, but the z-transform uses z-1 as a delay operator, and the inverse involves sequences rather than functions of time.

Limitations and Practical Notes

This calculator assumes a causal sequence (u[n] included) and a stable system (r < 1 for meaningful results). It does not handle non-causal sequences or ROC variations. For non-causal signals, you would need to adjust the formula to include negative powers of n. Also, the formula given is for a specific numerator form; if your numerator has a different structure, you may need to adjust the constants A and B accordingly.

Always verify your result by plugging a few values of n back into the original difference equation. This catches sign errors and misidentified coefficients. For engineering applications, also check that the sampling frequency is high enough to represent the oscillation frequency without aliasing.

Related

Formula used
in a | Coefficient a | - | 1 | -10 | 10
in b | Coefficient b | - | 0.5 | -10 | 10
in c | Coefficient c | - | 0.5 | -10 | 10
in r | Radius of pole pair | - | 0.9 | 0 | 1
in theta | Angle of pole (deg) | deg | 45 | 0 | 360
out x_n | Sequence x[n] | - | (r^n) * (cosd(n*theta) + (b/(2*r))*sind(n*theta)) | 4

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More on this panel

The whole Numbers and Counting panel →