Toolvito

Processed online by Toolvito

Z-Transform Calculator

Type a sequence x[n] to get its Z-transform X(z) and the region of convergence, or type X(z) to get the sequence back by partial fractions, with every step. Difference equations give the transfer function, poles, stability and the response.

Choose what to do

Task
Z-transform or inverse

Forward: x[n] with u[n − m] and δ[n − m] allowed. Inverse: X(z) in z or z^-1.

Forward only: a finite sequence instead of a formula.

Optional (n).

More options

1 to 60.

Significant digits of decimal values, 2 to 30.

When you run a task here, Toolvito receives the information you submit for processing. Download the result within one hour after the job finishes. Choose Delete files now to request earlier removal. The hourly cleanup normally removes files within one to two hours after completion.

How to use it

  1. Choose Z-transform and the direction. For the transform type x[n] with n as the index, such as 0.5^n, n*2^n, cos(pi n/3), u[n-2] or δ[n] + 3δ[n-2], or a list of values such as 1, 2, 3, 4.
  2. For the inverse type X(z), such as z/((z - 1)(z - 0.5)) or 1/(1 - 0.5z^-1), and choose the region of convergence.
  3. For a system choose Difference equation and type it, such as y[n] - 0.5y[n-1] = x[n] + x[n-1]; add an input and initial values for the response.

Z-transform and inverse

  • The one-sided Z-transform is X(z) = Σ x[n]·z⁻ⁿ for n = 0, 1, 2, …. Table pairs: Z{rⁿ} = z/(z − r), Z{rⁿcos ωn} = z(z − r cos ω)/(z² − 2rz cos ω + r²), Z{rⁿsin ωn} = rz sin ω/(z² − 2rz cos ω + r²), Z{n·x[n]} = −z·dX/dz, Z{δ[n − m]} = z⁻ᵐ, and a delay u[n − m]·x[n − m] gives z⁻ᵐX(z).
  • u[n] is the unit step (1 for n ≥ 0) and δ[n] the unit impulse (1 at n = 0). Letters other than n are constants.
  • The inverse splits X(z)/z into partial fractions; each term A·z/(z − p)ʲ gives A·C(n, j − 1)·p^(n − j + 1) for n ≥ 0 when the region is outside the pole, or minus the same for n ≤ −1 when it is inside. Complex poles are written with cos and sin.
  • The region of convergence decides the sequence: causal |z| > every pole (right-sided), left-sided |z| < every pole, or a ring between poles through a radius you give (two-sided).

Difference equations

  • H(z) = Y(z)/X(z) = (b₀ + b₁z⁻¹ + …)/(a₀ + a₁z⁻¹ + …) from a₀y[n] + a₁y[n − 1] + … = b₀x[n] + b₁x[n − 1] + …. A causal system is stable when every pole lies inside the unit circle |z| = 1.
  • The impulse response h[n] is the inverse transform of H(z). With an input x[n] and initial values y[−1], y[−2], … the one-sided transform gives the output y[n] for n ≥ 0.

How the answers are checked

A transform is compared with the sum Σ x[n]·z₀⁻ⁿ of 401 terms at a point z₀ of the region (mpmath, no table) and transformed back. An inverse is compared with long division (the power series of X) or, for a ring, with the two-sided sum on the circle. Difference-equation answers are compared with the equation run step by step with exact fractions. If a check disagrees, no answer is given.

Related tools